![Page 1: PowerPoint Presentationarielpro/15251/Lectures/lecture05.pdfPascal’s triangle 17 1 1 1 1 2 1 1 3 3 1 1 4 6 4 1 1 5 10 10 5 1 1 6 15 20 15 6 1 ... PowerPoint Presentation Author:](https://reader034.vdocument.in/reader034/viewer/2022051811/601c0c839a85030f6d5920e7/html5/thumbnails/1.jpg)
CMU 15-251
Counting II
Teachers:
Victor Adamchik
Ariel Procaccia (this time)
![Page 2: PowerPoint Presentationarielpro/15251/Lectures/lecture05.pdfPascal’s triangle 17 1 1 1 1 2 1 1 3 3 1 1 4 6 4 1 1 5 10 10 5 1 1 6 15 20 15 6 1 ... PowerPoint Presentation Author:](https://reader034.vdocument.in/reader034/viewer/2022051811/601c0c839a85030f6d5920e7/html5/thumbnails/2.jpg)
Shortest paths
2
•
1. 3003
2. 4052
3. 5027
4. 6348
![Page 3: PowerPoint Presentationarielpro/15251/Lectures/lecture05.pdfPascal’s triangle 17 1 1 1 1 2 1 1 3 3 1 1 4 6 4 1 1 5 10 10 5 1 1 6 15 20 15 6 1 ... PowerPoint Presentation Author:](https://reader034.vdocument.in/reader034/viewer/2022051811/601c0c839a85030f6d5920e7/html5/thumbnails/3.jpg)
Bit representation
•
•
o
o
o
o
3
![Page 4: PowerPoint Presentationarielpro/15251/Lectures/lecture05.pdfPascal’s triangle 17 1 1 1 1 2 1 1 3 3 1 1 4 6 4 1 1 5 10 10 5 1 1 6 15 20 15 6 1 ... PowerPoint Presentation Author:](https://reader034.vdocument.in/reader034/viewer/2022051811/601c0c839a85030f6d5920e7/html5/thumbnails/4.jpg)
Bit representation
• 525= 2,598,960
•
⌈log(2,598,960)⌉ = 22
4
0000000000000000000000
0000000000000000000001
0000000000000000000010
0000000000000000000011
![Page 5: PowerPoint Presentationarielpro/15251/Lectures/lecture05.pdfPascal’s triangle 17 1 1 1 1 2 1 1 3 3 1 1 4 6 4 1 1 5 10 10 5 1 1 6 15 20 15 6 1 ... PowerPoint Presentation Author:](https://reader034.vdocument.in/reader034/viewer/2022051811/601c0c839a85030f6d5920e7/html5/thumbnails/5.jpg)
Bit representation
• 221 < 525
5
⌈log 𝑛⌉
![Page 6: PowerPoint Presentationarielpro/15251/Lectures/lecture05.pdfPascal’s triangle 17 1 1 1 1 2 1 1 3 3 1 1 4 6 4 1 1 5 10 10 5 1 1 6 15 20 15 6 1 ... PowerPoint Presentation Author:](https://reader034.vdocument.in/reader034/viewer/2022051811/601c0c839a85030f6d5920e7/html5/thumbnails/6.jpg)
Polynomials as choice trees
•
1 + 𝑥 3
•
1 + 3𝑥 +3𝑥2 + 𝑥3
6
𝑥3 𝑥2 𝑥2 𝑥 𝑥2 𝑥 𝑥 1
1 𝑥
1 𝑥 1 𝑥
1 𝑥 1 𝑥 1 𝑥 1 𝑥
![Page 7: PowerPoint Presentationarielpro/15251/Lectures/lecture05.pdfPascal’s triangle 17 1 1 1 1 2 1 1 3 3 1 1 4 6 4 1 1 5 10 10 5 1 1 6 15 20 15 6 1 ... PowerPoint Presentation Author:](https://reader034.vdocument.in/reader034/viewer/2022051811/601c0c839a85030f6d5920e7/html5/thumbnails/7.jpg)
The binomial formula
• 1 + 𝑥 𝑛 = 𝑐𝑜 + 𝑐1𝑥 +⋯+ 𝑐𝑛𝑥𝑛
• 𝑐𝑘𝑘 𝑥 𝑐𝑘 =
𝑛𝑘
7
1 + 𝑥 𝑛 = 𝑛
𝑘𝑥𝑘
𝑛
𝑘=0
![Page 8: PowerPoint Presentationarielpro/15251/Lectures/lecture05.pdfPascal’s triangle 17 1 1 1 1 2 1 1 3 3 1 1 4 6 4 1 1 5 10 10 5 1 1 6 15 20 15 6 1 ... PowerPoint Presentation Author:](https://reader034.vdocument.in/reader034/viewer/2022051811/601c0c839a85030f6d5920e7/html5/thumbnails/8.jpg)
The binomial formula
8
1 + 𝑥 0 = 1
1 + 𝑥 1 = 1 + 1𝑥
1 + 𝑥 2 = 1 + 2𝑥 + 1𝑥2
1 + 𝑥 3 = 1 + 3𝑥 + 3𝑥2 + 1𝑥3
![Page 9: PowerPoint Presentationarielpro/15251/Lectures/lecture05.pdfPascal’s triangle 17 1 1 1 1 2 1 1 3 3 1 1 4 6 4 1 1 5 10 10 5 1 1 6 15 20 15 6 1 ... PowerPoint Presentation Author:](https://reader034.vdocument.in/reader034/viewer/2022051811/601c0c839a85030f6d5920e7/html5/thumbnails/9.jpg)
The binomial formula
• 𝑥 = 1:
2𝑛 = 𝑛
𝑘
𝑛
𝑘=0
•
𝑛 2𝑛
9
1 + 𝑥 𝑛 = 𝑛
𝑘𝑥𝑘
𝑛
𝑘=0
![Page 10: PowerPoint Presentationarielpro/15251/Lectures/lecture05.pdfPascal’s triangle 17 1 1 1 1 2 1 1 3 3 1 1 4 6 4 1 1 5 10 10 5 1 1 6 15 20 15 6 1 ... PowerPoint Presentation Author:](https://reader034.vdocument.in/reader034/viewer/2022051811/601c0c839a85030f6d5920e7/html5/thumbnails/10.jpg)
The binomial formula
• 𝑥 = −1:
0 = 𝑛
𝑘
𝑛
𝑘=0
−1 𝑘 ⇒ 𝑛
𝑘=
𝑛
𝑘𝑘 𝑘
•
10
1 + 𝑥 𝑛 = 𝑛
𝑘𝑥𝑘
𝑛
𝑘=0
![Page 11: PowerPoint Presentationarielpro/15251/Lectures/lecture05.pdfPascal’s triangle 17 1 1 1 1 2 1 1 3 3 1 1 4 6 4 1 1 5 10 10 5 1 1 6 15 20 15 6 1 ... PowerPoint Presentation Author:](https://reader034.vdocument.in/reader034/viewer/2022051811/601c0c839a85030f6d5920e7/html5/thumbnails/11.jpg)
A combinatorial proof
• 𝑂𝑛 𝐸𝑛𝑛
•
𝑂𝑛 = |𝐸𝑛|
•
•
11
![Page 12: PowerPoint Presentationarielpro/15251/Lectures/lecture05.pdfPascal’s triangle 17 1 1 1 1 2 1 1 3 3 1 1 4 6 4 1 1 5 10 10 5 1 1 6 15 20 15 6 1 ... PowerPoint Presentation Author:](https://reader034.vdocument.in/reader034/viewer/2022051811/601c0c839a85030f6d5920e7/html5/thumbnails/12.jpg)
A combinatorial proof
•
𝑓𝑛: 𝐸𝑛 → 𝑂𝑛 𝑛 ≥ 3?
12
![Page 13: PowerPoint Presentationarielpro/15251/Lectures/lecture05.pdfPascal’s triangle 17 1 1 1 1 2 1 1 3 3 1 1 4 6 4 1 1 5 10 10 5 1 1 6 15 20 15 6 1 ... PowerPoint Presentation Author:](https://reader034.vdocument.in/reader034/viewer/2022051811/601c0c839a85030f6d5920e7/html5/thumbnails/13.jpg)
Pascal’s triangle
13
![Page 14: PowerPoint Presentationarielpro/15251/Lectures/lecture05.pdfPascal’s triangle 17 1 1 1 1 2 1 1 3 3 1 1 4 6 4 1 1 5 10 10 5 1 1 6 15 20 15 6 1 ... PowerPoint Presentation Author:](https://reader034.vdocument.in/reader034/viewer/2022051811/601c0c839a85030f6d5920e7/html5/thumbnails/14.jpg)
Pascal’s triangle
14
0
0
1
0
1
1
2
0
2
1
2
2
3
0
3
1
3
2
3
3
![Page 15: PowerPoint Presentationarielpro/15251/Lectures/lecture05.pdfPascal’s triangle 17 1 1 1 1 2 1 1 3 3 1 1 4 6 4 1 1 5 10 10 5 1 1 6 15 20 15 6 1 ... PowerPoint Presentation Author:](https://reader034.vdocument.in/reader034/viewer/2022051811/601c0c839a85030f6d5920e7/html5/thumbnails/15.jpg)
Pascal’s triangle
15
![Page 16: PowerPoint Presentationarielpro/15251/Lectures/lecture05.pdfPascal’s triangle 17 1 1 1 1 2 1 1 3 3 1 1 4 6 4 1 1 5 10 10 5 1 1 6 15 20 15 6 1 ... PowerPoint Presentation Author:](https://reader034.vdocument.in/reader034/viewer/2022051811/601c0c839a85030f6d5920e7/html5/thumbnails/16.jpg)
Pascal’s triangle
16
1
1 1
1 2 1
1 3 3 1
1 4 6 4 1
1 5 10 10 5 1
1 6 6 1 15 15 20
𝑛𝑘
0
1
2
3
4
5
6
0
1
2
3
4
5
6
![Page 17: PowerPoint Presentationarielpro/15251/Lectures/lecture05.pdfPascal’s triangle 17 1 1 1 1 2 1 1 3 3 1 1 4 6 4 1 1 5 10 10 5 1 1 6 15 20 15 6 1 ... PowerPoint Presentation Author:](https://reader034.vdocument.in/reader034/viewer/2022051811/601c0c839a85030f6d5920e7/html5/thumbnails/17.jpg)
Pascal’s triangle
17
1
1 1
1 2 1
1 3 3 1
1 4 6 4 1
1 5 10 10 5 1
1 6 6 1 15 15 20
𝑛𝑘= 𝑛−1𝑘−1+ 𝑛−1𝑘
𝑛 = 4, 𝑘 = 2
0
1
2
3
4
5
6
0
1
2
3
4
5
6
![Page 18: PowerPoint Presentationarielpro/15251/Lectures/lecture05.pdfPascal’s triangle 17 1 1 1 1 2 1 1 3 3 1 1 4 6 4 1 1 5 10 10 5 1 1 6 15 20 15 6 1 ... PowerPoint Presentation Author:](https://reader034.vdocument.in/reader034/viewer/2022051811/601c0c839a85030f6d5920e7/html5/thumbnails/18.jpg)
Pascal’s triangle
18
1
1 1
1 2 1
1 3 3 1
1 4 6 4 1
1 5 10 10 5 1
1 6 6 1 15 15 20
0
1
2
3
4
5
6
0
1
2
3
4
5
6
𝑛𝑘= 2𝑛−1𝑘 𝑜𝑑𝑑 𝑛 = 4
![Page 19: PowerPoint Presentationarielpro/15251/Lectures/lecture05.pdfPascal’s triangle 17 1 1 1 1 2 1 1 3 3 1 1 4 6 4 1 1 5 10 10 5 1 1 6 15 20 15 6 1 ... PowerPoint Presentation Author:](https://reader034.vdocument.in/reader034/viewer/2022051811/601c0c839a85030f6d5920e7/html5/thumbnails/19.jpg)
Pascal’s triangle
19
1
1 1
1 2 1
1 3 3 1
1 4 6 4 1
1 5 10 10 5 1
1 6 6 1 15 15 20
𝑛𝑘
2𝑛𝑘=0 = 2𝑛
𝑛𝑛 = 3
𝑛, 𝑘
0
1
2
3
4
5
6
0
1
2
3
4
5
6
![Page 20: PowerPoint Presentationarielpro/15251/Lectures/lecture05.pdfPascal’s triangle 17 1 1 1 1 2 1 1 3 3 1 1 4 6 4 1 1 5 10 10 5 1 1 6 15 20 15 6 1 ... PowerPoint Presentation Author:](https://reader034.vdocument.in/reader034/viewer/2022051811/601c0c839a85030f6d5920e7/html5/thumbnails/20.jpg)
Pascal’s triangle
• 𝑖𝑘
𝑛𝑖=𝑘 =?
1.𝑛+1𝑘
2.𝑛𝑘+1
3.𝑛+1𝑘+1
4.2𝑛𝑘
20
1
1 1
1 2 1
1 3 3 3
1 4 6 4 1
1 5 10 10 5 1
1 6 6 1 15 15 20
0
1
2
3
4
5
6
0
1
2
3
4
5
6
𝑘 = 2, 𝑛 = 5
![Page 21: PowerPoint Presentationarielpro/15251/Lectures/lecture05.pdfPascal’s triangle 17 1 1 1 1 2 1 1 3 3 1 1 4 6 4 1 1 5 10 10 5 1 1 6 15 20 15 6 1 ... PowerPoint Presentation Author:](https://reader034.vdocument.in/reader034/viewer/2022051811/601c0c839a85030f6d5920e7/html5/thumbnails/21.jpg)
proofs from the book
•
•
•
•
21
![Page 22: PowerPoint Presentationarielpro/15251/Lectures/lecture05.pdfPascal’s triangle 17 1 1 1 1 2 1 1 3 3 1 1 4 6 4 1 1 5 10 10 5 1 1 6 15 20 15 6 1 ... PowerPoint Presentation Author:](https://reader034.vdocument.in/reader034/viewer/2022051811/601c0c839a85030f6d5920e7/html5/thumbnails/22.jpg)
What we have learned
•
o
o
•
o
o
22