## Teaser 3009: Head count

**From The Sunday Times, 24th May 2020** [link]

My grandson and I play a simple coin game. In the first round we toss seven coins and I predict how many “heads” there will be whilst my grandson predicts the number of “tails”. After the tossing I score a point for each head plus a bonus of ten if my prediction was correct — my grandson scores likewise for the tails. We then repeat this with six coins, then five, and so on down to a single coin. After each round we keep cumulative totals of our scores. In one game, for over half of the pairs of cumulative scores, my grandson’s total was like mine but with the digits in reverse order. In fact he was ahead throughout and at one stage his cumulative total was double mine — and he had an even bigger numerical lead than that on just one earlier occasion and one later occasion.

List the number of heads in each of the seven rounds.

[teaser3009]

## Jim Randell 11:03 pm

on22 May 2020 Permalink |Originally I missed the significance of the word “numerical”, and got no solutions. But careful interpretation of the puzzle text does lead to a single solution.

I wrote a recursive function that keeps track of all the conditions as it goes along.

The following Python 3 program runs in 320ms.

Run:[ @repl.it ]Solution:The number of heads in each of the rounds was: 0, 2, 4, 4, 3, 1, 1.The full description of the rounds is:

(k = number of coins; h, t = number of heads/tails; H, T = bonus points; a, b = points in round; A, B = cumulative totals)

However, keeping the cumulative totals always using 2 digits gives us three further solutions where the totals 03 and 30 are used as mirrored pairs:

The program will find all 4 solutions if we replace the calls to [[

`nsplit(x)`

]] with [[`nsplit(x, 2)`

]] in the function [[`mirror()`

]] (line 5).LikeLike

## Robert Brown 11:57 am

on24 May 2020 Permalink |Turns out there’s a simple manual solution. After each section (7,6,5 etc) there’s a total sum for all heads & tails. Last digit is different in each case. Adding bonuses makes no difference.

Need to find 4 sections that end in reversible numbers, so just look for reversible pairs where the sum of the pair has the same last digit. Only works for 4 sections, QED.

LikeLike