courses › Counting & Discrete Math

Logic & sets

level 32 course

Overlapping groups, subsets, truth tables, and “if … then”.

Pen and paper is fine · no calculator needed why?

Learn first (about 3 minutes)

Opens at level 32.

Sign in to start

Builds on: Counting (not open yet)

the lesson

The idea, the techniques and a tip for each skill, right here. The Learn page adds worked examples for every skill and untimed practice.

Read the lesson · about 3 minutes

The idea

Two overlapping groups share members, so adding them counts the shared ones twice. Take the overlap off once.

A set of n things has 2 to the power n subsets, because each thing is either in or out.

"If P, then Q" means the same as its contrapositive, "if not Q, then not P". The converse, "if Q, then P", can be false while the original is true. A truth table lists every true/false mix of the letters: 4 rows for two letters, 8 for three.

Techniques

Add, then take off the overlap

Two groups that overlap: either, neither, or only one.

  1. Either group: add the two counts and subtract the overlap once.
  2. Neither: the total minus that.
  3. Only the first: its count minus the overlap.
worked example

Example: Of 50 people surveyed, 30 drink tea, 25 drink coffee, and 12 drink both. How many drink neither?

  1. Tea or coffee: 30 + 25 − 12 = 43.
  2. Neither: 50 − 43 = 7.

Answer: 7

In or out: powers of 2

Counting the subsets of a set.

  1. All subsets, the empty one included: 2 multiplied by itself n times.
  2. Non-empty subsets: subtract 1.
  3. Subsets of exactly k elements: C(n, k).
worked example

Example: How many non-empty subsets does a set with 5 elements have?

  1. 2 × 2 × 2 × 2 × 2 = 32 subsets.
  2. Leave out the empty one: 32 − 1 = 31.

Answer: 31

Count the true rows

How many rows of a truth table make a formula true.

  1. ∧ (and) needs both sides true; ∨ (or) needs at least one; ¬ (not) flips true and false.
  2. → (if … then) is false only when the left is true and the right false.
  3. Count the true rows, or count the false ones and subtract from the total.
worked example

Example: How many of the 8 rows of the truth table make p → (q ∧ r) true? Key: ∧ means and, → means if … then.

  1. False only when p is true and q ∧ r is false.
  2. p true: 4 rows, and q ∧ r is false in 3 of them.
  3. 8 − 3 = 5.

Answer: 5

Tips by skill

  • TipOverlapping groups: Add the two groups and subtract the overlap once. Neither is the total minus that.
  • TipCounting subsets: Each element is in or out: 2 to the power n. Subtract 1 for non-empty; use C(n, k) for a fixed size.
  • Tip“If … then”: Swap the two parts and negate both. That version, the contrapositive, always means the same as the original.
  • TipTruth-table rows: Go row by row. → is false only when the left side is true and the right side false.

Watch out for

  • Forgetting to take off the overlap, so the people in both groups count twice.
  • Doubling n instead of raising 2 to the power n. A set of 7 has 128 subsets, not 14.
  • Taking the converse as the same statement. Wet ground doesn’t prove rain; a sprinkler could have done it.
  • Treating → as false whenever its left side is false. With a false left side, "if … then" is true.

skills · practice stats

From rounds of this course only: box, review and test-out answers are left out. Once a skill has 40 tries, it compares your first 20 tries with your last 20.

rest ladder

Win 3 of your last 4 rounds and the course rests. A win is 90% right, within 2× the round's par. Pass the review when it comes back and the next rest is longer.

  1. 1 day
  2. 3 days
  3. 7 days
  4. 14 days
  5. 30 days
  6. 60 days
  7. mastered · every 90 days

your rounds

No rounds yet.