# Homework #2

In this assignment, you'll be using propositional logic and a stochastic solver to solve a murder mystery that has stumped the best minds of Scotland Yard. Your task will be to encode a sequence of clues in propositional logic, convert the statements into CNF form and then use a walksat like program to try to find a satisfying assignment for this CNF. If you find an assignment for a given suspect, you will know you that this suspect could have committed the murder.

Question #1: The first step of this task is to convert the following clues to proposition logic. Please use ^ for and, v for or, ~ for not and => for implies. Use the following atomic sentences:

Jeeves = "Jeeves committed the murder"
Lurch = "Lurch committed the murder"
Alfred = "Alfred committed the murder"
pantry = "Murder occured in the pantry"
bedroom = "Murder occured in bedroom"
gun = "the gun was used in the murder"
icepick = "the icepick was used in the murder":

Here are the clues

a) Jeeves or Lurch or Alfred committed the murder.
b) Either the murder occured in the pantry or in the bedroom (but not both)
c) Either the gun was used or the icepick was used as the murder weapon(but not both)
d) If the murder was committed with a gun then Lurch is a murderer
e) Either Lurch was a murderer or it was committed in the bedroom (but not both)
f) if the murder was done with the gun then either Jeeves was a murderer or it was done in the bedroom(but not both)
g) Sally lied when saying "If the room is the bedroom then Alfred is a murderer"

Question #2: Now convert the logic statements from Question #1 to conjunctive normal form. I.e. sequences of or's that are and'ed together.