From New Scientist #1347, 3rd March 1983 [link]
The Progressive Party has just chosen its prospective parliamentary candidate for Mudbridge North. Six persons were short-listed, and, having duly confided their belief in peace, progress and plenty, were voted upon by the members present. The members have been tight-lipped about the voting figures but the candidates more (apparently) forthcoming. Tabulated below are the votes which the candidates (listed down the left) allege were got by various candidates (listed across the top). For instance D says that F scored 10. You will need to know, however, that there were three candidates of each sex, that each has overstated the votes for anyone of his or her own sex and understated those for anyone of the other sex, and that the same number of votes was cast in total for men as for women. Can you reveal the true voting figures?
[enigma201]
This puzzle is somewhat similar to Enigma 70, so I re-used the [[
Interval()
]] class I wrote for that puzzle in this one.This Python code runs in 38ms.
Solution: The actual voting figures are: A=7, B=12, C=8, D=9, E=5, F=9.
A, D and F are the same gender, and have 25 votes between them. And B, C and E are the other gender, and also have 25 votes between them.