### Random Post

### Recent Posts

### Recent Comments

### Archives

### Categories

- article (11)
- enigma (1,609)
- enigma-book-1982 (70)
- misc (5)
- project euler (2)
- puzzle (90)
- puzzle# (173)
- site news (76)
- tantalizer (189)
- teaser (7)
- today (1)

### Site Stats

- 310,316 hits

Programming Enigma Puzzles

10 June 2022

Posted by on **From New Scientist #1819, 2nd May 1992** [link]

In Churchester there are nine churches of the

Angel, of theBell, ofCharity, ofDestiny, ofEndurance, ofFriendship, ofGod, ofHelp and ofInspiration. The map of Chuchester shows the nine square parishes and each has its church at its centre. I can only remember where the church of theAngel and the church ofCharity are:There are nine doves in Churchester and each one visits three churches, flying around in a triangle in a clockwise direction. For example, one dove flies from

Help toBell, toCharity, and then back toHelp again. The routes of the doves areHBC(the one just mentioned),DAF,BGI,GEA,HID,CEF,CAI,BEDandFHG.Complete the map of Churchester.

[enigma664]

%d bloggers like this:

I assigned cartesian coordinates to the churches, we can then calculate the area of the triangles from the coordinates of the vertices. If the area is negative, then the the vertices of the triangle are visited (on the map) in a clockwise order. (See: [@wolfram.com]).

This Python program runs in 65ms. (Internal run time is 3.4ms).

Run:[ @replit ]Solution:The positions of the churches are as shown:This program prints 5 solutions which must be manually checked.

@Frits: When I run this it prints the same thing 5 times. And it is not the answer to the puzzle.

Probably because you are overwriting the same list each time. So you just end up with multiple copies of the final state.

@Jim, I removed my deep copy statement at last minute. I didn’t notice it messed up the output.

Using sols.append([[list(row) for row in m]]) at line 76 the correct data is displayed.