Teaser 2504: [Hidden crosses]
From The Sunday Times, 19th September 2010 [link] [link]
Here are 18 black cards and there is a cross on the back of some of them.
The clue in any gap indicates how many crosses there are on cards that are adjacent to that gap.
How many black cards have a cross on them?
This puzzle was originally published with no title.
[teaser2504]

Jim Randell 9:50 am on 25 February 2025 Permalink |
Here is a solution using the [[
SubstitutedExpression]] solver from the enigma.py library.It runs in 80ms. (And the internal runtime of the generated program is just 53µs).
Solution: 10 of the black cards have a cross on them.
There are 4 possible arrangements, that can be summarised as follows:
8 of the crosses are marked X, and the remaining 2 crosses appear in squares marked a and b.
LikeLike
ruudvanderham 12:26 pm on 1 March 2025 Permalink |
import itertools def s(*args): return sum(a[arg] for arg in args) for a in itertools.product((0, 1), repeat=18): if ( s(2, 5) != 0 and s(0, 3, 6) == 1 and s(1, 3, 4, 7) > 2 and s(2, 4, 5, 8) < 2 and s(4, 7, 8, 10) != 1 and s(8, 10, 11, 14) > 1 and s(9, 12, 13, 15) > 2 and s(10, 13, 14, 16) != 3 and s(12, 15) != 2 and s(14, 16, 17) == 1 ): print(a, sum(a))LikeLike