Enigmatic Code

Programming Enigma Puzzles

Enigma 154: The more fool you

From New Scientist #1299, 1st April 1982 [link]

In the heart of Moreland live many tribes of whom half are sworn to tell the truth and half always to lie. Always, that is, except on April Fool’s day (now an integral part of their culture after introduction by the white man). On this day, liars may “April Fool” if they have heard a truth tribesman fool (i.e. tell a lie when expected to tell the truth). All “truth men” are able in the same way to April Fool if they have heard a liar do an April Fool (i.e. tell the truth)!

I happened to be on safari in the region one 1 April, and I reached a crossroads just as three tribesmen came from the other directions. I asked the first: “Which way to the Umbulu River?” He told me that if he was April fooling, he would say turn right. (Dashed unhelpful these natives!)

The next said: “I assure you it’s left, and also that the third man is from my tribe.” To which the third said that one person was April fooling me, and that I should go straight ahead. After some thought, I took the correct road to the river…

Who was April fooling whom, and which way did I go?


2 responses to “Enigma 154: The more fool you

  1. Jim Randell 16 December 2013 at 9:00 am

    This Python program examines the possibilities in 34ms.

    from itertools import product
    from enigma import printf
    # the rules only allow a tribesman to April Fool if they hear a
    # different tribesman April Fool, so the the chain of altered
    # behaviour can never get started. so there is no April Fooling the
    # tribesmen either always tell the truth or always lie
    # in order not to get ambiguous solutions we assume that when a
    # tribesman says "<a> and <b>", this is treated as uttering two
    # separate statements, so for a truth teller they are both true and
    # for a liar they are both false
    # consider possibilities for each tribesman/road
    # tribes (1, 2, 3), road to river (left, straight on, right)
    for (t1, t2, t3, r1, r2, r3) in product((True, False), repeat=6):
      # 1. said if he was april fooling he would say turn right (r3)
      if t1:
        # he's telling the truth, so r3 cannot go to the river
        if r3: continue
        # he's lying, so r3 cannot go to the river
        if r3: continue
      # 2. the river is left (r1), the third man is from my tribe
      if t2:
        # he's telling the truth, so the river is left (r1) and the third man is from the same tribe
        if not(r1) or (t2 != t3): continue
        # he's lying, so the river is not left (and the third man is not from the same tribe)
        if r1: continue
      # 3. one person is april fooling, the river is straight on (r2)
      if t3:
        # he's telling the truth, but no-one can be april fooling, so this is not possible
        # he's lying, so the river cannot be straight on
        if r2: continue
      printf("tribes=(1={t1}, 2={t2}, 3={t3}), river=(left={r1}, straight={r2}, right={r3})")

    Solution: The only possible road to the river is back the way you came.

    I wasn’t entirely happy with this puzzle (although it is an April Fool’s puzzle). By assuming that a tribesman stating “A and B” is the same as the tribesman uttering A and B as two separate statements we arrive at a unique configuration, which is that tribesmen 2 and 3 are from different lying tribes and none of the three roads described (left, straight ahead or right) can lead to the river, so the only possibility is the road that the setter came in on, hence this must be the answer.

    • Hugh Casement 20 August 2014 at 8:45 am

      Only a white man, with his impenetrable logic (or abstruse sense of humour), can initiate a chain of April fools amongst the tribesmen. So the explorer probably knew from the start where the river was: he’d just come from it!

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s

%d bloggers like this: