DSCI 220, 2025 W1
November 19, 2025
You have a drawer with:
You pull out socks in the dark, one at a time.
Question: How many socks do you need to pull to guarantee you have a matching pair?
Worst-case sequence:
At this point: no pair yet
So the next sock must match something.
Question:
How many subsets does an \(n\)-element set have?
Try small cases:
Conjecture:
\[
|P(S)| = 2^n
\]
Let \(S\) be an \(n\)-element set.
Choose an element \(a \in S\).
Every subset of \(S\) either:
So:
\[ |P(S)| = |P(S - \{a\})| + |P(S - \{a\})| = 2\cdot |P(S - \{a\})| \]
Claim: For any set \(S\) with \(|S|=n\), \[ |P(S)| = 2^n \]
Base Case: \(n = 0\)
A 0-element set has exactly one subset: \(\{\}\)
And the claim says we should have \(2^0 = 1\).
Inductive Step
Assume that for any \(j<n\), if \(|T|= j\), \(|P(T)| = 2^{j}\)
Then from previous slide:
\[ |P(S)| = 2\cdot |P(S - \{a\})| \]
29 tennis balls are distributed among 4 players.
Claim:
Some player must receive more than 7 balls.
Suppose, for the sake of contradiction, that no player gets more than 7 balls.
Then the maximum total number of balls is:
Simple form:
If more than \(n\) objects are placed into \(n\) boxes,
then there is a box containing at least 2 objects.
General form:
If \(N\) objects are placed into \(k\) boxes,
then there is a box containing at least________ objects.
29 tennis balls, 4 players.
Claim: Among any 7 positive integers,there are 2 whose sum or difference is divisible by 10.
What are the pigeons?
What are the boxes?
Every positive integer has a last digit (i.e., a remainder when divided by 10):
\[ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 \]
We want to detect when a sum or difference is divisible by 10.
Group integers by their last digit:
Place all the elements from either one of the following sets into the boxes.
Does the conjecture appear to be true?
We have:
By the Pigeonhole Principle, some box contains at least 2 of our integers.
Check each box:
In every case,
two numbers in the same box have sum or difference divisible by 10.
Pigeonhole Principle:
If you have too many objects for the number of boxes,
some box must be crowded.
Tennis balls:
“Sum or difference divisible by 10”:
The art is choosing what counts as a box.
Among 40 people, show that two of them must have birthdays that are within 9 days of each other.
Think of the calendar as a long strip of 365 days:
What would happen if we divide the year into blocks _______________?
How many blocks is that?
If the year is divided into 10-day blocks, then:
Number of boxes =
\[
\left\lceil \frac{365}{10} \right\rceil = 37
\]
Number of pigeons = 40 birthdays
By the Pigeonhole Principle,
some block must contain at least 2 birthdays.
If two birthdays lie in the same 10-day block,
their dates differ by at most 9 days.
Therefore:
Among any 40 people, two have birthdays
within 9 days of each other.