Download presentation
Presentation is loading. Please wait.
1
The Pigeonhole (Dirichlet’s box) Principle
If you have more pigeons than pigeonholes, when the pigeons fly into the holes at night, at least one hole has more than one pigeon.
2
The Pigeonhole (Dirichlet’s box) Principle
often arises in computer science. For example, collisions are inevitable in a hash table because the number of possible keys exceeds the number of indices in the array. No hashing algorithm, no matter how clever, can avoid these collisions. 3
3
The Pigeonhole Principle
Problem: Prove that there are at least 2 people in Roanoke that have the same number of hairs on their heads. Medical fact: people have up to 150,000 hairs. Census Bureau: Roanoke population is 200,000 4
4
The Pigeonhole Principle
Problem: Prove that there are at least 2 people in Roanoke that have the same number of hairs on their heads. Holes = heads with N hairs, N from 0 to 150,000. Total: 150,001 Pigeons = Roanokeans = 200,000 5
5
The Pigeonhole Principle
Problem: In a box there are 10 black socks and 12 blue socks and you need to get one pair of socks of the same colour. Supposing you can take socks out of the box only once and only without looking, what is the minimum number of socks you'd have to pull out at the same time in order to guarantee a pair of the same color? 6
6
The Pigeonhole Principle
Problem: In a box there are 10 black socks and 12 blue socks and you need to get one pair of socks of the same colour. Supposing you can take socks out of the box only once and only without looking, what is the minimum number of socks you'd have to pull out at the same time in order to guarantee a pair of the same color? Answer: 3. To have at least one pair of the same colour (m = 2 holes, one per colour), using one pigeonhole per colour, you need only three socks (n = 3 pigeons). In this example, if the first and second sock drawn are not of the same colour, the very next sock drawn would complete at least one same colour pair. (m = 2) 7
7
The Pigeonhole (Dirichlet’s box) Principle
If you have more pigeons than pigeonholes, when the pigeons fly into the holes at night, at least one hole has more than one pigeon. Problem: Every point on the plane is coloured either red or blue. Prove that no matter how the colouring is done, there must exist two points, exactly a mile apart, that are the same color. 8
8
The Pigeonhole Principle
Problem: Every point on the plane is coloured either red or blue. Prove that no matter how the colouring is done, there must exist two points, exactly a mile apart, that are the same colour. 3 vertices of an equilateral triangle with the side of 1. Pigeons: Number of vertices: 3 Holes: Number of colours available: 2. 9
9
Pigeonhole Problem Given a unit square, show that if 5 pigeons land anywhere inside or on this square, then two of them must be at most sqrt(2)/2 units apart.
10
Pigeonhole Problem Given a unit square, show that if five points are placed anywhere inside or on this square, then two of them must be at most sqrt(2)/2 units apart. Sqrt(2)/2 11
11
HW highlight
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.