### Random Post

### Recent Posts

### Recent Comments

### Archives

### Categories

- article (11)
- enigma (1,393)
- misc (4)
- project euler (2)
- puzzle (90)
- puzzle# (61)
- site news (62)
- tantalizer (105)
- teaser (7)
- today (1)

### Site Stats

- 244,211 hits

Programming Enigma Puzzles

13 August 2015

Posted by on **From New Scientist #1450, 4th April 1985** [link]

The Puzzlers’ Union has just finished electing a new Grand Enigma, as its union president is called. Hook, Line and Sinker were the three candidates. Each canvassed shamelessly, and each arrived at the count expecting to receive 79 votes. As the total possible number of votes cast was, in fact, precisely 100, each was in for a surprise.

The Puzzlers’ Union has eight branches, all of different sizes and none of less than three members. Each branch made whatever promises it saw fit and, indeed, cast its votes

en bloc. But, you may rightly infer, not all branches voted as promised. One branch had rashly pledged itself to all three candidates and then voted for no one. Three branches were pledged to two candidates — a different two in each case — and resolved the dilemma by voting for a third. This manoeuvre benefited Hook most, Line next and Sinker least. One branch promised no one and voted for no one. The remaining three branches were pledged one to Hook, one to Line and one to Sinker; and these pledges were kept in the vote.Precisely how many votes did each candidate actually receive?

In **New Scientist #1454** the following correction to this puzzle was published (I’ve removed the statement of the solution):

Martin Hollis writes: “As set, the puzzle has several solutions. In the first paragraph, 100 should have been given not as the total number of votes cast, but as the total possible. […] My apologies to all.”

I have modified the puzzle above accordingly.

[enigma302]

%d bloggers like this:

This Python 3 program runs in 737ms.

Solution:Hook received 15 votes. Line received 13 votes. Sinker received 11 votes.There is only one decomposition of 100 into 8 distinct numbers greater than 2 that has at least 3 subsets of size 4 that sum to 79. That is:

100 = 3 + 4 + 5 + 6 + 7 + 8 + 9 + 58.

The subsets of size 4 that sum to 79 are:

4 + 8 + 9 + 58 = 79

5 + 7 + 9 + 58 = 79

6 + 7 + 8 + 58 = 79

As there are only three such subsets, each of these corresponds to the pledges for one of Hook, Line and Sinker.

We see that the branch that pledged itself to each candidate, but voted for none is the branch of size 58.

And we see that the branches that pledged to two candidates are the branches of size 9, 8 and 7. So each of these voted for the candidate that they did not pledge to. Hook receiving the most votes, then Line then Sinker.

So the branch of size 9 voted for Hook, the branch of size 8 for Line, and the branch of size 7 for Sinker. So in the list of subsets above the first gives the pledges for Sinker, the second is the pledges for Line and the last one is the pledges for Hook.

The remaining branches – of size 4, 5, and 6 – kept their promises. So the branch of size 4 pledged for Sinker and voted for Sinker, so Sinker received 4 + 7 = 11 votes in total. The branch of size 5 pledged for Line and voted for Line. Line received 5 + 8 = 13 votes in total. The branch of size 6 pledged for Hook and voted for Hook. Hook received 6 + 9 = 15 votes in total.

The branch of size 3 is the one that pledged to no-one and voted for no-one.