You forgot whether the logic class is at 11 or 12. Your friend knows which but sometimes lies. What should you ask them?

192 Views Asked by At

In "Mathematical Logic" by Chiswell and Hodges, there is the following exercise (3.5.3):

You forgot whether the logic class is at 11 or 12. Your friend certainly knows which; but sometimes they tell the truth and at other times they deliberately lie, and you know that they will do one of these but you do not know which. What should you ask them?

There is also the following hint:

Let $p$ be the statement that your friend is telling the truth, and let $q$ be the statement that the lecture is at 11. You want to ask your friend whether a certain formula $\phi$ is true, where $\phi$ is chosen so that they will answer 'Yes' if and only if the lecture is at 11. The truth table of $\phi$ will be that of $q$ if $p$ is true, and that of $(\lnot q)$ if $p$ is false. Find an appropriate $\phi$ which contains both $p$ and $q$.

I think one answer to this problem, in English, is "Would you say 'Yes' if I asked you if class is at 11 today?" but I am having trouble answering this question with a truth table and coming up with a $\phi$ that uses the $p$ and $q$ that the authors specified.

What is a $\phi$ that will work, and is there a systematic way to find it (because right now I am pretty much using trial and error, which feels like the least clever way to do it)?

2

There are 2 best solutions below

0
On BEST ANSWER

Just follow the hint, we can denote $\phi \equiv f(p, q)$. Since there are just two variables, let's just write down the truth table by enumerating all four possibilities,

p (truth-telling) q (class at 11) Friend's answer to $\phi$ Ground truth of $\phi$
T T T T
T F F F
F T T F
F F F T

We can double check the ground truth values assigned to $\phi$: it is true in two cases:

  1. The class is at 11 (q) and your friend is telling the true (q), or
  2. The class is not at 11 ($\lnot$ q) but your fiend is lying, which means the class is indeed at 11.

Therefore, we can conclude that you may just ask your friend $\phi \equiv (p \land q) \lor (\lnot p \land \lnot q)$, another way is to write it as $\lnot (p\ XOR\ q)$.

0
On

If you think of your friend as a function $f$ that takes boolean values and outputs boolean values, then $f(f(p))$ and $p$ always have the same truth value, regardless of whether the friend is a liar.

"Is $p$ true?" gives you $f(p)$.

"Is your answer to "Is $p$ true?" true?" gives $f(f(p))$.