ARITHMETIC WORKSHEETS

Checking all subsets through two different counts

The number of subsets of a set can be counted two ways: as independent include-or-exclude choices, or by adding up the counts for each subset size. This guide confirms that both give 16 for four items.

Counting by decisions

Take a set of four distinct items. To form a subset, decide for each item whether it goes in or stays out. Each item has two options, and the choices are independent, so the number of subsets is 2 × 2 × 2 × 2 = 2^4 = 16. The power calculator confirms it with base 2 and exponent 4. This count includes the empty subset, where every item is left out, and the full set, where every item is included. Every different pattern of choices gives a different subset, so nothing is counted twice.

Counting by size

The second method groups subsets by how many items they contain and uses combinations. The number of subsets of size r from n items is C(n, r) = n! / (r! × (n - r)!). For n = 4 the counts are C(4,0) = 1, C(4,1) = 4, C(4,2) = 6, C(4,3) = 4 and C(4,4) = 1. These are the empty set, four singletons, six pairs, four triples and the full set. The combination calculator gives C(4,2) = 6 for n = 4 and r = 2. The five sizes together cover every subset once.

Putting the two counts together

Add the size counts: 1 + 4 + 6 + 4 + 1 = 16, the same as 2^4. The agreement is the identity that the sum of C(n, r) over all r from 0 to n equals 2^n. It is a statement that two different ways to count the same collection must agree. The basic calculator can run the final addition. For instance, the middle size contributes 6, and the other sizes together contribute 10, since 1 + 4 + 4 + 1 = 10, and 10 + 6 = 16. If the two methods disagree in your own work, one of them has a mistake.

Larger examples

With five items there are 2^5 = 32 subsets, split by size as 1, 5, 10, 10, 5 and 1. The combination calculator gives C(5,2) = 10. With ten items there are 2^10 = 1,024 subsets, and the largest size class is C(10,5) = 252. With twenty items the count is 2^20 = 1,048,576. Each added item doubles the number of subsets, because every existing subset can be formed with and without the new item. This doubling is why listing all subsets becomes impractical quickly. At thirty items there are more than a billion subsets, 2^30 = 1,073,741,824, and a program that tries each one takes noticeable time. The size classes grow just as fast: the largest class for twenty items, C(20,10), is 184,756. Estimating the count before attempting a search tells you whether exhaustive checking is realistic or whether the problem needs a smarter method.

The pattern in the row of counts

The counts for n = 4 are the fifth row of Pascal's triangle: 1, 4, 6, 4, 1. Each entry is the sum of the two entries above it, and each row adds up to a power of two. The row is symmetric, since choosing r items to include is the same as choosing n - r to leave out, so C(4,1) = C(4,3). The largest entry sits in the middle. This symmetry is a quick check: if your size counts are not symmetric, an entry is wrong. The next row, for five items, is 1, 5, 10, 10, 5, 1, and each inner number is the sum of the two above it: 4 + 6 = 10. Building rows this way needs only addition, and the row sum doubles each time, from 16 to 32. The central binomial coefficient for even n, such as 6 for n = 4, is the single largest class, which is why a random subset of four items most often has two members.

Nonempty and proper subsets

Tasks often ask for a variation of the count. Nonempty subsets number 2^n - 1, which is 15 for four items. Proper subsets, which exclude the full set, also number 2^n - 1. Subsets that are both nonempty and proper number 2^n - 2, or 14 for four items. The empty and full sets each contribute one, so the boundary adjustments are easy to make, but they have to be made explicitly. Read the wording of a question carefully to see which variant it asks for.

Binary numbers as subsets

A subset of n items corresponds to an n-bit binary number, where each bit says whether the matching item is included. For four items the numbers 0000 through 1111 are the 16 subsets, running from the empty set to the full set. This is the source of the 2^n count, since n bits have 2^n patterns. The correspondence is also a practical way to list all subsets in a program: loop over the integers from 0 to 2^n - 1 and read off the bits. The loop has 16 passes for four items. The number of ones in each pattern is the size of the subset, so counting the patterns with exactly two ones gives the same 6 that the combination calculator reports for C(4,2). Seen this way, the include-or-exclude count and the by-size count are the same list of 16 patterns, sorted two different ways.

Distinct items and repeated items

The counts here assume every item is distinct. The binary-decision count treats each underlying item as its own, so two identical-looking items are still counted separately. If some items are truly interchangeable, the number of different subsets by content is smaller. For example, a bag with two identical red tokens and two identical blue tokens has 3 × 3 = 9 distinct contents, not 16. Say whether items are distinguishable before counting, as the answer depends on it. Labeled items such as named people, numbered parts or distinct files are distinguishable, and the 2^n count applies directly. Quantities of an identical material, such as two identical bolts, are not. Writing down which case applies at the start of a problem prevents a correct formula from being used on the wrong kind of set.

Constraints that change subset counts

The worksheet compares two exact counts for four distinct items. It does not generate the subsets, solve a scheduling or selection problem, or assume anything about which subsets are allowed. In real tasks, rules often limit the choices, for example a budget or a required item, and the simple 2^n count no longer applies. Use the identity here as a check on arithmetic, then adapt the counting method to the restrictions your problem has.

Reproduce the checks

Include-or-exclude decisions

Open the Power calculator and enter:

Base
2
Exponent
4

Expected output:

Power

16

Four independent binary membership choices identify every subset.

Two-item subset count

Open the Combination calculator and enter:

Total items n
4
Items selected r
2

Expected output:

Combinations

6

The middle size contributes six subsets.

Boundary and single/triple contributions

Open the Basic calculator and enter:

First number
10
Operation
add
Second number
6

Expected output:

Result

16

The other size classes contribute ten.

References and implementation scope

The examples describe the behavior of the linked Computandum tools. A successful local check does not establish that another application accepts the same format or applies the same limits.

Related tasks