Three boxes are presented to you. One contains gold, the other two are empty.
Each box has imprinted on it a clue as to its contents; the clues are:
Box 1: "The gold is not here"
Box 2: "The gold is not here"
Box 3: "The gold is in Box 2"
Only one message is true; the other two are false. Which box has the gold?
Follow the steps below to formalize the puzzle in Propositional Logic and find the solution using a truth table.
1. Let B1 = gold is in Box 1. B2 = gold is in Box 2. B3 = gold is in Box 3.
2. Define two functions g and h described by the corresponding two statements below:
g(B1,B2,B3) = One box contains gold (red); the other two are empty.
Using the variables B1, B2, B3:
g(B1,B2,B3) = (B1 and not B2 and not B3) OR (not B1 and B2 and not B3) OR (not B1 and not B2 and B3).
h(B1,B2,B3) = Only one message is true (red); the other two are false.
h(B1,B2,B3) = (not B1 and not(not B2) and not B2) OR (not(not B1) or not B2 and not B2) OR (not(not B1) or not(not B2) or B2).
3. Use B' for B to write:
the SOP of g(B1,B2,B3) = and
the SOP of h(B1,B2,B3) =
4. Go to the link below and use K-map to simplify g(B1,B2,B3) and h(B1,B2,B3)
5. Finally, you need to solve f(B1,B2,B3) = g(B1,B2,B3)h(B1,B2,B3) by completing the Truth Table below:
B1,B2,B3
g(B1,B2,B3)
h(B1,B2,B3)
f(B1,B2,B3)
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
6. f(B1,B2,B3) = 1 tells you what box has the gold.