I found this question online, and tryied to solve. However, I have trouble with the methods
Here question Three children Allison, Jack, and Frank were playing “hide and seek” game in an apartment. When the parents went back home they saw that the vase in the living room is broken. Three children are the suspects, one of them broke the vase, but all of them say they did not do it. Allison says that Jack was hiding in the living room but Frank was not there. Jack says he was hiding in the garden at that time and never entered into living room. Frank says Allison and Jack were not in the garden. You are asked to resolve this puzzle and find who is guilty while assuming only the guilty child does not tell the truth.
I want to construct the knowledge-base and find who is guilty by resolution. Could you help me?
The (vase) killer is indeed...Jack! First we eliminate Frank as a potential suspect. If Frank is lying then both Alison and Jack were in the garden but then Allison would also be lying... a contradiction.
So Frank is telling the truth, i.e. Jack and Alison were not in the garden. But Jack says he was hiding in the garden and is thus lying which means he is the criminal we are after!
It seems your question is best suited for Stack Overflow though if you want an algorithmic response.