Pigeonhole Principle Problem 3 -- Divisibility and Modular Arithmetic

preview_player
Показать описание

we solve this problem using the Pigeonhole Principle and Modular Arithmetic.
Рекомендации по теме
Комментарии
Автор

You have to distribute 5 integers over 3 boxes, so in your example the third box would hold 2 integers, meaning that you can pick 1 out of every box. So that IS covered by the 2 cases she examines.
But I agree she doesn't explicitly explain why those 2 cases cover every possibility.

To see this, consider that having 0 integers in at least one box implies having at least 3 integers in another box. Having NOT 0 integers in at least one box implies you can pick one from all 3 boxes.

jjjdeste
Автор

One grade in high school are you suppose to learn this?

RemixN
Автор

5 integers: 6, 3, 4, 11, 7

Then we pick 6, 3, 4
Can't be divided by3...

cindychen
Автор

I think the question is not described clearly. Let me rephrase the question. It says given 5 distinct integers, we can pick 3 out of them such that there sum is divisible by 5.
So, we pick all 5 numbers one by one, divide each by 3. Remainder could be either 0, 1 or 2.
Depending on what the remainder is, we assign that number to either box 0, 1 or 2.

Case 1: If there is at least 1 number in each box 0, 1, and 2, then we can pick those numbers, add them and they are divisible by 3.
Case 2: There is one box with no number in it. That means, the 5 numbers are in 2 boxes. That means, one box will sure have 3 numbers in it. If one box has 3 numbers in it, then we can pick those 3 numbers and their sum will be divisible by 3.
Why 3 numbers in one box has sum divisible by 3. Go through each scenario.. you will find it out. For eg.. in box 2, if we have 3 numbers. Then that means... there are 3 numbers when divided by 3 has remainder = 2. We add those 3 numbers, there wont be any remainder when divided by 3 since the remainders 2+2+2 = 6 is divisible by 3.

dorjeetsering
Автор

Wait. You didn't do the case that proves that test wrong: put 1 in one box, and 2 in another box. Now you are stuck with a case that doesn't work at all right?

shadoninja
Автор

Thats really what you take away from this? Seriously?

mnicy