# Enigmatic Code

Programming Enigma Puzzles

## Enigma 196: Think of a letter

From New Scientist #1342, 27th January 1983 [link]

Plink: “Let’s play ‘Think of a letter’.”
Plonk: “How do you play that?”
Plink: “Well, think of a letter.”
Plonk: “Right, I’ve done that.”
Plonk: “Shoot.”
Plink: “How many of the seven questions are you going to answer truthfully?”
Plonk: “Three.”
Plonk: “Yes.”
Plonk: “No.”
Plonk: “No.”
Plonk: “Yes.”
Plonk: “No.”
Plonk: “Yes.”

What?

[enigma196]

### 2 responses to “Enigma 196: Think of a letter”

1. Jim Randell 3 June 2014 at 8:12 am

The candidate words and Plonk’s answers have been chosen to allow the answer to be deduced by analysis. But programatically a brute force approach does just as good a job in 39ms.

```from enigma import printf

# the words chosen
words = (
'CARTHORSE',
'SENATORIAL',
'INDETERMINABLES',
'REALISATION',
'ORCHESTRA',
'ANTIDISESTABLISHMENTARIANISM'
)

# the answers for the words
answers = (True, False, False, True, False, True)

# choose a letter
for x in 'ABCDEFGHIJKLMNOPQRSTUVWXYZ':

# evaluate the statements
ss = list(x in w for w in words)

# how many are answered correctly
n = sum(1 for (a, b) in zip(ss, answers) if a == b)

# if Plonk answered the first (meta) question truthfully he
# would then have to answer two further questions correctly
if n == 2:
printf("letter = {x} [q1 = true] {ss} {n}", n=n + 1)

# but if he answered the first question untruthfully then he
# must answer any number but three of the remaining questions correctly
if n != 3:
printf("letter = {x} [q1 = false] {ss} {n}")
```

Solution: The letter Plonk chose is ‘H’.

• Jim Randell 3 June 2014 at 8:19 am

Analytically we can consider the problem like this:

If we consider the six candidate words in pairs, and equate them by their letter content we see:

CARTHORSE = ORCHESTRA
SENATORIAL = REALISATION
INDETERMINABLES + H = ANTIDISESTABLISHMENTARIANISM

And for each pair Plonk gave both a “Yes” and a “No” answer.

Which means if his letter was any letter other than H he has answered exactly three of these six questions correctly. However this situation is precluded by the first question, where he states he will answer exactly three questions correctly. This statement cannot be either true or false.

Hence the letter chosen is H, and Plonk answers four of the last six questions correctly, and the the answer to the first question is incorrect.