Tell A to choose secretly any number greater than 5 of count
Tell A to choose secretly any number, greater than 5, of counters, and B to take 3 times as many. Ask A to give 5 counters to B, and then ask B to transfer to A 3 times as many counters as A has left. You may now tell B that he has 20 counters. Explain why this is so and generalize to the case where the 3 and 5 are replaced by p and q
Textbook solution says: In the general case, B ends up with q(p + 1) counters.
How do I get that answer?
Solution
Let A chooses a number x
As per question x>5
=> No.of counters with B = 3*(Number or counters with A)= 3*(x)=3x
Next step, Ask A to give 5 counters to B
=> Number or counters left with A = x-5
=> Number or counters left with B = 3x + 5
Next step, ask B to transfer to A 3 times as many counters as A has left
Number or counters left with A = x-5
number of counters given to A by B = 3(x-5)
=> Number or counters left with A = x-5 + 3(x-5)
=> Number or counters left with B = 3x + 5 - 3(x-5) = 3x + 5 -3x + 15 = 0x + 20 = 20
Hence Prooved that B now has 20 counters
For general case,
Replacing 3 by p and 5 by q
Let A chooses a number x
As per question x>q
=> No.of counters with B = p*(Number or counters with A)= p*(x)=px
Next step, Ask A to give q counters to B
=> Number or counters left with A = x-q
=> Number or counters left with B = px + q
Next step, ask B to transfer to A p times as many counters as A has left
Number or counters left with A = x-q
number of counters given to A by B = p(x-q)
=> Number or counters left with A = x-q + p(x-q)
=> Number or counters left with B = px + q - p(x-q) = px + q -px + pq = 0x + q + qp = q + qp=q(p+1)
Hence Prooved that B now has q(p+1) counters
