Logic riddle about pizza.

85 Views Asked by At

I have a riddle question that I need some help with.

Peter, Quin and Robert are discussing whether they order pizza for lunch.

$\bullet$Peter will order pizza precisely when both Quin and Robert order pizza

$\bullet$ Quin will order pizza if Robert does not order pizza.

$\bullet$Robert will order pizza only if Peter and Quin will make opposite decisions regarding ordering pizza

I have translated the statements "Peter will order pizza", "Robert will order pizza", and "Quin will order pizza" into P,Q, and R respectively.

I translated the preferences as follows:

$\bullet P \iff Q\lor R$

$\bullet \neg R\implies Q$

$\bullet (\neg P\land Q)\lor(P \land \neg Q)\implies R$

I am slighly unsure if the first statement is an if and only if and not an implies.

Now, here is the truth table I produced from these.

$$\begin{array}{ccc|c|c} P & Q & R & (Q\land R)\iff P & \neg R \implies Q & (P\land \neg Q)\lor (\neg P\land Q)\implies R\\ \hline T & T & T &T&T&T\\ T & T & F&F&T&T\\ T & F & T&F&T&T\\ F & T & T&F&T&T\\ T & F & F&F&F&F\\ F & T & F&T&T&F\\ F & F & T&T&T&T\\ F & F & F&T&F&T\\ \end{array}$$

So if I look at the cases where all 3 of the last columns are true, I get that either they all don't order pizza or just Robert orders pizza.

Thank you in advance!

(Edit according to suggestions)

$\bullet P \iff Q\lor R$

$\bullet \neg R\implies Q$

$\bullet R\implies (\neg P\land Q)\lor (P\land \neg Q)$

$$\begin{array}{ccc|c|c} P & Q & R & (Q\land R)\iff P & \neg R \implies Q & R\implies (\neg P\land Q)\lor (P\land \neg Q)\\ \hline T & T & T &T&T&F\\ T & T & F&F&T&T\\ T & F & T&F&T&T\\ F & T & T&F&T&T\\ T & F & F&F&F&T\\ F & T & F&T&T&T\\ F & F & T&T&T&F\\ F & F & F&T&F&T\\ \end{array}$$

1

There are 1 best solutions below

0
On BEST ANSWER

The 'precisely when' in the first sentence is meant as an if and only if, so that's correct. However, you first translate it as $P \iff Q\lor R$, whereas it should be $P \iff Q\land R$ ... but in the truth-table, you do have $P \iff Q\land R$, so I am sure that first translation was just a typo

However, your third translation is definitely wrong. '$P$ only if $Q$ translates as $P \implies Q$

So, it should be:

$R \implies (\neg P\land Q)\lor(P \land \neg Q)$

With that, only the 6th row will have all True sentences, so Quin will order pizza but Peter and Robert will not.