ABCD ABE ABC EF Using the "store everything in the powerset approach" (or, at least allocating space for it), we need to store 2^6 elements (A,B,C,D,E,F) or 64 bytes of data. We're going to assume that we know in advance that there are only 6 possible elements. For sake of argument, let's assume a more compact efficient approach along the lines of the original approaches using hash tables. We'd build up a structure like this, in some arbitrary order: #first set ABCD BCD ACD ABD ABC AB AC BC AD BD CD A B C D #second set ABE AE BE E #third set #generates nothing #fourth set EF F This only requires 22 bytes of data, a 65% memory savings.