### Random Post

### Recent Posts

### Recent Comments

### Archives

### Categories

- article (11)
- enigma (1,115)
- misc (2)
- project euler (2)
- puzzle (29)
- site news (43)
- tantalizer (29)
- teaser (3)

### Site Stats

- 166,357 hits

Programming Enigma Puzzles

3 July 2017

Posted by on **From New Scientist #2264, 11th November 2000** [link]

George was nominated for president of the Golf Club. There was only one other candidate, and the president was elected by a simple ballot of the 350 members, not all of whom in fact voted.

The ballot papers were taken from the ballot box one at a time and placed in two piles — one for each candidate — with tellers keeping a count on each pile.

George won (what did you expect?), and furthermore his vote was ahead of his opponent’s throughout the counting procedure.

“That must be a one-in-a-million chance,” said the demoralised loser.

“No,” said George. “Now that we know the number of votes we each received, we can deduce that the chance of my leading throughout the count was exactly one in a hundred.”

How many members did not vote?

[enigma1108]

Advertisements

%d bloggers like this:

See also:

Enigma 1465.We can consider the vote counting as path going from

(0, 0)to(a, b)(whereaandbare the number of votes for each candidate).This Python program constructively counts the possible paths. It runs in 389ms.

Solution:150 membersdid notvote in the election.The only possible scenario is that George received 101 votes, and his opponent received 99 votes. So 200 of 350 members voted.

Analytically, if George got

avotes and his opponent gotbvotes then the number of different ways that the votes can be counted is:And the number of ways they can be counted such that George is always ahead is:

(See: [ https://en.wikipedia.org/wiki/Catalan%27s_triangle ]).

We are interested in when the ratio of these two terms is 100:1. i.e. when:

From which we see the solution is

a= 101,b= 99 asa + b< 350.In this case the numbers involved are quite large:

This solution is essentially the same as that given above by Jim. I could have combined the two path functions (as Jim does) but I found that it ran faster when they were kept separate. I also think it is a bit easier to understand these functions when they are kept separate.