Brain-Teaser 888: Master pieces
From The Sunday Times, 13th August 1978 [link]
The artist Pussicatto was exhibiting his new painting. It consisted of a 5-by-5 square of small squares with some of the small squares coloured black and the rest of the small squares coloured white.
The forger Coppicatto sent six of his assistants to make copies of different parts of the painting. They returned with:
Unfortunately five of the assistants could not remember which way up their parts should go, and the other assistant, who gave his part the right way up, had copied the colour of one of the small squares wrongly. However the other five parts did cover the whole of the original painting.
Reproduce the original Pussicatto painting.
This puzzle is included in the book The Sunday Times Book of Brain-Teasers: Book 1 (1980). The puzzle text above is taken from the book.
[teaser888]
Jim Randell 9:35 am on 30 November 2021 Permalink |
Considering the 5 pieces that are correct, but of unknown orientation. The entire painting is covered by these 5. In particular each of the corner sub-squares of the painting must correspond to 4 of the pieces (in some orientation), so we can look for those.
The following Python 3 program runs in 110ms.
Run: [ @replit ]
Solution: The solution is as follows:
There are 9 possible locations for a 3×3 sub-square of the 5×5 square. The 4 corners, the 4 edges, and the central sub-square.
The corners consist of pieces 4, 5, 6, 1 (in suitable orientations), and piece 2 corresponds to the left edge sub-square. The central sub-square correspond to piece 3 (the right way up), except the cell marked “x” is the wrong colour.
Note that each of the pieces 1 – 6 corresponds to a different 3×3 sub-square in the finished painting. If two pieces are allowed to correspond to the same sub-square, then this solution is not unique.
The program produces 2 solutions corresponding to the same diagram. This is because piece 6 is the same when rotated through 180°.
LikeLike
Frits 1:10 pm on 1 March 2024 Permalink |
When looking for similar puzzles to the 1994 IMO C1 question I stumbled upon this puzzle.
@Jim, do you know a more elegant/compact alternative for diff_comb()?
LikeLike