counting Flashcards
THE PIGEONHOLE PRINCIPLE
and prove it:
Another name?
If k is a positive integer and k + 1 or more objects are placed into k boxes, then there is at least one box containing two or more of the objects.
Proof: We prove the pigeonhole principle using proof by contraposition.
Suppose that none of the k boxes contains more than one object. Then the total number of objects would be at most k.
This is a contradiction because there are at least k + 1 objects.
Dirichlet drawer principle
Corollary about functions from pigeonhole Principle:
Proof:
A function f from a set with k + 1 or more elements to a set with k elements is not one-to-one.
Suppose that for each element y in the codomain of f we have a box that contains all elements x of the domain of f such that f(x) = y.
Because the domain contains k + 1 or more elements and the codomain contains only k elements, the pigeonhole principle tells us that one of these boxes contains two or more elements x of the domain.
This means that f cannot be one-to-one.
Show that for every integer n there is a multiple of n that has only 0s and 1s in its decimal expansion.
Let n be a positive integer. Consider the n + 1 integers 1, 11, 111, … , 11 … 1 (where the last integer in this list is the integer with n + 1 1s in its decimal expansion).
Note that there are n possible remainders when an integer is divided by n.
Because there are n + 1 integers in this list, by the pigeonhole principle there must be two with the same remainder when divided by n.
The larger of these integers less the smaller one is a multiple of n, which has a decimal expansion consisting entirely of 0s and 1s.
THE GENERALIZED PIGEONHOLE PRINCIPLE
Proof:
If N objects are placed into k boxes, then there is at least one box containing at least ⌈N∕k⌉ objects.
We will use a proof by contraposition.
Suppose that none of the boxes contains more than ⌈N∕k⌉ − 1 objects. Then, the total number of objects is at most k(⌈N/k⌉− 1)< k((N/k + 1)− 1)= N, where the inequality ⌈N∕k⌉ < (N∕k) + 1 has been used. Thus, the total number of objects is less than N. This completes the proof by contraposition.
How do we solve this common problem:
What is the minimum number of objects such that at least r of these objects must be in one of k boxes when these objects are distributed among the boxes?
When we have N objects, the generalized pigeonhole principle tells us there must be at least r objects in one of the boxes as long as ⌈N∕k⌉ ≥ r.
The smallest integer N with N∕k > r − 1, namely, N = k(r − 1) + 1, is the smallest integer satisfying the inequality ⌈N∕k⌉ ≥ r.
Could a smaller value of N suffice? The answer is no, because if we had k(r − 1) objects, we could put r − 1 of them in each of the k boxes and no box would have at least r objects.
What is a subsequence?
Suppose that a1, a2, … , aN is a sequence of real numbers.
A subsequence of this sequence is a sequence of the form ai1 , ai2, … , aim , where 1 ≤ i1 < i2 < ⋯ < im ≤ N.
Hence, a subsequence is a sequence obtained from the original sequence by including some of the terms of the original sequence in their original order, and perhaps not including other terms.
Theorem of Sequence and Subsequences
Every sequence of n^2 + 1 distinct real numbers contains a subsequence of length n + 1 that is either strictly increasing or strictly decreasing.
Ramsey theory
The final example shows how the generalized pigeonhole principle can be applied to an important part of combinatorics called Ramsey theory, after the English mathematician F. P. Ramsey. In general, Ramsey theory deals with the distribution of subsets of elements of sets.
Ramsey number
The Ramsey number R(m, n), where m and n are positive integers greater than or equal to 2, denotes the minimum number of people at a party such that there are either m mutual friends or n mutual enemies, assuming that every pair of people at the party are friends or enemies.
Example 13 shows that R(3, 3) ≤ 6. We conclude that R(3, 3) = 6 because in a group of five people where every two people are friends or enemies, there may not be three mutual friends or three mutual enemies (see Exercise 28).
Ramsey number properties:
Note that by symmetry it can be shown that
R(m, n) = R(n, m) (see Exercise 32). We also have R(2, n) = n for every positive integer n ≥ 2
(see Exercise 31). The exact values of only nine Ramsey numbers R(m, n) with 3 ≤ m ≤ n are
known, including R(4, 4) = 18. Only bounds are known for many other Ramsey numbers, including R(5, 5), which is known to satisfy 43 ≤ R(5, 5) ≤ 49.
THE PRODUCT RULE
Suppose that a procedure can be broken down into a sequence of
two tasks. If there are n1 ways to do the first task and for each of these ways of doing the first
task, there are n2 ways to do the second task, then there are n1n2 ways to do the procedure.
An extended version of the product rule:
Suppose that a procedure is carried
out by performing the tasks T1, T2, … , Tm in sequence. If each task Ti
, i = 1, 2, … , n, can be
done in ni ways, regardless of how the previous tasks were done, then there are n1 ⋅ n2 ⋅⋯⋅ nm
ways to carry out the procedure. This version of the product rule can be proved by mathematical
induction from the product rule for two tasks
THE SUM RULE
If a task can be done either in one of n1 ways or in one of n2 ways, where
none of the set of n1 ways is the same as any of the set of n2 ways, then there are n1 + n2
ways to do the task.
The product rule is often phrased in terms of sets in this way:
If A1, A2, … , Am are finite
sets, then the number of elements in the Cartesian product of these sets is the product of the
number of elements in each set. To relate this to the product rule, note that the task of choosing an element in the Cartesian product A1 × A2 × ⋯ × Am is done by choosing an element
in A1, an element in A2, … , and an element in Am. By the product rule it follows that
|A1 × A2 × ⋯ × Am| = |A1| ⋅ |A2| ⋅⋯⋅ |Am|.
We can extend the sum rule to more than two tasks. ?
Suppose that a task can be done in one
of n1 ways, in one of n2 ways, … , or in one of nm ways, where none of the set of ni ways of
doing the task is the same as any of the set of nj ways, for all pairs i and j with 1 ≤ i < j ≤ m.
Then the number of ways to do the task is n1 + n2 + ⋯ + nm.
The sum rule can be phrased in terms of sets as:
If A1, A2, … , Am are pairwise disjoint
finite sets, then the number of elements in the union of these sets is the sum of the numbers of
elements in the sets. To relate this to our statement of the sum rule, note there are |Ai
| ways to
choose an element from Ai for i = 1, 2, … , m. Because the sets are pairwise disjoint, when we
select an element from one of the sets Ai
, we do not also select an element from a different set
Aj
. Consequently, by the sum rule, because we cannot select an element from two of these sets
at the same time, the number of ways to choose an element from one of the sets, which is the
number of elements in the union, is
|A1 ∪ A2 ∪ ⋯ ∪ Am| = |A1| + |A2| + ⋯ + |Am| when Ai ∩ Aj = for all i, j.
This equality applies only when the sets in question are pairwise disjoint.
The Subtraction Rule (Inclusion–Exclusion for Two Sets)
If a task can be done in either n1 ways or n2 ways, then the
number of ways to do the task is n1 + n2 minus the number of ways to do the task that are
common to the two different ways.
The subtraction rule is also known as the principle of inclusion–exclusion, especially when
it is used to count the number of elements in the union of two sets.
Because there are |A1 ∪ A2| ways to select an element
in either A1 or in A2, and |A1 ∩ A2| ways to select an element common to both sets, we have
|A1 ∪ A2| = |A1| + |A2| − |A1 ∩ A2|.
The subtraction rule, or the principle of inclusion–exclusion, can be generalized to find the
number of ways to do one of n different tasks or, equivalently, to find the number of elements
in the union of n sets, whenever n is a positive integer
THE DIVISION RULE
Application:
There are n∕d ways to do a task if it can be done using a procedure
that can be carried out in n ways, and for every way w, exactly d of the n ways correspond to
way w.
Remark: The division rule comes in handy when it appears that a task can be done in n different
ways, but it turns out that for each way of doing the task, there are d equivalent ways of doing it. Under these circumstances, we can conclude that there are n∕d inequivalent ways of doing
the task.
restate the division rule in terms of sets:
“If the finite set A is the union of n pairwise
disjoint subsets each with d elements, then n = |A|∕d.”
formulate the division rule in terms of functions:
“If f is a function from A
to B where A and B are finite sets, and that for every value y ∈ B there are exactly d values
x ∈ A such that f(x) = y (in which case, we say that f is d-to-one), then |B| = |A|∕d.”
Tree Diagrams:
A tree consists of a root, a number
of branches leaving the root, and possible additional branches leaving the endpoints of other
branches.
To use trees in counting, we use a branch
to represent each possible choice. We represent the possible outcomes by the leaves, which are
the endpoints of branches not having other branches starting at them.
A permutation of a set of n distinct objects is?
A permutation of a set of n distinct objects is an ordered arrangement of these objects.
r-permutation?
We also are interested in ordered arrangements of some of the elements of a set. An ordered arrangement of r elements of a set is called an r-permutation.
The number of r-permutations of a set with n elements is denoted by P(n, r). We can find P(n, r)
using the product rule.