I understand what the pigeonhole principle is.
if there are n pigeons and m holes than at least one hole has more than n/m pigeons.
But how do I show it with specific example?
a.Suppose a programmer wrote 1000 lines of code in 30 days. Show that there must be at least one day when the programmer wrote more than 33 lines of code.
b.If n is a positive integer, how many distinct integers from 0 to 3n must you pick to be sure of getting a multiple of 3 (0 is considered a multiple of 3).
Hint: try it first with n = 1, 2, 3.
edit: for a. I just put
1000=30*33+10
so if all 30 day have 33 lines of code, there are still 10 lines of code to add to one day, therefore at least 1 will be greater than 33.


LinkBack URL
About LinkBacks
