Teaser 2685: Not the Gold Cup
From The Sunday Times, 9th March 2014 [link]
Five horses took part in a race, but they all failed to finish, one falling at each of the first five fences. Dave (riding Egg Nog) lasted longer than Bill whose horse fell at the second fence; Big Gun fell at the third, and the jockey wearing mauve lasted the longest. Long Gone lasted longer than the horse ridden by the jockey in yellow, Chris’s horse fell one fence later than the horse ridden by the jockey in green, but Fred and his friend (the jockey in blue) did not fall at adjacent fences. Nig Nag was ridden by Wally and Dragon’s jockey wore red.
Who was the jockey in yellow, and which horse did he ride?
[teaser2685]
Jim Randell 8:28 am on 29 November 2022 Permalink |
I used the [[
SubstitutedExpression
]] solver from the enigma.py library to assign the fence values (1-5) to the 3 groups of jockeys, horses and colours.The following run file executes in 66ms. (Internal runtime of the generated program is 94µs).
Run: [ @replit ]
We can wrap this in Python code to format the solution in a more friendly form:
Run: [ @replit ]
Solution: Fred was in yellow, riding Big Gun.
The full solution is:
LikeLike