Brainteaser 1805: Find the deuce
From The Sunday Times, 20th April 1997 [link]
Adam, Bill, Charlie and Dave play a game using the ace (counting as 1) and 2 to 10 of spades. These cards are shuffled and placed face down on the table. Each player in turn draws one card and declares whether it is odd or even. Each then in turn draws a further card and must declare a number being either the sum or the product of the two cards held. The winner is the first to deduce which cards remain on the table. They are all perfect logicians, draw every possible inference, and rely on the fact that the others do too.
In a recent game the calls went as follows:
Adam: “odd”
Bill: “odd”
Charlie: “odd”
Dave: “odd”
Adam: “6”
Bill: “12”
Charlie: “15”But as Dave reached for his second card, a player claimed the game.
Who was the winner and where was the 2?
This puzzle is included in the book Brainteasers (2002). The puzzle text above is taken from the book.
[teaser1805]
















Jim Randell 3:34 pm on 7 April 2020 Permalink |
They could just have easily played the game with 10 cards numbered 1 to 10.
There are 5 odd cards (1, 3, 5, 7, 9) and only four players, so no one can win from the first round.
This Python program collects the possible sequences of cards, and then works out it any of the players can determine the cards in the sequence given that they know their own cards. (If you can determine the cards in the sequence, you know which cards remain on the table). And then repeats this until the set of possible sequences remains unchanged (so all deductions have been made). It then moves on to the next play described in the text, with no-one winning until after C has drawn his second card. D is about to draw his second card when someone else claims victory.
This Python program runs in 88ms.
Run: [ @repl.it ]
from enigma import irange, subsets, filter_unique, ordered, intersect, printf # cards cards = set(irange(1, 10)) # collect hand for player k from a sequence of cards def hand(s, k, n=4): return ordered(*(s[i] for i in irange(k, len(s) - 1, step=n))) # find wins from sequences ss def win(ss): r = dict() us = list() # can player k win? for (i, k) in enumerate("ABCD"): (rk, uk) = filter_unique(ss, (lambda s: hand(s, i)), (lambda s: ordered(*s))) if rk: r[k] = rk us.append(uk) # return wins (dict), and sequences that do not give a win (set) return (r, intersect(us)) # analyse sequences ss def analyse(ss): n = len(ss) while True: (r, ss) = win(ss) yield (r, ss) m = len(ss) if m == n: break n = m # play a card for player k, who delares d def play(ss, k, d): for s in ss: for x in cards.difference(s): if x + s[k] == d or x * s[k] == d: yield s + (x,) # the first four plays are all odd cards ss = list(subsets((1, 3, 5, 7, 9), size=4, select="P")) # no-one wins for (r, ss) in analyse(ss): pass # A (player 0) declares 6 ss = list(play(ss, 0, 6)) # no-one wins for (r, ss) in analyse(ss): pass # B (player 1) declares 12 ss = list(play(ss, 1, 12)) # no-one wins for (r, ss) in analyse(ss): pass # C (player 2) declares 15 ss = list(play(ss, 2, 15)) # someone (other than D) wins for (r, ss) in analyse(ss): if r and 'D' not in r: for k in sorted(r.keys()): for v in r[k]: printf("{k} wins: {v}") breakSolution: Charlie won. The 2 remained on the table.
I agree with the published answer, but not with the full solution given at the back of the book.
My solution is that C claims victory and the final situation when C wins is:
It makes sense that C is the one who can claim victory as he could be holding (5, 10) or (7, 8), and only C knows for sure.
The solution given in the book [ link ] says that the final situation when C wins is:
However the first four cards are odd, and if A drew the last remaining odd card, then he would know that the cards that remained on the table at this point were the 5 even cards and would claim victory.
So this cannot be the situation (and given that A did not claim victory as soon as he drew his second card everyone would know that A cannot have 1 and 5 (so must have 3 and 2, or 1 and 6)).
LikeLike
John Crabtree 6:16 am on 10 April 2020 Permalink |
D does not win. Summarizing the successive elimination:
After A’s 2nd call, if A = 1 + 5, A wins. Everybody knows this. This eliminates (a) and (b).
After B’s 2nd call, if B = 3 + 9, B wins. Everybody knows this. This eliminates (c) and (d).
After C’s 2nd call, if D = 1, 5 or 7, D wins. This eliminates (e), (g) and (i).
This leaves two cases, (f) and (h) as noted by Jim.
And so C wins and the 2 is on the table.
It is ironic that the published solution was correct, but for the wrong reasons.
LikeLike