Skill stop · How is this move done?

Counting the Elements of a Finite Set

In the Chinese book: 有限集元素的数目

Too hard to count? Count 0-1 strings, or split by the last element.

Before this stop, visit:Operations on Sets (Concept)

WorkbenchDrag n from 1 to 6 and watch how the total number of subsets changes. Then tap a subset to see its 0-1 string.

Loading figure…

What this move does

The number of elements of a finite set is written . If you can list them, just count. If you can't, use one of these three moves:

  1. Listing: write out every small case to see the structure.
  2. Correspondence: build a one-to-one correspondence that swaps what you want to count for something easier to count. Subsets 0-1 strings: a in position means is in the subset.
  3. Recursion: split the objects into two classes by whether they contain the last element . Each class becomes a smaller copy of the same problem.

Move 2 immediately gives the most basic formula: each digit is independently or , so

Grouping by the number of elements, group has members, so . The groups by size on the workbench above are exactly one row of Pascal's triangle.

Predict first

How many subsets of contain but not ?

subsets
Choose an answer first; then you can see the result.

Work through one

Problem: how many subsets of contain no two consecutive numbers? Call this number .

Recursion: subsets with no two consecutive numbers

Step 1 / 6
Loading figure…
  1. Count a small case first

    : of the subsets, the ones marked ✗ contain two consecutive numbers. Count the ones without ✗: .

When it fails

Break it

Counterexample lab: remove one condition

Conclusion: The two sides have the same size

Subsets 0-1 strings: different subsets give different strings, and every string can be read back as a subset. So has exactly as many subsets as there are 0-1 strings of length , namely .

Loading figure…

Practice

Exercise 1Basic

How many subsets of contain both and ?

Exercise 2Basic

How many subsets of contain no two consecutive numbers? (The empty set counts.)

Exercise 3Advanced

How many subsets of have an even number of elements? Rule: don't compute ; build a one-to-one correspondence instead.

Exercise 4Challenge

How many subsets of contain no three consecutive integers?

Mistake Museum · Exhibits from this stop

Before you leave, look at the traps other people fell into here.See every exhibit in the museum →

Exhibit

Non-empty proper subsets, but only one thing subtracted

The wrong step: has non-empty proper subsets.
What went wrong? Think first, then open

Diagnosis Out of the subsets, two have to go: the empty set (not non-empty) and the whole set itself (not proper).

The right step: There are non-empty proper subsets. Before counting, name each object you are excluding, one by one.

“Exclude as many as you name, and name every one you exclude”

Exhibit

Counting through a correspondence that is not one-to-one

The wrong step: Match each subset of with the sum of its elements. The sum can only be , so there are subsets.
What went wrong? Think first, then open

Diagnosis Different subsets can have the same sum: and both sum to . This correspondence is “many-to-one”, so the two sides do not have the same size (there are actually subsets).

The right step: Before counting through a correspondence, check two things: different objects go to different images (injective), and every image is hit by some object (surjective). Subsets ↔ 0-1 strings passes both checks.

“Only a one-to-one correspondence lets you count the other side instead”