Memory efficient power set algorithm
There is a trivial bijective mapping from the power set of X = {A,B,C,D,E,F,G,H,I} to the set of numbers between 0 and 2^|X| = 2^9: Ø maps to 000000000 (base 2) {A} maps to 100000000 (base 2) {B} maps to 010000000 (base 2) {C} maps to 001000000 (base 2) … {I} maps to 000000001 (base … Read more