### Random Post

### Recent Posts

### Recent Comments

### Archives

### Categories

- article (11)
- enigma (1,270)
- misc (3)
- project euler (2)
- puzzle (67)
- site news (50)
- tantalizer (69)
- teaser (7)

### Site Stats

- 206,376 hits

Programming Enigma Puzzles

29 August 2018

Posted by on **From The Sunday Times, 12th September 2010** [link]

George has placed two vertical mirrors touching each other, with an angle between them. He has also placed a small cube between the mirrors and counted how many images there are of it in the mirrors. (For example, if the mirrors had 90 degrees between them, there would be three images). He wrote down two whole numbers – the angle between the mirrors, in degrees, and the number of images of the cube. When Martha saw the two numbers, she commented that their product, appropriately, was a perfect cube.

What was the angle between the mirrors?

**Note:** After much discussion of this puzzle, regular solvers of *The Sunday Times Teaser* puzzles have decided that the puzzle is flawed, and there is not enough information given to arrive at a unique solution. Nevertheless the puzzle has some interesting aspects to it.

[teaser2503]

%d bloggers like this:

At the time this puzzle was published in

The Sunday Times(12th September 2010) it caused much discussion on a group dedicated to Sunday Times Teasers. (The discussion is here: [link]). And it was agreed that there was more than one possible answer, and that the published solution was over simplified.I became aware of it when this puzzle surfaced again on the current discussion group for Sunday Times Teasers (which is here: [link]), and posted my thoughts on the subject. Here is a more detailed discussion, (with diagrams):

My experience with previous puzzles involving reflections (like

Enigma 1532) is that rather than think about how the light is reflected by the mirrors, it is easier to think of the mirror as creating a reflected universe on the other side of it, and allowing the light to pass through in a straight line.So, my reasoning is that the mirrors divide a circle into sectors. If we place the mirrors so they enclose the “southern point” of the circle, and place the observer due south of the join, then we can colour the SW enclosed segment red and the SE enclosed segment blue, then we can mirror these red and blue segments in pairs northwards until we reach the “northern point” of the circle. If the mirrored segments don’t fit exactly we have a “partial pair” at the top.

Any point (so I’m considering very small objects) in one of the “real” segments enclosed by the mirrors will be mirrored into all the similarly coloured segments. Whether it appears in a partial segment depends on its position in the “real” segment. So every full red/blue pair has an image of the point in (one is the real point, and the rest are images in the mirrors) that could potentially be seen by an observer, and the point may appear in a partial pair.

In this program the [[

images()]] function calculates the appropriate number of complete mirrored regions, along with a flag indicating if there is an additional partial region, for angles between 1° and 179°. It runs in 69ms.Run:[ @repl.it ]Solution:There are three possible angles: 49°, 108° 125°.So, for a “southern” observer, where the object may be placed anywhere between the mirrors, there are several possible solutions:

In each case there is a partially reflected region (none of the angles exactly divides 360°), so the object will have to be placed appropriately to achieve the desired number of reflections. The 125° solution will be difficult to achieve as the partially reflected area is almost complete, but with a small enough cube it should be possible.

There would be further solutions with a single reflection if the mirrors are allowed to make an angle of 180° or more:

I also wrote a program to actually plot a diagram to illustrate my analysis above:

(The thick black lines represent the mirrors (and their reflections). The lighter coloured sectors of the circle indicate partially reflected regions. The small black dots represent an object and its reflections, situated to provide the desired number of reflected images. I can make the program available if anyone wants to see it).

I also added code to show “sight lines” from the appropriately placed object and its reflections to an observer:

(The lines exiting the bottom of the diagram show the number of images. There is one for the original object, and one for each of the reflections).

The 49° solution:

The 108° solution:

The 125° solution:

This all seems very convincing, but I hadn’t tried it in real life. To this end, I bought some mirrored acrylic sheet and constructed the situations given above in real life:

The 49° solution:

The 108° solution:

The 125° solution:

This confirms the analysis, and each of these situations gives rise to a viable solution. Although in my opinion the 108° solution is the most pleasing.

But having played around with the mirrors, the above analysis seems to work OK if the mirrors are viewed from “due south”, but it is possible to place the object and observer in such a way that we can achieve different numbers of objects than the above analysis suggests (e.g. 3 reflections and an angle of 72° (3 × 72 = 6³), or 4 reflections at an angle of 54° (4 × 54 = 6³)) giving rise to further solutions.

In the general case, where the observer is not necessarily due south, I think the circle is split into the “red sector” to the left of the observer, and the “blue sector” to the right of the observer, and these sectors can then be reflected around the circle until we reach the line that passes from the observer through the join in the mirrors. So without knowing where the observer is it is difficult to determine the exact number of potentially reflected objects (we also have the problem that the observer can be placed such that some of the reflections are not visible – either masked by being in line with another object (real or reflected), or it could fall outside the bounds of the mirror and not be reflected at all.

So the puzzle, as published, seems to be too open ended to allow a single solution.

If the observer and the object are both on the “southern meridian”, then for 49° there will be 6 reflections (not a solution), for 108° there will be 2 reflections (which does give a solution), and for 125° there are also 2 reflections (not a solution). So 108° is still my preferred solution.

The published solution, apparently claimed that: “In general the number of images with angle A is the highest integer less than 360/A”, and so gave an answer 49°. So it seems the setter was taking a somewhat simplified view of the situation.

I reworked my code, so that it allows viewing angles other than from the bisector line between the mirrors.

The following code considers integer mirror angles of between 1° and 179°, and then all viewing angles at half-degree intervals between them. For each mirror angle and viewing angle combination it calculates the number of images (including the original object) for objects placed at half-degree intervals between the mirrors. If the product of the mirror angle and the number of reflections is a perfect cube, a line is printed giving the regions that the object can be placed in to achieve this.

By operating in units of half-degrees we can do all the calculations using integers.

Run time is 1.84s (using PyPy).

Assuming each possible reflection is visible, the following 5 solutions are viable:

The 49° 108° and 125° angles give solutions with a viewing angle of 0°, but 7° and 72° do not.

I have verified these practically (apart from the 7° solution, where the mirrors are too close together).

The 72° solution is interesting because 72 divides 360. Here’s a diagram of it:

And here it is in real life:

And here’s a diagram of the 7° solution (although it’s a bit busy):

For completeness I should also mention that angles of 216° and 343° with 1 reflection are also viable solutions (if angles greater than 180° are allowed).

We can consider a variant on the problem where instead of only counting the number of reflections, we count all the visible objects (i.e. we include the real object as well), and if we restrict the observer to being at 0°, then there is a unique answer of 49°, and this works with the object also placed at 0° (although it can be placed elsewhere). So this is a way of rescuing the puzzle (although it’s probably not what the setter had in mind, as for an angle between the mirrors of 90° there would be 4 visible objects, not just the three reflections).

This variant is easily solved programatically by a program similar to the one I posted above (in [[

images()]] we returnnobjects, instead of(n – 1)).However, even in this variant, if the angle of the observer is allowed to vary, then there are further solutions: