Brain-Teaser 35: After-lunch golf
From The Sunday Times, 19th November 1961 [link]
Gee and Jay play — for £1 the match, 5s. a hole, and 1s. a stroke — a golf match of nine holes which is decided on the ninth green. Neither takes less than four or more than nine strokes at any hole and the
results vary for every hole.Gee wins five holes and the match, and takes 22s. off his opponent, but had the result at the last hole been reversed he would have lost 10s.
At the eighth hole all the strokes travel an exact number of yards straight towards the pin, but whilst each of Gee’s travels one half the distance of his previous stroke, each of Jay’s goes one quarter the distance of its predecessor.
(i) In how many strokes did Gee complete the round?
(ii) What is the length of the eighth hole?
[teaser35]
Jim Randell 4:31 pm on 13 June 2021 Permalink |
I struggled to find a unique solution for this puzzle, and had to make several assumptions along the way. Maybe I just don’t know enough about golf.
Let’s start by looking at the 8th hole:
If G makes n strokes, and the distance of the final one is x, then the total distance is:
And if J makes m strokes, and the distance of the final one is y, then the total distance is:
So the overall distance of the hole must be some multiple of: lcm(2^n − 1, (4^m − 1) / 3)
The following values work (for holes with a distance of less than 1000 yards):
If we limit the length of a hole we can reduce the possibilities, but even the smallest possible distance (255 yards) has 2 options for the score.
As far as the actual match goes I’m assuming the winner of the match is the player who won the greatest number of individual holes, and the loser pays the winner £1 (= 20s), and for each individual hole the loser of each hole pays the winner 5s, plus 1s per stroke for the difference in strokes.
I further assumed that “the results vary for each hole” mean that no score for any hole is repeated.
We know that G wins 5 holes (including the final hole), and hole 8 is either drawn, or G loses it by 4 strokes.
If the 8th hole is drawn there are 2 possibilities (scores from G’s perspective):
The first gives G a total of 60 strokes, and J a total of 52.
G wins 20 + (5 − 3)×5 + (52 − 60) = 22 shillings.
And if the result of one of G’s wins (on the last hole) was reversed, there would be no winner on holes (each won 4, and 1 was drawn), so the match is drawn, and only money for the number of strokes changes hands. G has a total of 61 strokes, and J a total of 51 strokes, so G loses 10s. (Although I think J could argue that in this case he won the match).
The second gives G a total of 61 strokes, and J a total of 53.
Again, if the result of one of G’s wins is reversed, G’s total goes down by 1 stroke and J’s goes up by 1, so G loses 10s.
So, if we limit the maximum possible distance of a hole to 340 yards, then only the first of these options remains, and gives the solution:
Solution: (i) Gee completed the round in 60 strokes. (ii) The 8th hole was 255 yards long.
Which is the published solution.
LikeLike
Jim Randell 10:35 am on 15 June 2021 Permalink |
Here is a Python program that solves the puzzles according to the assumptions described in my previous comment.
It runs in 86ms.
Run: [ @replit ]
from enigma import irange, subsets, update, lcm, group, unpack, multiset, join, printf # possible strokes per hole strokes = irange(4, 9) # consider the number of strokes on the 8th hole (G=x, J=y) def hole8(): for (x, y) in subsets(strokes, size=2, select="M"): # calculate minimal distance tx = sum(pow(2, n) for n in irange(0, x - 1)) ty = sum(pow(4, n) for n in irange(0, y - 1)) d = lcm(tx, ty) if d < 1000: printf("[hole8: G={x} J={y}; dist = {d}k; Gs={Gs}k Js={Js}k]", Gs=tuple(pow(2, n) * d // tx for n in irange(0, x - 1))[::-1], Js=tuple(pow(4, n) * d // ty for n in irange(0, y - 1))[::-1], ) yield (x, y) # collect hole 8 scores by score score = unpack(lambda x, y: y - x) h8s = group(hole8(), by=score) # collect possible wins/losses scores = group(subsets(strokes, size=2, select="M"), by=score) # calculate the gain for a sequence of holes def gain(hs): # total gain (shillings), difference (in holes) T = d = 0 for x in hs: if x < 0: # G wins the hole T += 5 - x d += 1 elif x > 0: # G loses the hole T -= 5 + x d -= 1 if d > 0: # G wins the match (on holes, not strokes) T += 20 elif d < 0: # G loses the match T -= 20 return T # find scores with stroke differences in ds def complete(ds, ss): if not ds: if len(set(ss)) == len(ss): yield ss else: (k, v) = ds[0] for xs in subsets(scores[k], size=v, fn=list): yield from complete(ds[1:], ss + xs) # output holes and total strokes def output(hs, ss): holes = list() G = J = 0 for (h, (x, y)) in zip(hs, ss): if h > 0: (x, y) = (y, x) holes.append((x, y)) G += x J += y printf("{holes} -> G={G} J={J}", holes=join((f"{x}-{y}" for (x, y) in holes), sep=", ", enc="()")) # G wins 5 holes (including the final one) for Gw in subsets([-1, -2, -3, -4, -5], size=5, select="R"): # G does not win any of the other 4 holes for Gl in subsets([0, 1, 2, 3, 4, 5], size=4, select="R"): # calculate G's winnings hs = list(Gw + Gl) # hole 8 is 0 or -4 if not any(k in hs for k in h8s.keys()): continue w = gain(hs) if w != 22: continue # look for a 9th hole, which if swapped would give -10s for x in set(Gw): hs_ = update(hs, [hs.index(x)], [-x]) w_ = gain(hs_) if w_ != -10: continue # count the scores, and reject any collection that would require a duplicate score s = multiset.from_seq((abs(x) for x in hs)) if any(s.count(k) > len(scores[k]) for k in s.keys()): continue # choose a hole 8 for (i, h8) in enumerate(hs): for s8 in h8s.get(h8, []): # count the remaining scores for ss in complete(list(s.difference([abs(h8)]).items()), [s8]): # output solution (hole 8 first) output([h8] + hs[:i] + hs[i + 1:], ss)The distance for the 8th hole is limited to below 1000 yards, so the program produces two possible answers.
In the output the holes are not listed in play order, rather hole 8 comes first, then the remaining holes, starting with those that G won.
LikeLike
Jim Randell 5:49 pm on 19 June 2021 Permalink |
With Teaser 36 the following was published:
Which I think means we are take it that the result of the eighth hole was a draw, each player taking 4 strokes.
With this additional information we can reduce the number of possible solutions (although we still need to limit the distance of the eighth hole, or the individual strokes, to deduce a unique distance).
LikeLike
Jim Olson 9:14 pm on 13 June 2021 Permalink |
I’m not following the total score for each. If Gee wins the match then he has the lowest total strokes. In the analysis presented Jay should have won the match. It is not determined by the number of holes won. I understand the assumption you made but that is not golf rules.
LikeLike
Jim Randell 11:02 pm on 13 June 2021 Permalink |
I tried various things to try and get a unique solution, and this was the only way I found. Looking on Wikipedia [link] it seemed to be allowed (“match play” vs “stroke play” – I did start off using the latter, but didn’t get anywhere).
I don’t think a modern Teaser puzzle would be published that didn’t have at least a brief description of the scoring system that is to be used. But this one is from 60 years ago.
LikeLike
Jim Olson 2:18 am on 14 June 2021 Permalink |
I agree your interpretation is what the setter had in mind. However, after many years of playing golf In tournaments and at golf clubs the tournament or match was won by the golfer with the lowest number of total strokes. The setter should have made it clear how the scoring for the match winner was to be computed. It would have saved quite a bit of time.
LikeLike