# What's wrong with this truth table for implication?

I completed this truth table in an assignment for an implication and got a few of the outputs wrong. I was wondering if anyone can help explain why I got them wrong. This is part of the truth table that I got wrong:

PLEASE FORGIVE THE TYPO IN TABLE 4. It's meant to say $(\neg r \Rightarrow p) \land (r \Rightarrow q)$ AND NOT $(\neg p \Rightarrow p) \land (r \Rightarrow q)$

• The last table is titled "Finding $(\neg p\to p)\wedge(r\to q)$" but that's not what you show, Aug 7 '17 at 3:17
• Sorry, excuse that mistake. I meant it to be (¬r→p) ∧ (r→q) Aug 7 '17 at 3:18

Looks like whoever marked this assumed you knew which order the alphabet went in. Notice that if you put $p,q,r$ in alphabetical order you get

$$\begin{array}{c|c|c|c} p & q & r & (\neg r \to p) \wedge (r \to q) \\\hline 0 & 0 & 0 & 0 \\\hline 0 & 0 & 1 & 0 \\\hline 0 & 1 & 0 & 0 \\\hline 0 & 1 & 1 & 1 \\\hline 1 & 0 & 0 & 1 \\\hline 1 & 0 & 1 & \color{red}0 \\\hline 1 & 1 & 0 & \color{red}1 \\\hline 1 & 1 & 1 & 1 \end{array}$$

They were probably marking like 30 of these truth tables so they only went off the final values and didn't pay attention to the order of the inputs.

• I would never have even thought to put the variables in alphabetical order. Makes so much more sense (mathematically, at least) to put them in the order they appear in the formula. How interesting. Aug 7 '17 at 13:35
• @ToddWilcox You would have to put them in the order r, p, q then, and not the OPs order, wouldn't you? But anyway - usually the variable names are chosen so that alphabetic is also the most logical order, unless r is supposed to act as a shorthand as well as a variable. Aug 7 '17 at 17:01
• Very perceptive, and the first sentence made me laugh. Aug 7 '17 at 20:37

Seems correct to me

\begin{array}{c:c}p & r & q & \neg r & (¬r \to p) & (r \to q) & (¬r \to p) \wedge (r \to q) \\ \hdashline 0 & 0 & 0 & 1 & 0 & 1 & 0 \\ \hdashline 0 & 0 & 1 & 1 & 0 & 1 & 0 \\ \hdashline 0 & 1 & 0 & 0 & 1 & 0 & 0 \\ \hdashline 0 & 1 & 1 & 0 & 1 & 1 & 1 \\ \hdashline 1 & 0 & 0 & 1 & 1 & 1 & 1 \\ \hdashline 1 & 0 & 1 & 1 & 1 & 1 & 1 \\ \hdashline 1 & 1 & 0 & 0 & 1 & 0 & 0 \\ \hdashline 1 & 1 & 1 & 0 & 1 & 1 & 1 \end{array}

Edit: Ah. Trevor has spotted what may have happened.

• Thanks, Graham! I can't believe I didn't pick up on that the first time. Aug 7 '17 at 3:35