🚀 Alguni Start learning

Unit 27: Collections

Sets, overlaps and counting them.

Unit 27 of 28 in Problem-solving maths for kids. Its 7 lessons are A Bag of Things, Joining and Overlapping, Describing a Set, Three Circles, Sets and Chance, Counting the Subsets and Counting With Circles — below is everything each one explains, and a question or two from it to try.

The answers are marked in the app by value — 1/2, 0.5 and 2/4 all count — and every one is re-derived by sympy before it ships.

This unit opens with a fortnight’s trial of everything — no card needed — or with a family plan, bought in the iPhone app. The first two units of every track are free for ever. Try it in the app.

🎒 A Bag of Things

A set is a collection

A set is just a collection of things, written in curly brackets: {2, 4, 6, 8}.

Two rules make sets simpler than lists. Order does not matter — {1, 2} and {2, 1} are the same set. And repeats do not count — {1, 1, 2} is only {1, 2}.

The number of things in a set is its size.

Inside and underneath

We say 4 is a member of {2, 4, 6}.

A set entirely contained in another is a subset: {2, 4} is a subset of {2, 4, 6}.

And the empty set {} contains nothing at all. It is a subset of absolutely everything, which sounds like a trick and is not.

Try it yourself

How many things are in the set {3, 5, 3, 7, 5, 9}?

Which set is the same as {1, 2, 3}?

  • {3, 2, 1}
  • {1, 2, 3, 4}
  • {1, 2}
  • {1, 1, 2, 3, 3}

Answer them in the app

🔵 Joining and Overlapping

Union and intersection

The union of two sets is everything in either one — {1, 2} ∪ {2, 3} is {1, 2, 3}. The 2 is only written once.

The intersection is only what they share — {1, 2} ∩ {2, 3} is {2}.

And a Venn diagram draws them as two overlapping circles, so you can see both at a glance.

Do not count the overlap twice

In a class of 30, 18 play football and 15 play chess. Adding those gives 33 — more than the class.

The people who do both were counted twice. So:

size of union = size of A + size of B - size of overlap

Here the overlap must be 3, since 18 + 15 - 3 = 30.

Try it yourself

Set A is {1, 2, 3, 4} and B is {3, 4, 5}. How many things are in their union?

With the same two sets, how many things are in their intersection?

Answer them in the app

✍️ Describing a Set

Two ways to say which things

You can list a set: {2, 4, 6, 8}.

Or you can describe it: "the even numbers from 2 to 8". Same set.

Listing is clear but only works when the set is small. Describing works for infinite sets too — "all the whole numbers" cannot be listed, but it can be said in three words.

The families of numbers have names

The number families from unit 8 are sets, and they get short names.

The counting numbers, the integers, the rationals, the reals.

Each sits inside the next, so the integers are a subset of the rationals, which are a subset of the reals. A whole unit of number theory, restated in one sentence of set language.

Try it yourself

How many things are in the set of even numbers from 2 to 20?

How many things are in the set of multiples of 3 from 3 to 60?

Answer them in the app

☘️ Three Circles

Seven regions instead of three

Three overlapping circles cut the picture into seven regions: three for one set only, three for each pair, and one in the very middle for all three.

The safe way to fill it in is from the middle outwards. Put the all-three number in first, then work out each pair by subtracting the middle, then each single by subtracting everything inside it.

Starting from the outside almost always goes wrong.

Inclusion and exclusion, three at a time

With three sets the formula grows: add the three singles, take off the three pairs, then add the middle back.

Why add it back? It was counted three times by the singles and taken off three times by the pairs, leaving nothing. So it needs putting back once.

Add, subtract, add. The pattern continues for four sets and beyond.

Try it yourself

5 children like all three sports. 12 like football and rugby. How many like football and rugby but not the third?

20 like football altogether. 7 like football and rugby only, 4 like football and tennis only, and 5 like all three. How many like football only?

Answer them in the app

🎲 Sets and Chance

Outcomes make a set

Everything that could happen forms a set — the sample space. Rolling a die, that is {1, 2, 3, 4, 5, 6}.

An event is a subset of it. "Even" is {2, 4, 6}.

So probability is the size of the subset over the size of the whole set. Unit 26 was set theory in disguise all along.

Or is union, and is intersection

"Even or over 4" is a union: {2, 4, 6} joined with {5, 6} gives {2, 4, 5, 6} — four outcomes, not five, because 6 appears in both.

"Even and over 4" is an intersection: just {6}.

That is exactly why the "or" rule needed the overlap subtracted in unit 26. Same idea, different vocabulary.

Try it yourself

How many things are in the sample space for one die?

The event "even" has how many things in it?

Answer them in the app

🗃️ Counting the Subsets

In or out, for each thing

To build a subset of {a, b, c}, decide for each item: in or out. Three decisions, two ways each, so 2^3 = 8 subsets.

That includes the empty set (everything out) and the whole set (everything in).

So a set of n things has 2^n subsets. It is the multiplication principle from unit 25, applied to a yes-or-no question.

Two answers to the same question

Count the subsets of a 4-item set two ways.

In or out: 2^4 = 16.
By size: choose(4,0) + choose(4,1) + choose(4,2) + choose(4,3) + choose(4,4) = 1 + 4 + 6 + 4 + 1 = 16.

Both give 16, so a whole row of Pascal’s triangle must add to a power of 2 — proved by counting the same thing twice, exactly as unit 20 suggested.

Try it yourself

How many subsets does a set of 3 things have?

How many subsets does a set of 6 things have?

Answer them in the app

🧮 Counting With Circles

Everything outside

The complement of a set is everything that is *not* in it, out of whatever you are counting from.

If 30 children were asked and 22 like tea, then 8 do not.

Often the complement is far easier to count — the same trick as "at least one" in unit 26.

Try it yourself

Of 40 children, 26 walk to school. How many do not?

How many whole numbers from 1 to 100 are not divisible by 5?

Answer them in the app