1 binomial coefficients cs/apma 202 rosen section 4.4 aaron bloomfield
TRANSCRIPT
11
Binomial CoefficientsBinomial Coefficients
CS/APMA 202CS/APMA 202
Rosen section 4.4Rosen section 4.4
Aaron BloomfieldAaron Bloomfield
22
Binomial CoefficientsBinomial Coefficients
It allows us to do a quick expansion of It allows us to do a quick expansion of ((xx++yy))nn
Why it’s really important:Why it’s really important:
It provides a good context to present It provides a good context to present proofsproofs Especially combinatorial proofsEspecially combinatorial proofs
33
Let Let nn and and rr be non-negative integers with be non-negative integers with rr ≤ ≤ nn. Then . Then CC((nn,,rr) = ) = CC((nn,,n-rn-r))
Or, Or,
Proof (from last slide set):Proof (from last slide set):
! )()!(
!),(
rnnrn
nrnnC
)!(!
!
rnr
n
)!(!
!),(
rnr
nrnC
Review: corollary 1 Review: corollary 1 from section 4.3from section 4.3
rn
n
r
n
44
Review: combinatorial proofReview: combinatorial proof
A A combinatorial proofcombinatorial proof is a proof that uses is a proof that uses counting arguments to prove a theorem, counting arguments to prove a theorem, rather than some other method such as rather than some other method such as algebraic techniquesalgebraic techniques
Essentially, show that both sides of the Essentially, show that both sides of the proof manage to count the same objectsproof manage to count the same objects Usually in the form of an English explanation Usually in the form of an English explanation
with supporting formulaewith supporting formulae
55
Polynomial expansionPolynomial expansion
Consider (Consider (xx++yy))33::Rephrase it as:Rephrase it as:
When choosing When choosing xx twice and twice and yy once, there are once, there are C(3,2) = C(3,1) = 3 ways to choose where the C(3,2) = C(3,1) = 3 ways to choose where the xx comes fromcomes fromWhen choosing When choosing xx once and once and yy twice, there are twice, there are C(3,2) = C(3,1) = 3 ways to choose where the C(3,2) = C(3,1) = 3 ways to choose where the yy comes fromcomes from
32233 33)( yxyyxxyx
32222223))()(( yxyxyxyyxyxyxxyxyxyx
66
Polynomial expansionPolynomial expansion
ConsiderConsider
To obtain the To obtain the xx55 term term Each time you multiple by (Each time you multiple by (xx++yy), you select the ), you select the xx Thus, of the 5 choices, you choose Thus, of the 5 choices, you choose xx 5 times 5 times
C(5,5) = 1C(5,5) = 1 Alternatively, you choose Alternatively, you choose yy 0 times 0 times
C(5,0) = 1C(5,0) = 1
To obtain the To obtain the xx44yy term term Four of the times you multiply by (Four of the times you multiply by (xx++yy), you select the ), you select the xx
The other time you select the The other time you select the yy Thus, of the 5 choices, you choose Thus, of the 5 choices, you choose xx 4 times 4 times
C(5,4) = 5C(5,4) = 5 Alternatively, you choose Alternatively, you choose yy 1 time 1 time
C(5,1) = 5C(5,1) = 5
To obtain the To obtain the xx33yy22 term term C(5,3) = C(5,2) = 10C(5,3) = C(5,2) = 10
Etc…Etc…
543223455 510105)( yxyyxyxyxxyx
77
Polynomial expansionPolynomial expansion
For (For (xx++yy))55
543223455
0
5
1
5
2
5
3
5
4
5
5
5)( yxyyxyxyxxyx
543223455 510105)( yxyyxyxyxxyx
88
Polynomial expansion: Polynomial expansion: The binomial theoremThe binomial theorem
For (For (xx++yy))nn
The book calls this Theorem 1The book calls this Theorem 1
nnnnn yxn
yxn
yxn
nyx
n
nyx 011110
011)(
n
j
jjn yxj
n
0
nnnn yxn
nyx
n
nyx
nyx
n 011110
110
99
ExamplesExamples
What is the coefficient of What is the coefficient of xx1212yy1313 in ( in (xx++yy))2525??
What is the coefficient of What is the coefficient of xx1212yy1313 in (2 in (2xx-3-3yy))2525?? Rephrase it as (2x+(-3y))Rephrase it as (2x+(-3y))2525
The coefficient occurs when The coefficient occurs when jj=13:=13:
300,200,5!12!13
!25
12
25
13
25
25
0
2525 )3()2(25
)3(2j
jj yxj
yx
00,545,702,433,959,763)3(2!12!13
!25)3(2
13
25 13121312
1010
Rosen, section 4.4, question 4Rosen, section 4.4, question 4
Find the coefficient of Find the coefficient of xx55yy88 in ( in (xx++yy))1313
Answer: Answer: 1287
8
13
5
13
1212
Pascal’s IdentityPascal’s Identity
By Pascal’s identity: or 21=15+6By Pascal’s identity: or 21=15+6
Let Let nn and and kk be positive integers with be positive integers with nn ≥≥ kk. . ThenThen
or C(or C(nn+1,+1,kk) = C() = C(nn,,kk-1) + C(-1) + C(nn,,kk))
The book calls this Theorem 2The book calls this Theorem 2We will prove this via two ways:We will prove this via two ways: Combinatorial proofCombinatorial proof Using the formula forUsing the formula for
k
n
k
n
k
n
1
1
5
6
4
6
5
7
k
n
1313
Combinatorial proof of Pascal’s Combinatorial proof of Pascal’s identityidentity
Prove C(Prove C(nn+1,+1,kk) = C() = C(nn,,kk-1) + C(-1) + C(nn,,kk) ) Consider a set T of Consider a set T of nn+1 elements+1 elements
We want to choose a subset of We want to choose a subset of kk elements elements We will count the number of subsets of We will count the number of subsets of kk elements via 2 methods elements via 2 methods
Method 1: There are C(Method 1: There are C(nn+1,+1,kk) ways to choose such a subset) ways to choose such a subset
Method 2: Let Method 2: Let aa be an element of set T be an element of set TTwo casesTwo cases
aa is in such a subset is in such a subsetThere are C(There are C(nn,,kk-1) ways to choose such a subset-1) ways to choose such a subset
aa is not in such a subset is not in such a subsetThere are C(There are C(nn,,kk) ways to choose such a subset) ways to choose such a subset
Thus, there are C(Thus, there are C(nn,,kk-1) + C(-1) + C(nn,,kk) ways to choose a subset of ) ways to choose a subset of kk elementselements
Therefore, C(Therefore, C(nn+1,+1,kk) = C() = C(nn,,kk-1) + C(-1) + C(nn,,kk))
1414
Rosen, section 4.4, question 19: Rosen, section 4.4, question 19: algebraic proof of Pascal’s identityalgebraic proof of Pascal’s identity
k
n
k
n
k
n
1
1
)!)(1()1(
!)1()!1(
)!(*)1()!1(
knknkn
nnn
knknkn
11 nn
)!(!
!
))!1(()!1(
!
)!1(!
)!1(
knk
n
knk
n
knk
n
)!()!1(
!
)!)(1()!1(
!
)!)(1()!1(
!)1(
knkk
n
knknk
n
knknkk
nn
kknknk
n 1
)1(
1
)1(
)1(
11 knkn
)1(
)1(
)1()1(
)1(
knk
kn
knk
k
knk
n
Substitutions:
1515
Privacy policyPrivacy policy From time to time, in order to improve Google From time to time, in order to improve Google
Gulp's usefulness for our users, Google Gulp will Gulp's usefulness for our users, Google Gulp will send packets of data related to your usage of this send packets of data related to your usage of this product from a wireless transmitter embedded in product from a wireless transmitter embedded in the base of your Google Gulp bottle to the the base of your Google Gulp bottle to the GulpPlex™, a heavily guarded, massively parallel GulpPlex™, a heavily guarded, massively parallel server farm whose location is known only to Eric server farm whose location is known only to Eric Schmidt, who carries its GPS coordinates on a 64-Schmidt, who carries its GPS coordinates on a 64-bit-encrypted smart card locked in a stainless-steel bit-encrypted smart card locked in a stainless-steel briefcase handcuffed to his right wrist. No briefcase handcuffed to his right wrist. No personally identifiable information of any kind personally identifiable information of any kind related to your consumption of Google Gulp or any related to your consumption of Google Gulp or any other current or future Google Foods product will other current or future Google Foods product will ever be given, sold, bartered, auctioned off, tossed ever be given, sold, bartered, auctioned off, tossed into a late-night poker pot, or otherwise transferred into a late-night poker pot, or otherwise transferred in any way to any untrustworthy third party, ever, in any way to any untrustworthy third party, ever, we swear. See our Privacy Policy.we swear. See our Privacy Policy.
April Fools Day JokesApril Fools Day Jokes
http://www.google.com/googlegulp/(or do a Google search for ‘gulp’)
1717
Proof practice: corollary 1Proof practice: corollary 1
Let Let nn be a non-negative integer. Then be a non-negative integer. Then
Algebraic proofAlgebraic proof
n
k
n
k
n
0
2
n
k
knk
k
n
0
11
nn )11(2
n
k k
n
0
n
j
jjnn yxj
nyx
0
)(
1818
Proof practice: corollary 1Proof practice: corollary 1
Let Let nn be a non-negative integer. Then be a non-negative integer. Then
Combinatorial proofCombinatorial proof A set with A set with nn elements has 2 elements has 2nn subsets subsets
By definition of power setBy definition of power set
Each subset has either 0 or 1 or 2 or … or Each subset has either 0 or 1 or 2 or … or nn elements elementsThere are subsets with 0 elements, subsets with 1 There are subsets with 0 elements, subsets with 1 element, … and subsets with element, … and subsets with nn elements elements
Thus, the total number of subsets isThus, the total number of subsets is Thus,Thus,
n
k
n
k
n
0
2
nn
k k
n2
0
0
n
n
k k
n
0
1
n
n
n
2121
Proof practice: corollary 2Proof practice: corollary 2
Let Let nn be a positive integer. Then be a positive integer. Then
Algebraic proofAlgebraic proof
This implies that This implies that
n00
n
k
k
k
n
0
0)1(
531420
nnnnnn
n
k
knk
k
n
0
1)1(
n1)1(
kn
k k
n)1(
0
2222
Proof practice: corollary 3Proof practice: corollary 3
Let Let nn be a non-negative integer. Then be a non-negative integer. Then
Algebraic proofAlgebraic proof
n
k
kkn
k
n
0
21
n
k
nk
k
n
0
32
nn )21(3
n
k
k
k
n
0
2
2323
Vandermonde’s identityVandermonde’s identity
Let Let mm, , nn, and , and rr be non-negative integers be non-negative integers with with rr not exceeding either not exceeding either mm or or nn. Then. Then
The book calls this Theorem 3The book calls this Theorem 3
r
k k
n
kr
m
r
nm
0
2424
Combinatorial proof of Combinatorial proof of Vandermonde’s identityVandermonde’s identity
Consider two sets, one with Consider two sets, one with mm items and one with items and one with nn itemsitems
Then there are ways to choose Then there are ways to choose rr items from the union of items from the union of those two setsthose two sets
Next, we’ll find that value via a different meansNext, we’ll find that value via a different means Pick Pick kk elements from the set with elements from the set with nn elements elements Pick the remaining Pick the remaining rr--kk elements from the set with elements from the set with mm elements elements Via the product rule, there are ways to do that for Via the product rule, there are ways to do that for EACHEACH
value of value of kk Lastly, consider this for all values of Lastly, consider this for all values of kk::
Thus, Thus,
r
k k
n
kr
m
r
nm
0
r
nm
k
n
kr
m
r
k k
n
kr
m
0
2525
Review of Rosen, section Review of Rosen, section 4.3, question 11 (a)4.3, question 11 (a)
How many bit strings of length 10 contain How many bit strings of length 10 contain exactly four 1’s?exactly four 1’s? Find the positions of the four 1’sFind the positions of the four 1’s The order of those positions does not matterThe order of those positions does not matter
Positions 2, 3, 5, 7 is the same as positions 7, 5, 3, 2Positions 2, 3, 5, 7 is the same as positions 7, 5, 3, 2 Thus, the answer is C(10,4) = 210Thus, the answer is C(10,4) = 210
Generalization of this result:Generalization of this result: There are C(There are C(nn,,rr) possibilities of bit strings of length ) possibilities of bit strings of length nn
containing containing rr ones ones
2626
Yet another combinatorial proofYet another combinatorial proof
Let Let nn and and rr be non-negative integers with be non-negative integers with rr ≤ ≤ nn. . ThenThen
The book calls this Theorem 4The book calls this Theorem 4
We will do the combinatorial proof by showing We will do the combinatorial proof by showing that both sides show the ways to count bit that both sides show the ways to count bit strings of length strings of length nn+1 with +1 with rr+1 ones+1 ones
From previous slide: achieves thisFrom previous slide: achieves this
n
rj r
j
r
n
1
1
1
1
r
n
2727
Yet another combinatorial proofYet another combinatorial proof
Next, show the right side counts the same objectsNext, show the right side counts the same objectsThe final one must occur at position The final one must occur at position rr+1 or +1 or rr+2 or … or +2 or … or nn+1+1Assume that it occurs at the Assume that it occurs at the kkthth bit, where bit, where rr+1 ≤ +1 ≤ kk ≤ ≤ nn+1+1
Thus, there must be r ones in the first Thus, there must be r ones in the first kk-1 positions-1 positions Thus, there are such strings of length Thus, there are such strings of length kk-1-1
As As kk can be any value from can be any value from rr+1 to +1 to nn+1, the total number +1, the total number of possibilities is of possibilities is
Thus, Thus,
r
k 1
1
1
1n
rk r
k
n
rk r
k
n
rj r
j
n
rj r
j
r
n
1
1
2828
Rosen, section 4.4, question 24Rosen, section 4.4, question 24
Show that if Show that if pp is a prime and is a prime and kk is an integer such that is an integer such that 1 ≤ 1 ≤ kk ≤ ≤ pp-1, then -1, then pp divides divides
We know that We know that pp divides the numerator ( divides the numerator (pp!) once only!) once only
Because Because pp is prime, it does not have any factors less than is prime, it does not have any factors less than pp
We need to show that it does We need to show that it does NOTNOT divide the divide the denominatordenominator
Otherwise the Otherwise the pp factor would cancel out factor would cancel out
Since Since kk < < pp (it was given that k ≤ (it was given that k ≤ pp-1), -1), pp cannot divide cannot divide kk!!Since Since kk ≥ 1, we know that ≥ 1, we know that pp--kk < < pp, and thus , and thus pp cannot cannot divide (divide (pp--kk)!)!Thus, Thus, pp divides the numerator but not the denominator divides the numerator but not the denominatorThus, Thus, pp divides divides
k
p
)!(!
!
kpk
p
k
p
k
p
2929
Rosen, section 4.4, question 38Rosen, section 4.4, question 38
Give a combinatorial proof that if Give a combinatorial proof that if nn is positive is positive integer theninteger then
Provided hint: show that both sides count the Provided hint: show that both sides count the ways to select a subset of a set of ways to select a subset of a set of nn elements elements together with two not necessarily distinct together with two not necessarily distinct elements from the subsetelements from the subset
Following the other provided hint, we express Following the other provided hint, we express the right side as follows: the right side as follows:
2
0
2 2)1(
nn
k
nnk
nk
12
0
2 22)1(
nnn
k
nnnk
nk
3030
Rosen, section 4.4, question 38Rosen, section 4.4, question 38
Show the left side properly counts the Show the left side properly counts the desired propertydesired property
n
k k
nk
0
2
Choosing a subset of k elements from a set of n elements
Consider each of the possible subset sizes k
Choosing one of the k elements in the subset twice
3131
Rosen, section 4.4, question 38Rosen, section 4.4, question 38
Two cases to show the right side: Two cases to show the right side: nn((n-n-1)21)2n-n-22++nn22nn-1-1
Pick the same element from the subsetPick the same element from the subsetPick that one element from the set of Pick that one element from the set of nn elements: total of elements: total of nn possibilities possibilitiesPick the rest of the subsetPick the rest of the subset
As there are As there are nn-1 elements left, there are a total of 2-1 elements left, there are a total of 2nn-1-1 possibilities to pick a given possibilities to pick a given subsetsubset
We have to do bothWe have to do both Thus, by the product rule, the total possibilities is the product of the twoThus, by the product rule, the total possibilities is the product of the two Thus, the total possibilities is Thus, the total possibilities is nn*2*2nn-1-1
Pick different elements from the subsetPick different elements from the subsetPick the first element from the set of Pick the first element from the set of nn elements: total of elements: total of nn possibilities possibilitiesPick the next element from the set of Pick the next element from the set of nn-1 elements: total of -1 elements: total of nn-1 possibilities-1 possibilitiesPick the rest of the subsetPick the rest of the subset
As there are As there are nn-2 elements left, there are a total of 2-2 elements left, there are a total of 2nn-2-2 possibilities to pick a given possibilities to pick a given subsetsubset
We have to do all threeWe have to do all three Thus, by the product rule, the total possibilities is the product of the threeThus, by the product rule, the total possibilities is the product of the three Thus, the total possibilities is Thus, the total possibilities is nn*(n-1)*2*(n-1)*2nn-2-2
We do one or the otherWe do one or the otherThus, via the sum rule, the total possibilities is the sum of the twoThus, via the sum rule, the total possibilities is the sum of the twoOr Or nn*2*2nn-1-1++nn*(n-1)*2*(n-1)*2nn-2-2
32
Quick surveyQuick survey
I felt I understood the material in this I felt I understood the material in this slide set…slide set…
a)a) Very wellVery well
b)b) With some review, I’ll be goodWith some review, I’ll be good
c)c) Not reallyNot really
d)d) Not at allNot at all
33
Quick surveyQuick survey
The pace of the lecture for this The pace of the lecture for this slide set was…slide set was…
a)a) FastFast
b)b) About rightAbout right
c)c) A little slowA little slow
d)d) Too slowToo slow
34
Quick surveyQuick survey
How interesting was the material in How interesting was the material in this slide set? Be honest!this slide set? Be honest!
a)a) Wow! That was SOOOOOO cool!Wow! That was SOOOOOO cool!
b)b) Somewhat interestingSomewhat interesting
c)c) Rather bortingRather borting
d)d) ZzzzzzzzzzzZzzzzzzzzzz