You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
sicp-all-tasks/sicp/4_002e42

24 lines
784 B

Exercise 4.42: Solve the following “Liars”
puzzle (from Phillips 1934):
Five schoolgirls sat for an examination. Their parents—so they
thought—showed an undue degree of interest in the result. They therefore
agreed that, in writing home about the examination, each girl should make one
true statement and one untrue one. The following are the relevant passages
from their letters:
Betty: “Kitty was second in the examination. I was only third.”
Ethel: “You’ll be glad to hear that I was on top. Joan was second.”
Joan: “I was third, and poor old Ethel was bottom.”
Kitty: “I came out second. Mary was only fourth.”
Mary: “I was fourth. Top place was taken by Betty.”
What in fact was the order in which the five girls were placed?