Knights and Knaves Puzzle to CNF

156 Views Asked by At

Context for the puzzle

You meet five inhabitants: Sally, Rex, Joe, Carl and Bart. Sally claims that at least one of the following is true: that Bart is a knight or that Rex is a knight. Rex tells you that Bart is a knave. Joe says that either Bart is a knave or Rex is a knave. Carl claims that Rex is a knave. Bart tells you that both Carl and Rex are knaves.

What I have so far

$S : B \lor R$

$R : \neg B$

$J : \neg B \lor \neg R$

$C : \neg R$

$B: \neg C \land \neg R$

Am I doing this correctly?