// output of ./demo/comb/ksubset-twoclose-rec-demo.cc: // Description: //% k-subsets (kmin<=k<=kmax) in two-close order with homogeneous moves. //% Recursive algorithm. arg 1: 6 == n [Subsets of n-element set.] default=6 arg 2: 2 == kmin [Minimal number of elements in subsets.] default=2 arg 3: 4 == kmax [Maximal number of elements in subsets.] default=4 arg 4: 0 == w [Whether to modify ordering (bool).] default=0 1: ..1111 ...... { 2, 3, 4, 5 } 2: .1.111 .PM... { 1, 3, 4, 5 } 3: ...111 .M.... { 3, 4, 5 } 4: 1..111 P..... { 0, 3, 4, 5 } 5: 11..11 .P.M.. { 0, 1, 4, 5 } 6: .1..11 M..... { 1, 4, 5 } 7: ....11 .M.... { 4, 5 } 8: 1...11 P..... { 0, 4, 5 } 9: ..1.11 M.P... { 2, 4, 5 } 10: 1.1.11 P..... { 0, 2, 4, 5 } 11: .11.11 MP.... { 1, 2, 4, 5 } 12: .111.1 ...PM. { 1, 2, 3, 5 } 13: ..11.1 .M.... { 2, 3, 5 } 14: 1.11.1 P..... { 0, 2, 3, 5 } 15: 11.1.1 .PM... { 0, 1, 3, 5 } 16: .1.1.1 M..... { 1, 3, 5 } 17: ...1.1 .M.... { 3, 5 } 18: 1..1.1 P..... { 0, 3, 5 } 19: 11...1 .P.M.. { 0, 1, 5 } 20: .1...1 M..... { 1, 5 } 21: 1....1 PM.... { 0, 5 } 22: ..1..1 M.P... { 2, 5 } 23: 1.1..1 P..... { 0, 2, 5 } 24: .11..1 MP.... { 1, 2, 5 } 25: 111..1 P..... { 0, 1, 2, 5 } 26: 1111.. ...P.M { 0, 1, 2, 3 } 27: .111.. M..... { 1, 2, 3 } 28: ..11.. .M.... { 2, 3 } 29: 1.11.. P..... { 0, 2, 3 } 30: 11.1.. .PM... { 0, 1, 3 } 31: .1.1.. M..... { 1, 3 } 32: 1..1.. PM.... { 0, 3 } 33: 11.... .P.M.. { 0, 1 } 34: 1.1... .MP... { 0, 2 } 35: .11... MP.... { 1, 2 } 36: 111... P..... { 0, 1, 2 } 37: 11..1. ..M.P. { 0, 1, 4 } 38: .1..1. M..... { 1, 4 } 39: 1...1. PM.... { 0, 4 } 40: ..1.1. M.P... { 2, 4 } 41: 1.1.1. P..... { 0, 2, 4 } 42: .11.1. MP.... { 1, 2, 4 } 43: 111.1. P..... { 0, 1, 2, 4 } 44: 11.11. ..MP.. { 0, 1, 3, 4 } 45: .1.11. M..... { 1, 3, 4 } 46: ...11. .M.... { 3, 4 } 47: 1..11. P..... { 0, 3, 4 } 48: ..111. M.P... { 2, 3, 4 } 49: 1.111. P..... { 0, 2, 3, 4 } 50: .1111. MP.... { 1, 2, 3, 4 } ct=50