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: enter a set and list all of its subsets at once, that is its power set P(S); the empty set {} and the full set itself are both included.
Output note: the first line per row is a summary, for example S1 = {1, 2, 3}  | |S| = 3 | total subsets = 8, giving 2³ = 8 subsets in total; when a size filter is set, the summary appends filtered = N.

Algorithm and safeguards: enumeration walks the bitmask iteratively (mask from 0 to 2^n − 1; bit i set to 1 means take element i), with no recursion and no stack overflow; the subset count is computed exactly with BigInt. Since 2^n grows extremely fast, beyond 20 elements it stops enumerating one by one and reports only the total (for example a 64-element power set has 2⁶⁴ = 18446744073709551616 subsets); a single run handles at most 50 lines, 500 elements per line, and caps output at 5000 rows, truncating with a notice when exceeded.

How it differs from other set tools on the site: Set Operations computes union, intersection, difference, symmetric difference, and complement across several sets; Cartesian Product computes the Cartesian product of several sets; this tool only enumerates the power set of a single set, including empty and full sets, with optional filtering and grouping by subset size and the subset total.

How to use

  1. Enter one set per line, elements separated by commas or spaces (full-width commas work too); elements are treated as raw strings and deduplicated within a line, such as 1, 2, 3.
  2. Adjust the parameters as needed:
       · Subset size: all (0 to n), fixed size (e.g. 2-element subsets only), or a range (e.g. 1- to 3-element subsets);
       · Display: group by size (a heading like Size 2 (3) first, then list subsets of that size) or mask order (from {} to the full set);
       · Max output: cap on result rows (1 to 5000).
  3. Click Calculate; the output box shows each set's subset total and the subsets one by one, and the table lists index, set, subset, and subset size row by row.
  4. Results support one-click copy and CSV export.

Message board

All messages →
0/200

  • No one has spoken up yet — want to go first?