## Outline Mathematics

Logic Problems

# Elves and Gnomes

Here's a problem to tackle:

In an enchanted forest there live only elves and gnomes. The gnomes lie when speaking about gold, but otherwise tell the truth. The elves tell the truth, except when speaking about gnomes, in which case they always lie. One day two inhabitants of this forest said the following:

I stole all my gold from a dragon.

You're lying.

Is A an elf or a gnome? How about B?

|Up| |Contact| |Front page| |Contents| |Algebra|

Copyright © 1996-2018 Alexander Bogomolny

### Solution

In an enchanted forest there live only elves and gnomes. The gnomes lie when speaking about gold, but otherwise tell the truth. The elves tell the truth, except when speaking about gnomes, in which case they always lie. One day two inhabitants of this forest said the following:

I stole all my gold from a dragon.

You're lying.

Is A an elf or a gnome? How about B?

Suppose that A is an elf,an elf,a gnome. Then he told the truth,the truth,a lie, so B,A,B must be lying. But B is neither speaking about gold, nor about a gnome. So A must be a gnome,an elf,a gnome, speaking about gold and lying,a gnome and lying,an elf,gold and lying,an elf and lying. Thus B,A,B is telling the truth, about A, who is a gnome,an elf,a gnome. So B cannot be an elf,an elf,a gnome, and must be a gnome,an elf,a gnome.

Do not forget to check your solution.

### References

- I. Yashchenko,
*Invitation to a Mathematical Festival*, MSRI/AMS, 2013

|Up| |Contact| |Front page| |Contents| |Algebra|

Copyright © 1996-2018 Alexander Bogomolny

64226663 |