Beruflich Dokumente
Kultur Dokumente
A drawer in a dark room contains red socks, green socks, and blue socks. How many socks must you withdraw to be sure that you have a matching pair? A 1st sock 2nd sock 3rd sock 4th sock f B red green blue
If n pigeons fly into k pigeonholes with k < n, then some pigeonhole contain at least two pigeons.
If n pigeons fly into k pigeonholes with k < n, then some pigeonhole contain at least two pigeons. We can use this simple little fact to prove complex things.
Examples
Among any group of 367 people, there must be at least two with the same bday, because there are only 366 possible bdays.
In a group of 27 English words, there must be at least two that begin with the same letter because there are 26 letters in the English alphabet.
Examples
Show that in any set of six classes, each meeting regularly once a week on a particular day of the week, there must be two that meet on the same day, assuming that no classes are held in weekends.
Pigeons: There are six classes. Pigeonholes: There are five days on which classes may meet. Each class must meet on a day (each pigeon must occupy a pigeonhole). By the pigeonhole principle at least one day must contain at least two classes.
Examples
A drawer contains a dozen brown socks and a dozen black socks, all unmatched. A man takes socks out at random in the dark. How many socks he must take out to be sure that he has at least two socks of the same color? How many socks he must take out to be sure that he has at least two black socks?
Next
Counting Permutations Combinations Binomial coefficients
A chess problem
In how many different ways can we place a pawn (p), a knight (k), and a bishop (b) on a chessboard so that no two pieces share a row or a column?
k p b b p k
Permutations
Five athletes (Carole, Bob, Mark, Kelly and John) compete in an Olympic event. Gold, silver and bronze medals are awarded: in how many ways can the awards be made? Order matters!!! The case that Carole wins gold and Bob wins silver is different from the case Bob wins gold and Carole wins silver.
Permutations
If r objects are selected from a set of n objects, any particular arrangement of these r objects (say, in a list) is called a permutation. In other words, a permutation is an ordered arrangement of objects. Let S = {a, b, c}
c, b, a is a permutation of S b, c, a is a different permutation of S
Permutations
An r-permutation is an ordered arrangement of r elements of the set A, 5, 7, 10, K is a 5-permutation of the set of cards. The number of r-permutations of a set of n elements is denoted by P(n, r). Let S = {a, b, c}. The 2-permutation of S are the ordered arrangements:
a, b; a, c; b, a; b, c; c, a; c, b
There are six 2-permutation of a set of 3 elements. P(3, 2) = 6;
Permutations
An r-permutation is an ordered arrangement of r elements of the set A, 5, 7, 10, K is a 5-permutation of the set of cards. The number of r-permutations of a set of n elements is denoted by P(n, r). Let S = {a, b, c}. The 2-permutation of S are the ordered arrangements:
a, b; a, c; b, a; b, c; c, a; c, b
There are six 2-permutation of a set of 3 elements. P(3, 2) = 6;
Permutations
Number of poker hands (5 cards): P (52,5) = 52 51 50 49 48 = 311875200 THEOREM 1 If n is a positive integer and r is an integer with 1 r n, then there are
P ( n,r) = n ( n 1) ( n 2) ( n r + 1)
Permutations
THEOREM 1 If n is a positive integer and r is an integer with 1 r n, then there are
P ( n,r) = n ( n 1) ( n 2) ( n r + 1)
Permutations
COROLLARY 1: If n and r are integers with 0 r n, then
P ( n,r) =
n! (n r)!
Permutation calculation
Background: Factorial notation 1! = 1; 2! = 21 = 2 ; 3! = 321 = 6 In general, n!= n(n-1)(n-2) 321 for any positive integer n. It is customary to let 0! = 1 by definition. Calculation of permutation
Permutations
P(n, 0): There is only one ordered arrangement of zero objects, the empty set. n! n! P ( n,0) = = =1 (n 0)! n! P(n, 1): There are n ordered arrangements of one object. n! P ( n,1) = =n (n 1)! P(n, n): There are n! ordered arrangements of n distinct objects (product rule)
P ( n,n ) = n! = n! (n n )!
Examples
Five athletes (Carole, Bob, Mark, Kelly and John) compete in an Olympic event. Gold, silver and bronze medals are awarded: in how many ways can the awards be made?
The number of different ways to award the medals is the number of 3-permuations of a set with 5 elements. Hence, there are P(5, 3) = 543 = 60 possible ways to award the medals.
Examples
How many ways are there for 5 people in this class of 27 students to give presentations?
P(27,5) = 2726252423 = 9,687,600 Note that the order they go in does matter in this example!
Examples
How many permutations of the letters ABCDEFGH contain the string ABC?
Because the letters ABC must occur as a block, we need to find the number of permutations of 6 objects, no 8 (i.e. ABC, D, E, F, G, H). Because these six objects can occur in order, there are 6! = 720 permutations of the letters ABCDEFGH in which ABC occurs as a block.
Combinations
What if order doesnt matter? In poker, the following two hands are equivalent: A, 5, 7, 10, K K, 10, 7, 5, A
Combinations
A combination is the same as a subset. When we ask for the number of combinations of r objects chosen from a set of n objects, we are simply asking: How many different subsets of r objects can be chosen from a set of n objects? NOTE: The order doesnt matter!
Combinations
A r-combination of elements of a set is an unordered selection of r elements from the set. Let S = {1, 2, 3, 4, 5}
Then {1, 3, 4} is a 3-combination from S. The number of r-combinations of a set of n elements is denoted by C(n, r). NOTE C(n, r) is also denoted by n and is called a binomial r coefficient.
Combinations
THEOREM 2: The number of r-combinations of a set with n elements, where n is a nonnegative integer and r is an integer with 0 r n, equal
C ( n,r) =
Combinations
For each combination, there are r! ways to permute the r chosen object. C(n, r) r! = P(n, r)
Examples
How many different poker hands are there (5 cards)?
In how many ways a committee of five can be selected from among the 80 employees of a company?
Combinations simplification
COROLLARY Let n and r be nonnegative integers with r n. Then C(n, r) = C(n, n r).
proof Form the theorem 2
and
Combinations
C(n, 0): There is only one way to chose 0 objects from the n objects
C ( n,0) = n! =1 0!( n 0)!
C(n, n): There is only one way to select n objects from n objects, and that is to choose all the objects n! C ( n,n ) = =1 n!( n n )!
Combinatorial proof
A combinatorial proof is a proof that uses counting arguments to prove a theorem Rather than some other method such as algebraic techniques Essentially, show that both sides of the proof manage to count the same objects. Proof outline: Define a set S
Show that |S| = n by counting one way. Show that |S| = m by counting another way. Conclude that n = m
Permutations or Combinations ?
The distinction between permutations and combinations lies in whether the objects are to be merely selected or both selected and ordered. If ordering is important, the problem involves permutations; if ordering is not important the problem involves combinations.
You want to count the number of Subsets of an n-element set Outcomes of successive events Outcome of disjoint events Outcomes given specific choices at each step Elements in overlapping sections of related sets Ordered arrangements of r out of n distinct objects Ways to select r out of n distinct objects
Technique to try Use formula 2n Multiply the number of outcomes for each event Add the number of outcomes for each event Draw a decision tree and count the number of paths Use principle of inclusion and exclusion formula Use P(n,r) formula Use C(n,r) formula
Binomial coefficients
Counting gives insight into one of the basic theorems of algebra. A binomial is a sum of two terms, e.g. a + b
Consider (a + b)4:
Binomial coefficients
Consider (a + b)4:
There are 24 terms, The numbers of terms with k copies of b and n k copies of a is:
n n! = k!( n k )! k
Lets group equivalent terms: aaab = aaba = abaa = baaa
The coefficient of a n k b k is n k
For n = 4
4
4 4 4 4 4 a 4 b 0 + a 3b1 + a 2b 2 + a1b 3 + a 0b 4 (a + b) = 1 0 2 3 4
Binomial theorem
THEOREM Let a and b be variables, and let n be a nonnegative integer. Then
(a + b)
n n k k = a b k =0 k
n
proof