Subset Generator
One set per line (commas or spaces) - every subset of it (the power set) is listed with an iterative bit-mask loop
Subset size:
Size:
From:
To:
Display:
Max results:
Separator:
Calculation Result
Download CSV
| No. | Set | Subset | Size |
|---|
Introduction to the tool and how to use it
Subset Generator: type a set and get every subset of it - the power set P(S), including the empty set
How to use:
1. Type one set per line with elements separated by commas or spaces (full-width commas work too); elements are kept as literal text and duplicates inside a line are removed, e.g.
2. Tune the parameters as needed:
- Subset size: all (0 to n), a single size (say 2-element subsets only) or a range (say 1 to 3 elements);
- Display: grouped by size (a heading such as
- Max results: the upper bound on how many subsets are listed (1 to 5000);
3. Hit Run and the output box gives the subset total plus every subset, while the table lists the index, the set, the subset and its size;
4. Copy the result or export it as CSV.
Reading the output: the first line of each block is a summary such as
Algorithm and guards: enumeration uses an iterative bit-mask loop (the mask runs from 0 to 2^n - 1 and bit i selects element i) with no recursion, so there is no stack limit; the total is computed exactly with BigInt. Because 2^n grows extremely fast, sets with more than 20 elements are not enumerated - only the total is reported (for 64 elements the power set holds 2^64 = 18446744073709551616 subsets). A run handles at most 50 lines, 500 elements per line and 5000 output rows, and anything beyond that is folded back with a notice.
How it differs from the other set tools here: the Set Operations Calculator works between several sets (union, intersection, difference, symmetric difference, complement) and the Cartesian Product Calculator multiplies several sets together; this tool only enumerates the power set of a single set, empty set and full set included, with size filtering, grouping and the exact subset total.
{} and the set itself.How to use:
1. Type one set per line with elements separated by commas or spaces (full-width commas work too); elements are kept as literal text and duplicates inside a line are removed, e.g.
1, 2, 3;2. Tune the parameters as needed:
- Subset size: all (0 to n), a single size (say 2-element subsets only) or a range (say 1 to 3 elements);
- Display: grouped by size (a heading such as
Size 2 (3) followed by that group) or bit-mask order (from {} up to the whole set);- Max results: the upper bound on how many subsets are listed (1 to 5000);
3. Hit Run and the output box gives the subset total plus every subset, while the table lists the index, the set, the subset and its size;
4. Copy the result or export it as CSV.
Reading the output: the first line of each block is a summary such as
S1 = {1, 2, 3} | |S| = 3 | subset total = 8, since 2^3 = 8. When a size filter is active the summary gains a "matched = N" part.Algorithm and guards: enumeration uses an iterative bit-mask loop (the mask runs from 0 to 2^n - 1 and bit i selects element i) with no recursion, so there is no stack limit; the total is computed exactly with BigInt. Because 2^n grows extremely fast, sets with more than 20 elements are not enumerated - only the total is reported (for 64 elements the power set holds 2^64 = 18446744073709551616 subsets). A run handles at most 50 lines, 500 elements per line and 5000 output rows, and anything beyond that is folded back with a notice.
How it differs from the other set tools here: the Set Operations Calculator works between several sets (union, intersection, difference, symmetric difference, complement) and the Cartesian Product Calculator multiplies several sets together; this tool only enumerates the power set of a single set, empty set and full set included, with size filtering, grouping and the exact subset total.
Message board
All messages →-
No one has spoken up yet — want to go first?