The exercise is a puzzle that can be solved by translating Statements into logical expressions and reasoning from these expressions using truth tables.

Four friends have been identified as suspects for an unauthorized access into a computer system. They have made statements to the investigating authorities. Alice said “Carlos did it.” John said “I did not do it.” Carlos said “Diana did it.” Diana said “Carlos lied when he said that I did it.”

a) If the authorities also know that exactly one of the four suspects is telling the truth, who did it? Explain your reasoning.

b) If the authorities also know that exactly one is lying, who did it? Explain your reasoning.

Solution;

Step 1 :

In this problem using the logical expression and reasoning the following.

consider

This shows the relation

and and

Then this shows the relation