Presentation is loading. Please wait.

Presentation is loading. Please wait.

The Pigeonhole Principle: Selected Exercises. Copyright © Peter Cappello2 The Pigeon-Hole Principle Let k be a positive integer. If k + 1 or more objects.

Similar presentations


Presentation on theme: "The Pigeonhole Principle: Selected Exercises. Copyright © Peter Cappello2 The Pigeon-Hole Principle Let k be a positive integer. If k + 1 or more objects."— Presentation transcript:

1 The Pigeonhole Principle: Selected Exercises

2 Copyright © Peter Cappello2 The Pigeon-Hole Principle Let k be a positive integer. If k + 1 or more objects are placed in k boxes, Then at least 1 box contains 2 or more objects.

3 Copyright © Peter Cappello Exercise 10 Let ( x i, y i ), i = 1, 2, 3, 4, 5, be a set of 5 distinct points with integer coordinates in the xy plane. Show that the midpoint of the line joining at least 1 pair of these points has integer coordinates. (x 1, y 1 ) (x 2, y 2 ) ( (x 1 + x 2 )/2, (y 1 + y 2 )/2 )

4 Copyright © Peter Cappello4 Exercise 10 Solution 1. (x j + x i )/2 is integer if x j & x i are both odd or both even. 2. (y j + y i )/2 is integer if y j & y i are both odd or both even. 3.Put each ordered pair into 2 x 2 = 4 categories: 1.x odd, y odd 2.x odd, y even 3.x even, y odd 4.x even, y even 4.With 5 distinct ordered pairs, at least 1 category has 2 points. A line connecting 2 points in the same category has a midpoint with integer coordinates.

5 Copyright © Peter Cappello5 Exercise 30 Show: If there are 100,000,000 wage earners in the US who earn < $1,000,000, there are 2 with the same income, to the penny. (Assume each wage earners income > 0.)

6 Copyright © Peter Cappello6 Exercise 30 Solution Show that if there are 100,000,000 wage earners in the US who earn < $1,000,000, there are 2 with the same income, to the penny. Solution: 1.Assume that each income is > 0. 2.Denominate the incomes in pennies. 3.The smallest possible income is 1¢. 4.The largest possible income is $999, = 99,999,999¢. 5.Since there are more wage earners (100,000,000) than distinct income values (99,999,999), at least 2 must earn the same income.

7 Copyright © Peter Cappello7 Exercise 40 There are 51 houses on a street. Each house has an integer address between 1000 and 1099, inclusive. Show that at least 2 houses have consecutive addresses.

8 Copyright © Peter Cappello8 Exercise 40 Solution There are 51 houses on a street. Each house has an integer address between 1000 and 1099, inclusive. Show that at least 2 houses have consecutive addresses. Solution: 1.Partition the address space into 50 intervals: [1000, 1001], [1002, 1003], …, [1098, 1099]. 2.Associate each of the 51 addresses with an interval. 3.There are more addresses than intervals. 4.At least 1 interval is associated with 2 distinct addresses.

9 Copyright © Peter Cappello9 End

10 Copyright © Peter Cappello10 20 Find an increasing subsequence of maximal length and a decreasing subsequence of maximal length in the sequence 22, 5, 7, 2, 23, 10, 15, 21, 3, 17. Solution: Brute force. 5, 7, 10, 15, 21 is an increasing subsequence of length 5. 22, 10, 3 is a decreasing subsequence of length 3 (not unique).


Download ppt "The Pigeonhole Principle: Selected Exercises. Copyright © Peter Cappello2 The Pigeon-Hole Principle Let k be a positive integer. If k + 1 or more objects."

Similar presentations


Ads by Google