# Dinosaurs and Elephants

There are two species living in the land of Puzzling: elephants and dinosaurs.

Elephants always tell the truth when talking about an elephant, but always lie when talking about a dinosaur. Dinosaurs always tell the truth when talking about a dinosaur but always lie when talking about an elephant.

(Note that 'Dumbo is an elephant' is a statement about Dumbo.)

Challenge 1:
John says, "Zayin is a dinosaur." What species are John and Zayin?

Challenge 2:
Tom says that Judith says that Margaret says that Elly is an elephant.
What species are Tom, Judith, Margaret, and Elly?

Challenge 3:
There are $N$ creatures ($N\ge3$) sitting around a round table. Everyone tells their right-hand neighbor, "You lie about your right-hand neighbor." What are the valid values for $N$? How are the animals arranged around the table?

If John is a dinosaur, he will say that a dinosaur is a dinosaur (true) and an elephant is a dinosaur (lie.) If John is an elephant, he will say that an elephant is an elephant (true) and a dinosaur is an elephant (lie.) Therefore all we can establish from John says "Zayin is a dinosaur." is that John is a dinosaur.

There are 16 combinations of animals for the second part. For example TD JD MD ED would mean all 4 are dinosaurs. Since they would each tell the truth, starting with M saying "E is a D", you end up with T saying "E is a D" which is not what was said, so that combination can be ruled out.

There are more than 1 combinations that lead to the sentence being uttered though: for example TE JD MD ED would make M say "E is a D" truthfully, and J pass that along truthfully, but then T lie and report the chain ended E. Similarly TD JE MD ED would start with M saying "E is a D" but then J would lie, claiming M said E was an E, and then T would pass that along truthfully. I haven't tested all 16 combinations, but my suspicion is that whenever you have an odd split (1-3 or 3-1) of animal types, that is the sentence that will be uttered.

For the third part, the sentence "you lie about your righthand neighbour" involves 3 animals: the speaker S, the subject Y, and the neighbour N. There are 8 combinations possible: DDD, DEE, DED, DDE, EEE, EED, EDE, EED. In the 4 cases where Y and N are different, Y really does lie, but only if S and Y are the same will S say so. In the other 4 cases, Y tells the truth, but if S and Y are different S will lie about that. So the patterns DEE, DDE, EED, and EDD will lead to this sentence. You can get this pattern if they sit in pairs - for example four of them as DDEE with the final E "looping back around" and sitting next to the first D. The total number of animals must be a multiple of 4 to reuse this pattern, eg DDEEDDEE and so on.

• Kate, I really appreciate your approach to this question, I wanted to ask you what would a problem like this come under? Mathematical logic? Commented Nov 5, 2015 at 14:02
• Did you make this puzzle up yourself? Do you know the answers? Were you expecting two of the three answers to be "you can't determine that"? Generally that's not a super satisfying solution to a puzzle. Commented Nov 5, 2015 at 14:30
• No I didn't expect two answers to be undeterminable but I appreciated it because your the first person on here not to brush me off saying its for home work etc. Commented Nov 5, 2015 at 14:31
• Well, looking at the first revision, I would say that it is homework after all. Which doesn't make it off topic, but you can't just post your question as is and get others to solve it for you. It would have been better to ask specifically about what you were stuck on, or to ask if your solution or approach was right. People have since edited it to be a better puzzle for this site, but they lost information in doing so. Revision 1 fits this answer better and if it was your homework, it contained clues to help you solve it. I hope you can understand this kind of logic better now. Commented Nov 5, 2015 at 14:41
• Definitely! I apologise for inconvenience Commented Nov 5, 2015 at 14:44

Challenge 2: Tom says that Judith says that Margaret says that Elly is an elephant. What species are Tom, Judith, Margaret, and Elly?

Following is my answer to the above question.

Possibilities:

There are 4 possibilities for the statements of Tom and Judith. TT, TL, LT, LL ( LT means that Tom is lying and Judith is telling the truth, etc.).

Also, note one thing.

If Margaret said that Elly is an elephant then Elly can be either a dinosaur or an elephant. In both these cases, Margaret will be an elephant. Margaret cannot be a dinosaur.

If Margaret said that Elly is a dinosaur then Margaret is a dinosaur and Elly can be a dinosaur or an elephant. Margaret cannot be an elephant, in this case.

Now, if Judith is telling the truth then this would mean that Margaret indeed said that Elly is an elephant. In this case, both Judith and Margaret are elephants.

If Judith is lying then Margaret said that Elly is a dinosaur. In this case, Margaret is a dinosaur and Judith is an elephant.

So,

TT = Judith, Margaret are elephants, Elly can be anything and Tom is also an elephant.

TL = Judith is an elephant, Margaret is a dinosaur, Elly can be anything and Tom is an elephant.

LT = Judith, Margaret are elephants, Elly can be anything and Tom is a dinosaur

LL = Judith is an elephant, Margaret is a dinosaur and Tom is a dinosaur. Elly can be anything.

Here is a table to summarise this.

Tom Judith Margaret Elly
TT E E E D/E
TL E E D D/E
LT D E E D/E
LL D E D D/E

In conclusion, Judith will be an elephant no matter what. For all the others, please refer to the table above.

Challenge 2

We can say (almost) nothing about what animal is what species.

I don't know whether it is a trap, but what looks like to be the intended answer works only with a questionable use of logic.

If Tom and Judith are of different species then Tom is lying about Judith. That means Judith didn't say that Margaret said that Elly is an elephant.

It doesn't mean any of

• Judith said that Margaret didn't say that Elly is an elephant
• Judith said that Margaret said that Elly is not an elephant.
• Judith said that Margaret said that Elly is a dinosaur.

It doesn't even mean that the statement "Margaret said that Elly is an elephant" is false. It just wasn't said.

So you cannot tell for sure the specie of any animal. Let's see if any combination can still be excluded.

• If Tom and Judith are of different species, we don't know what Judith said, we cannot tell anything about the other animals.
• If Tom and Judith are of the same species but Margaret isn't, we sill don't know whether Margaret said anything about Elly.
• If Tom, Judith and Margaret are elephants, then Margaret said Elly is an elephant. Elly can still be either elephant or dinosaur.
• If Tom, Judith and Margaret are dinosaurs, then we must have that Margaret, a dinosaur, said Elly is an elephant. But that cannot be regardless of what Elly is.

The last case is the only one that leads to a contradiction, so the only thing we can tell is that Tom, Judith and Margaret are no all dinosaurs.

Challenge 1: John says, "Zayin is a dinosaur." What species are John and Zayin?

If it's true, Zayin is a dinosaur and so is John. If it's false, it leads to a contradiction. If John calls Zayin Animal $$A$$ (-1 or 1), then John's species is $$A*[truth$$ $$value$$ $$of$$ $$statement]$$ (-1 for false, 1 for true). Of course, Zayin is also that animal, making the statement always true.

Challenge 2: Tom says that Judith says that Margaret says that Elly is an elephant. What species are Tom, Judith, Margaret, and Elly?

Let's apply what we learned in Challenge 1:

If Margaret says Elly is an elephant, it's true and they're both elephants.
Judith and Tom are also telling the truth, so they're also elephants.

Challenge 3: There are N creatures (N≥3) sitting around a round table. Everyone tells their right-hand neighbor, "You lie about your right-hand neighbor." What are the valid values for N? How are the animals arranged around the table?

If that statement is true, then the species can be written as AAB. If it's false, it's ABB. If we extend that, we get AABBAABB...BB, making N divisible by 4.