// output of ./demo/comb/ksubset-rec-demo.cc: // Description: //% k-subsets where kmin<=k<=kmax in various orders. //% Recursive CAT algorithm. arg 1: 6 == n [Subsets of n-element set.] default=6 arg 2: 7 == rq [Type of ordering 0<=rq<16.] default=7 arg 3: 0 == kmin [Minimal number of elements in subsets.] default=0 arg 4: 6 == kmax [Maximal number of elements in subsets.] default=6 arg 5: 0 == nq [Whether to reverse order (zero or one).] default=0 0: ...... ...... { } 1: 1..... P..... { 0 } 2: 11.... .P.... { 0, 1 } 3: 111... ..P... { 0, 1, 2 } 4: 1111.. ...P.. { 0, 1, 2, 3 } 5: 11111. ....P. { 0, 1, 2, 3, 4 } 6: 111111 .....P { 0, 1, 2, 3, 4, 5 } 7: 1111.1 ....M. { 0, 1, 2, 3, 5 } 8: 111.11 ...MP. { 0, 1, 2, 4, 5 } 9: 111.1. .....M { 0, 1, 2, 4 } 10: 111..1 ....MP { 0, 1, 2, 5 } 11: 11.1.1 ..MP.. { 0, 1, 3, 5 } 12: 11.111 ....P. { 0, 1, 3, 4, 5 } 13: 11.11. .....M { 0, 1, 3, 4 } 14: 11.1.. ....M. { 0, 1, 3 } 15: 11..1. ...MP. { 0, 1, 4 } 16: 11..11 .....P { 0, 1, 4, 5 } 17: 11...1 ....M. { 0, 1, 5 } 18: 1.1..1 .MP... { 0, 2, 5 } 19: 1.1.1. ....PM { 0, 2, 4 } 20: 1.1.11 .....P { 0, 2, 4, 5 } 21: 1.11.1 ...PM. { 0, 2, 3, 5 } 22: 1.1111 ....P. { 0, 2, 3, 4, 5 } 23: 1.111. .....M { 0, 2, 3, 4 } 24: 1.11.. ....M. { 0, 2, 3 } 25: 1.1... ...M.. { 0, 2 } 26: 1..1.. ..MP.. { 0, 3 } 27: 1..11. ....P. { 0, 3, 4 } 28: 1..111 .....P { 0, 3, 4, 5 } 29: 1..1.1 ....M. { 0, 3, 5 } 30: 1...11 ...MP. { 0, 4, 5 } 31: 1...1. .....M { 0, 4 } 32: 1....1 ....MP { 0, 5 } 33: .1...1 MP.... { 1, 5 } 34: .1..11 ....P. { 1, 4, 5 } 35: .1..1. .....M { 1, 4 } 36: .1.1.. ...PM. { 1, 3 } 37: .1.11. ....P. { 1, 3, 4 } 38: .1.111 .....P { 1, 3, 4, 5 } 39: .1.1.1 ....M. { 1, 3, 5 } 40: .11..1 ..PM.. { 1, 2, 5 } 41: .11.1. ....PM { 1, 2, 4 } 42: .11.11 .....P { 1, 2, 4, 5 } 43: .111.1 ...PM. { 1, 2, 3, 5 } 44: .11111 ....P. { 1, 2, 3, 4, 5 } 45: .1111. .....M { 1, 2, 3, 4 } 46: .111.. ....M. { 1, 2, 3 } 47: .11... ...M.. { 1, 2 } 48: .1.... ..M... { 1 } 49: ..1... .MP... { 2 } 50: ..11.. ...P.. { 2, 3 } 51: ..111. ....P. { 2, 3, 4 } 52: ..1111 .....P { 2, 3, 4, 5 } 53: ..11.1 ....M. { 2, 3, 5 } 54: ..1.11 ...MP. { 2, 4, 5 } 55: ..1.1. .....M { 2, 4 } 56: ..1..1 ....MP { 2, 5 } 57: ...1.1 ..MP.. { 3, 5 } 58: ...111 ....P. { 3, 4, 5 } 59: ...11. .....M { 3, 4 } 60: ...1.. ....M. { 3 } 61: ....1. ...MP. { 4 } 62: ....11 .....P { 4, 5 } 63: .....1 ....M. { 5 } num=64 rct=64 work/object=1