Hello,

to begin a new year, why not play with graphs ? Or rather create games on 
graphs ? I think about 3 examples :

1) eulerian paths. The basic floor would be fl_water and each node of the graph 
would be an island (say fl_sand). The edges of the graph would be made of 
fl_bridge_bw but with it_crack.l on it (LARGE, water). The sides of the bridges 
would be flanked by st_panel to avoid making the level too difficult -I think 
it is not always easy to find an eulerian path, so take care not to fall into 
the water is too much imho). The it_crack makes sure one can use each bridge 
only once. To ensure that one must use the bridge, there would be a row of 
gates somewhere and say a laser: every bridge has in it center a fl_trigger and 
on passing the bridge, the trigger opens one door. Only when all the doors are 
open, can the laser set light on the oxyd stones. An historical example is the 
city of Königsberg but this one ( 4 nodes, 7 edges) is not eulerian, as Euler 
showed in 1741. But in the same article, Euler gave an example of eulerian 
graph, which adjacency matrix is

012122
100012
200101
101010
210101
221010

(this is a multigraph with 6 islands and 15 bridges, 8 of them emanating from 
the first node). The examples given by Euler are all planar multigraphs, I 
propose to stick on these, even if it is possible to implement non planar 
graphs with vorticies.



2) hamiltonian paths. Planar graphs can be implemented with sandy islands 
surrounded by water like the eulerian graph, but this time there is no it_crack 
nor it_trigger on the bridge. But once an island has been visited, it should be 
impossible for Blackball to visit it twice. So each island would be surrounded 
by a ring which be visited exactly twice by Blackball (first, entering the 
island from a bridge, second, leaving the island to get to another bridge). On 
the center of the island, there is a switch which opens a door of the corridor 
to that here again Blackball must visit all the islands. Once a door is opened, 
there could appear it_crack on the ring to ensure the flooding occurs when 
Blackball is leaving, but the cracking should be propagated on all the ring so 
that Blackball can never come back to the same island. Hamilton's example was 
the dodecahedron graph (20 islands connected by 30 bridges!) but there are 
simpler hamiltonian graphs, for example the cube (8 nodes, 12 edges) or the 
tetrahedron (4 islands connected by 6 bridges as each island is connected to 
all the other ones).

3) 3-coloring of a graph. This one is more difficult to program. Blackball is a 
gardener (no dangerous items here). On each island is a greenhouse (st_ice or 
st_light_glass) and Blackball choose what to seed in the lighthouse (fl_lawn, 
it_banana or it_cherry) but for the sake of biodiversity, there should never be 
the same plant in greenhouses joined by a single bridge. Once the conditions 
(any greenhouse contains a plant, and two adjacent greenhouses do not contain 
the same plant) a door opens somewhere allowing Blackball to reach an oxyd. So 
there must be some mechanism which checks the conditions. Blackball could use 
st_fourswitch to choose the plant (or none) for the greenhouse. The 4 colours 
theorem ensures that for any archipelago only 4 plants are necessary, but in 
most cases 3 are enough. 

With several examples of each of these 3 problems, I mean games, there could be 
enough to create a levelpack. It could be fun and interesting to develop 
collaboratively this levelpack. I plan to give this task as homework to my 
pupils. 

No need to read latin, just look at the maps on page 2: 
http://eulerarchive.maa.org/backup/E053.html

Alain

Reply via email to