How do I list the combinations of a set in lexicographical order?

December 1, 2012 in Math, Matlab, Octave, Recipes

Suppose we have a set composed of elements. Our goal is to list all the possible ways in which we can choose elements in a lexicographical order. Intuitively speaking, we
…read more