### 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

28 June 2017

Posted by on **From New Scientist #1029, 2nd December 1976** [link]

King Ethelweed needed a new champion. So he commanded his three doughtiest knights to appear before him on the first Monday of the new year and bade them fight one another. They fought all day long until the eventide, when the king called a respite and awarded

ducats to the winner,xducats to the second knight andyto the third.z,xandyare positive descending whole numbers.zTo the valiant knights’ dismay, the same happened on the next and each following day, until King Ethelweed at length declared himself satisfied. One each day the same prizes of

,xandywere awarded, the being no ties on any day.zThus it befell that Sir Kay gained the most ducats and became the king’s champion, even though he fared worse on the second day than on the first. Sir Lionel took home twenty ducats in all and Sir Morgan, despite winning top prize on the third day, amassed a mere nine.

Which was the final day and who won how many ducats on it?

[tantalizer478]

Advertisements

%d bloggers like this:

As

x, y, zare decreasing positive integers the smallest possible values they can take on is:x=3, y=2, z=1.And

Mwins the top prize on the third day, but ends up with 9 points, so the maximum value ofxis 9 – 1 – 1 = 7.So there is a relatively small number of

(x, y, z)values to consider.This Python 3 program runs in 64ms.

Solution:On the 5th and final day, Lionel won 5 ducats, Kay won 4 ducats, Morgan won 1 ducat.The full results are:

K only got one 1st place, but the 4 second places (and no last places) gave him the tournament. L got 3 first places, but also one last place (on day 3) which lost him the tournament. M is the clear loser, coming last on 4 of the 5 days.