Partition the set of integers into subsets of sizes 2, 1, and 2.
>
|
|
Print the vectors corresponding to the partitions. Indices 1 and 2 contain the first subset, index 3 the second, and indices 4 and 5 the third.
>
|
|
1: 1 2 3 4 5
2: 1 2 4 3 5
3: 1 2 5 3 4
4: 1 3 4 2 5
5: 1 3 5 2 4
6: 1 4 5 2 3
7: 1 3 2 4 5
8: 1 4 2 3 5
9: 1 5 2 3 4
10: 1 4 3 2 5
11: 1 5 3 2 4
12: 1 5 4 2 3
13: 2 3 1 4 5
14: 2 4 1 3 5
15: 2 5 1 3 4
| |
Compute the number of iterations.