There are 50 cards in a box, each having a distinct integer (from 1 to 50) written on it, i.e. all the cards initially have different numbers-- the smallest being 1 and the biggest is 50. Now, we randomly select two cards from the box, read the numbers on them, calculate the absolute value of the difference of the two numbers, replace the number written on the first card with this absolute value, and place the first card (which is over-written just now) back into the box again, and discard the second card. Thus the process not only changes the number written on a card, but also reduces the total number of cards by 1 in the box. We keep on doing this untill only 1 card is left in the box. Can you find out if the integer written on the last card is odd or even ? Will the answer differ if we started the problem with 55 cards ?
18-Ans- Suppose, initially there are N cards, thus the summation of all the numbers on those cards will be N(N + 1)/2.
Now, suppose at the first step we pick two cards where the bigger number is A and the other one is B, hence we calculate the difference as (A - B), write it on the first card, discard the other card, and put the first card back into the box.
Now, the summation of all the numbers in the box will be : [Now 49 cards remain in the box]
[N(N + 1)/2] - A - B + (A - B)
= [N(N + 1)/2] - 2B
After that, suppose the numbers on the two cards we picks in the second step are C and D, where C >= B.
Here also we do the same operation, and the summation of all the cards after this step will be : [Now 48 cards remain in the box]
[N(N + 1)/2] - 2B - C - D + (C - D)
= [N(N + 1)/2] - 2B - 2D
= [N(N + 1)/2] - 2(B + D)
Similarly, it can be shown that after every step the summation of all the remaining cards will be [N(N + 1)/2] - 2K, where K is an integer.
Hence, whether the last remaining card will have an ODD number or an EVEN number, that completely depends on the term [N(N + 1)/2].
Here if we put N=50 , the term [N(N + 1)/2] becomes odd, thus the last card will have a (odd - even) ODD number.
But, if we put N=55 , the term [N(N + 1)/2] becomes even, thus the last card will have a (even - even) EVEN number.