# Enigmatic Code

Programming Enigma Puzzles

## Enigma 404: Regular timepiece

From New Scientist #1554, 2nd April 1987 [link]

My daughter has a regular hexagonal clock without numerals, as illustrated. I tried to fool her recently by rotating it and standing it on a different edge, but she recognised that the hands did not look quite right.

On the other hand, my son, has a clock on a regular polygon, again without numerals, which I can stand on any different edge and make the clock show the wrong time with its hands in apparently legitimate positions.

How many edges does this regular polygon have?

[enigma404]

### One response to “Enigma 404: Regular timepiece”

1. Jim Randell 7 July 2017 at 8:51 am

If we consider when the two hands are superimposed, there are 11 times that this occurs during the 12 hour period of the clock (see Enigma 1761). So if the clock is showing 12:00, then by placing it on any of the other sides it should read one of the remaining 10 valid superimposed times. So:

Solution: The clock has 11 sides.

The clock is a regular hendecagon.

Here’s a program that verifies that n=11 is the solution. It runs in 59ms.

```from fractions import Fraction as F
from itertools import count
from enigma import printf

# is this a valid time?
# h, m are positions of hands as fractions of the face
def is_valid(h, m):
# position of minute hand should match that deduced from the hour hand
return m == (12 * h) % 1

for n in count(3):
f = F(1, n)
if is_valid(f, f):
printf("n={n}")
break
```