// output of ./demo/comb/ksubset-lex-demo.cc:
// Description:
//% Nonempty subsets of the set {0,1,2,...,n-1} with at most k elements.
//% Representation as list of parts.
//% Subset-lex order.
//% Loopless generation.
//% See OEIS sequence A117670.
//% See Joerg Arndt, Subset-lex: did we miss an order?, (2014)
//%   http://arxiv.org/abs/1405.6503

arg 1: 6 == n  [Size of the set (n>=1)]  default=6
arg 2: 3 == k  [Max size of subsets (1<=k<=n)]  default=3
   1:    1.....    { 0 }
   2:    11....    { 0, 1 }
   3:    111...    { 0, 1, 2 }
   4:    11.1..    { 0, 1, 3 }
   5:    11..1.    { 0, 1, 4 }
   6:    11...1    { 0, 1, 5 }
   7:    1.1...    { 0, 2 }
   8:    1.11..    { 0, 2, 3 }
   9:    1.1.1.    { 0, 2, 4 }
  10:    1.1..1    { 0, 2, 5 }
  11:    1..1..    { 0, 3 }
  12:    1..11.    { 0, 3, 4 }
  13:    1..1.1    { 0, 3, 5 }
  14:    1...1.    { 0, 4 }
  15:    1...11    { 0, 4, 5 }
  16:    1....1    { 0, 5 }
  17:    .1....    { 1 }
  18:    .11...    { 1, 2 }
  19:    .111..    { 1, 2, 3 }
  20:    .11.1.    { 1, 2, 4 }
  21:    .11..1    { 1, 2, 5 }
  22:    .1.1..    { 1, 3 }
  23:    .1.11.    { 1, 3, 4 }
  24:    .1.1.1    { 1, 3, 5 }
  25:    .1..1.    { 1, 4 }
  26:    .1..11    { 1, 4, 5 }
  27:    .1...1    { 1, 5 }
  28:    ..1...    { 2 }
  29:    ..11..    { 2, 3 }
  30:    ..111.    { 2, 3, 4 }
  31:    ..11.1    { 2, 3, 5 }
  32:    ..1.1.    { 2, 4 }
  33:    ..1.11    { 2, 4, 5 }
  34:    ..1..1    { 2, 5 }
  35:    ...1..    { 3 }
  36:    ...11.    { 3, 4 }
  37:    ...111    { 3, 4, 5 }
  38:    ...1.1    { 3, 5 }
  39:    ....1.    { 4 }
  40:    ....11    { 4, 5 }
  41:    .....1    { 5 }
