New Office Hours: M 11:45am - 1:15pm, T 4:45pm - 5+, WF 9:40 - 10:10am, Th 2:30 - 3:15pm, and by appointment.

Thm 2.1.1. Pigeonhole Principle (weak form): If you have n+1 pigeons in n pigeonholes, then at least one pigeonhole with be occupied by 2 or more pigeons.

Thm 2.1.1 If f : A → B is a function and |A| = n + 1, and |B| = n, then f is not 1:1.

Cor: If f : A → B is a function and A is finite and |A| > |B|, then f is not 1:1.

Note that the domain must have more elements then the codomain to guarantee that f is not 1:1 as the following example illus-

trates: id : {1, ..., n} → {1, ..., n}, id(k) = k is 1 : 1.

Recall that the converse of [p implies q] is [q implies p]. Note the converse of a theorem is frequently false as the following example illustrates:

c : {1, ..., n} → {1, ..., n}, id(k) = 1 is not 1 : 1, but domain does not have more elements than the codomain.

f : A → B a function which is not 1:1 does not imply |A| > |B|.

The contrapositive of [p implies q] is [not q implies not p]. The contrapositive of a theorem is true:

Cor: If f : A → B is a function which is 1:1, then |A| ≤ |B|.

Related theorem: Thm AB: Thm 2.1.1 If f : A → B is a function and if |A| = n = |B|, then f is 1:1 iff f is onto.

Application 6: Chinese remainder theorem: Suppose m, n, a, b ∈ Z, (m, n) = 1, 0 ≤ a ≤ m−1, 0 ≤ b ≤ n−1, then ∃x ≥ 0 such that x = pm + a = qn + b for p, q ∈ Z. Moreover can take p ∈ {0, ..., n − 1}. Scratch work: a is the remainder when x is divided by m. b is the remainder when x is divided by n. x = a mod m, x = b mod n. Proof plus thoughts: We need to use the Pigeonhole principle (or related theorem). Thus we need to create objects. We are interested in pm+a for some unknown p ∈ Z. Thus one idea is to create the following objects: O = {a, m + a, 2m + a, ..., (n − 1)m + a}. Note O has distinct objects. We need to create boxes. What else are we interested in? How about remainders? Let r_{k} = the remainder of km + a when divided by n. Properties of r_{k}:

Thm 2.2.1 Pigeonhole Principle (strong form): Let q_{1}, q_{2}, ..., q_{n} be positive integers. If q_{1} + q_{2} + ... + q_{n} − n + 1 objects are put into n boxes, then for some i the ith box contains at least q_{i} objects

Proof Outline:

Cor: Pigeonhole Principle (weak form):

Proof. Let q_{i} = 2 for all i.

Cor: If n(r − 1) + 1 objects are put into n boxes, then there exists a box containing at least r objects.

Proof: Let q_{i} = r for all i. Note nr − n + 1 = n(r − 1) + 1.

Cor A: If m_{i} ∈ Z_{+} and if \frac{m_{1}+...+m_{n}}{n} > r − 1, then there exists an i such that m_{i} ≥ r.

Cor A: If m_{i} ∈ Z_{+} and if \frac{m_{1}+...+m_{n}}{n} ≥ r, then there exists an i such that m_{i} ≥ r.

Lemma B: If \frac{m_{1}+...+m_{n}}{n} < r, then there exists an i s. t. m_{i} < r.

Appl: Suppose you have 20 pairs of shoes in your closet. If you grab n shoes at random, what should n be so that you are guaranteed to have a matching pair of shoes.

Appl: Suppose you have 20 pairs of socks. If you grab n socks at random, what should n be so that you are guaranteed to have a matching pair of shoes.

Appl: Suppose you have 20 pairs of socks. If 7 are black and 13 are white, and if you grab n socks at random, what should n be so that you are guaranteed to have a pair of socks of the same color.

Appl 7: If you have an arbitrary number of apples, bananas and oranges, what is the smallest number of these fruits that one needs to put in a basket in order to guarantee there are at least 8 apples or at least 6 bananas or at least 9 oranges in the basket.