Take the set $\{1,2\}$. I know there are $2^5 = 32$ different 5-element sets made up these two elements, but what are they?
I would like to create a $32 \times 5$ matrix in MATLAB or MuPad such that each row contains each set. For example the first row could be [1 2 2 1 1] and the second [2 2 2 1 1] etc.
I know these are neither combinations nor permutations, so what would you call such an arrangement? Thank you for your time!
Here's a magical way to do this: