% problem-set/puzzles/truth_lies/tandl27.ver1.clauses % created : 07/14/88 % revised : 07/14/88 % description: % % This run solves "Truthtellers and Liars Puzzle #27" using hyper- % resolution. % % Truthtellers and Liars Puzzle #27 % % There is an island with exactly two types of people--truthtellers % who always tell the truth and liars who always lie. % There are a group of three people, A, B, and C on the island. % A stranger passes by and asks A, "How many truthtellers are % among you ?" A answers indistinctly. So the stranger asks B, % "what did A say?". B replies "A said that there is exactly one % truthteller among us." Then C says, "Don't believe B; he is % lying!" What are B and C? % representation: % TRUE(atr(x)) | TRUE(liar(x)). -TRUE(atr(x)) | -TRUE(liar(x)). -TRUE(atr(x)) | -TRUE(Said(x,y)) | TRUE(y) . -TRUE(liar(x)) | -TRUE(Said(x,y)) | -TRUE(y) . -TRUE(x) | -TRUE(Said(y,x)) | TRUE(atr(y)). TRUE(x) | -TRUE(Said(y,x)) | TRUE(liar(y)). -P(x,y,z) | -TRUE(onett) | TRUE(atr(x)) | TRUE(atr(y)) | TRUE(atr(z)). -P(x,y,z) | -TRUE(atr(x)) | -TRUE(atr(y)) | -TRUE(onett). -P(x,y,z) | -TRUE(atr(x)) | -TRUE(atr(z)) | -TRUE(onett). -P(x,y,z) | -TRUE(atr(y)) | -TRUE(atr(z)) | -TRUE(onett). -P(x,y,z) | TRUE(onett) | -TRUE(atr(x)) | TRUE(atr(y)) | TRUE(atr(z)). -P(x,y,z) | TRUE(onett) | -TRUE(atr(y)) | TRUE(atr(x)) | TRUE(atr(z)). -P(x,y,z) | TRUE(onett) | -TRUE(atr(z)) | TRUE(atr(y)) | TRUE(atr(x)). P(a,b,c). TRUE(Said(a,garbage)). TRUE(Said(b,Said(a,onett))). TRUE(Said(c,liar(b))).