Enigmatic Code

Programming Enigma Puzzles

Enigma 508: A colourful deception

From New Scientist #1660, 15th April 1989 [link]

Tour the Tulip Fields of Bulbania

Enigma 508

Towns: Aldingsp, Beachhol, Chholbea, Dingspal, Eachholb, Fresh, Gspaldin.

The colours are those of the tulips in that area.

You will fly to Eachholb and then drive by coach, visiting each town exactly once.

“Miss Wheel, I understand you will be driving the coach for the tour. I am afraid we have a problem. The flight is being diverted to Chholbea, so you will collect your passengers there.”

“We do not want the tourists to realise there has been a change to the tour as advertised on the above leaflet, as they might ask for their money back. Now, they will not be able to read the names of the towns as they are in Bulbanian, but they can tell the colours of the tulips and they have the map. I want you to start at Chholbea and drive round visiting each town exactly once, but so that as the tourists notice the colours on each side of the road, they will believe from their map that they are following a route as described on the leaflet, beginning at Eachholb.”

What route did Miss Wheel take and what route did the tourists think they were taking?

Some of the Bulbanian towns are anagrams of the Lincolnshire town of Spalding, and others are anagrams of town of Holbeach, also in Lincolnshire.


One response to “Enigma 508: A colourful deception

  1. Jim Randell 15 July 2019 at 8:52 am

    I think this puzzle looks more complicated than it is.

    We can construct the two routes simultaneously, at each step we add a new town to each route that has the same left/right view.

    This recursive Python program runs in 94ms.

    Run: [ @repl.it ]

    from itertools import product
    from enigma import join, printf
    # record the roads, and the LR view
    roads = dict(
      A=dict(B='BR', E='YR', F='BY', G='BR'),
      B=dict(A='RB', C='YB', G='BR'),
      C=dict(B='BY', D='RY', G='YB'),
      D=dict(C='YR', E='YB', F='BR', G='RY'),
      E=dict(A='RY', D='BY', E='YB'),
      F=dict(A='YB', D='RB', E='BY', G='BR'),
      G=dict(A='BR', B='RB', C='BY', D='YR', F='RB'),
    # solve for routes <r1>, <r2> and views <vs>
    def solve(r1, r2, vs=[]):
      # are we done?
      if len(vs) == 6:
        yield (r1, r2, vs)
        # find extensions to each route
        for ((t1, v1), (t2, v2)) in product(roads[r1[-1]].items(), roads[r2[-1]].items()):
          # the views should be the same and the towns new
          if v1 == v2 and t1 not in r1 and t2 not in r2:
            # solve for the remaining towns
            yield from solve(r1 + t1, r2 + t2, vs + [v1])
    # find routes starting at E (advertised) and C (actual)
    for (r1, r2, vs) in solve('E', 'C'):
      printf("advertised = {r1}, actual = {r2} [views = {vs}]", vs=join(vs, sep=", "))

    Solution: The actual route taken was C→D→F→G→B→A→E. The advertised route was E→A→B→G→F→D→C.

    So the actual route is the reverse of the advertised route.

    The left/right views (along both routes) are: R/Y, B/R, B/R, R/B, R/B, Y/R.

    However I think the astute customer would notice that they are not on the advertised route. When they arrive at the second town (which was advertised as A) the map says the surrounding fields should be 1Y+2R+2B, however the second town on the actual route is D, and the surrounding fields are 2Y+2R+1B.

Leave a Comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: