From The Sunday Times, 4th May 1980 [link]
The results of the hands in a bridge tournament were written like this: “Joe Smith, two ♥”. Before I could calculate the scores, my dog tore up the results of the last four players. Fortunately the writing remained legible. By manoeuvring the fragments, and knowing there had been one contract in each suit, and one at each of the one, two, three and four levels, I was able to construct various feasible combinations.
I first tried putting ♦ opposite Ted, Pete and Reg in turn. Ted could have ♦ only when Mr Green had the two contract; Pete only when ♠ were four; and Reg only when Mr Black had the one. Similarly, if Reg or Mr Black had ♣, then Mr Green had four; If Mr White had ♥ or ♣ then Mr Black had the other; if Reg had ♥ then Pete had ♦; if Mr Brown had ♥ then Mr Black had four; if Mr Black had ♥ then Mr Green had two; and if Mr Black didn’t have ♥ then ♠ were in less than four.
Mr Black could have one only when Pete had three ♠; Mr Green could have two only when ♥ were four; Mr Black had four only when Reg had ♦; Mr Green had four only when ♦ were in three; and ♣ could be in three or four only when Reg had ♥.
Finally I noted that Ted and Vic had the same coloured suits whenever I tried putting ♠ with the three, but different coloured suits if Mr White did not have ♥.
Luckily, I then remembered that ♦ had actually been bid at the four level.
What was the suit of the three contract, and what was the full name of the player who bid it?
This puzzle is included in the book The Sunday Times Book of Brainteasers (1994). The puzzle text above is taken from the book.
[teaser928]
Jim Randell 7:46 am on 15 October 2023 Permalink |
This Python program runs in 55ms. (Internal runtime is 806µs).
Run: [ @replit ]
from enigma import (irange, primes, express, diff, cproduct, subsets, flatten, printf) # decompose total <t> into different values from <ns> def decompose(t, ns): if not ns: return for qs in express(t, ns, qs=(0, 1)): yield list(n for (n, q) in zip(ns, qs) if q > 0) # check all odd distances are prime def check(ds): for (i, j) in subsets(irange(len(ds)), size=2): d = sum(ds[i:j + 1]) if d % 2 == 1 and d not in primes: return False return True # consider possible distances from P to B (prime, < 35) for d2 in primes.between(2, 34): # distance from A to P (prime, > 35) d1 = 70 - d2 if d1 not in primes: continue # decompose the distances into individual sections for d2s in decompose(d2, list(primes.between(2, d2 - 1))): max_d = d2s[-1] for d1s in decompose(d1, list(diff(primes.between(2, max_d - 1), d2s))): # construct possible ordered sequences for (s1, s2) in cproduct(subsets(s, size=len, select='P') for s in (d1s, d2s[:-1])): ds = flatten([s1, [max_d], s2]) if check(ds): # output solution printf("{ds}")Solution: The distances between consecutive locks (from A to B) are (in miles): 17, 13, 11, 19, 7, 3.
LikeLike