October 4, 2012
Generating a powerset in ColdFusion
I recently needed to generate a powerset (a set of all subsets) of 3 HTML select boxes. The idea was that a user could choose 1-many options from each box, and they had to choose a value from all 3 boxes (none could be empty).
Select #1 had 4 values
Select #2 had 7 values
Select #3 had 13 values
Now, I needed to generate every possible permutation for these 3 select boxes based on the rules I defined above.
...
Read more