Sunday Times Teaser 2751 – Red Handed
by Andrew Skidmore
Published: 14 June 2015 (link)
I removed an even number of red cards from a standard pack and I then divided the remaining cards into two piles. I drew a card at random from the first pile and it was black (there was a whole-numbered percentage chance of this happening). I then placed that black card in the second pile, shuffled them, and chose a card at random from that pile. It was red (and the percentage chance of this happening was exactly the same as that earlier percentage).
How many red cards had I removed from the pack?
One Comment
Leave one →
-
Brian Gladman permalink123456789101112131415161718192021# the number of black cards in pile onefor b1 in range(1, 26):# the number of black cards in pile twob2 = 26 - b1# the number of red cards removedfor r in range(2, 26, 2):# the number of red cards in pile onefor r1 in range(1, 26 - r):# the number of red cards in pile twor2 = 26 - r - r1# calculate the black card probability for pile onep1, q1 = divmod(100 * b1, r1 + b1)# calculate the red card probability for pile two# after adding an additional black card to itp2, q2 = divmod(100 * r2, r2 + b2 + 1)# these must be equal to the same integer percentageif q1 == q2 == 0 and p1 == p2:fs = '{} red cards are removed - piles (red, black): {}, {}'print(fs.format(r, (r1, b1), (r2, b2)))