# Truthtable logic ordering

When the task presents the letters in the order p --> r --> q

why are they structured p - q - r below? Edit:
The reason that I ask is in my structuring the final answers are not the same

What have I done wrong? • The ordering is immaterial. – Umberto P. Sep 15 '15 at 17:18
• I'm not familiar with immaterialism, what do you mean? – Manumit Sep 15 '15 at 17:20
• immaterial, n.: Of no consequence; unimportant, insignificant. – Umberto P. Sep 15 '15 at 17:25
• They could have just put it like that to be in alphabetical order. I know it may seem odd since you don't see $p$ with $q$ in the expression, that they are listed side by side on the table, but it does not matter. – CSCFCEM Sep 15 '15 at 17:25

Note that $p\wedge r=1$ if and only if $p=1$ and $r=1.$ Take a look at your fourth column: you've simply duplicated the column of $p.$ Once you fix your fourth column, you'll need to fix your last column, and you'll find that you once again have a column with four $0$s and four $1$s, just as in the answer key. Now, the layout of the $0$s and $1$s need not look the same, but they tell exactly the same story.

How should this all be interpreted, though? Well, let me examine a few lines of each table.

The second row of your table tells us the following: $0\wedge 0=0,$ $1\vee 0=1,$ $\neg(1\vee 0)=0,$ and $(0\wedge 0)\vee\neg(1\vee 0)=0.$ But this is exactly what the third row of their table tells us! Likewise, the third row of your table tells us the same thing that your second row does.

The seventh row of your table says that: $1\wedge1=1,$ $0\vee1=1,$ $\neg(0\vee1)=0,$ and $(1\wedge1)\vee\neg(0\vee1)=1.$ But this is exactly what the sixth row of their table tells us! Likewise, the sixth row of your table should (and will, when it's fixed) show the same thing that the seventh row of their table tells us.

Your first, fourth, and eighth rows (respectively) tell the same things as their first, fourth, and eighth rows. Once you fix your fifth row, it should tell the same things as their fifth row.

As for why they order it $p,q,r,$ it is likely because it's in alphabetical order, and nothing more significant than that.

• Enlightenment! But even without my error in fourth column I would still need this answer to understand the basics of truthtable output. – Manumit Sep 15 '15 at 18:16
• I'm glad I could help! – Cameron Buie Sep 15 '15 at 18:17

While it is customary to use p,q and r in the alphabetical order it is not wrong to use them in an arbitrary manner. You still end up with the same logical outputs but in an disorderly and "not-so-neat" manner. If you look carefully the out puts and the corresponding input combinations are the same in both cases, given that your 6th row is correct. Correct the mistake in your 6th row and you would see. Hope this helps :)

You swapped the truth values for $q$ and $r$. Switch their truth values on the left-hand side of the page and then redo the problem.

Your truth table would be correct otherwise (i.e. the conclusions you made based on the $p, q, r$ axioms that you (not the instructor that assigned the work) had initially set are correct).

• You're telling me the truth table is incorrect because of the position of q & r, while everyone else is telling me it doesn't matter. I'm still confused. Or are you saying that both answers are correct? – Manumit Sep 15 '15 at 17:54
• Don't think about just the letters used, think about their corresponding truth values. Basically, your truth values for r are the same as the truth values your instructor put for q, and vice versa. Therefore, when you write p^r, you are writing what your instructor would write as p^q, since your truth values for r correspond to his/her truth values for q. p^r is different from p^q, and thus anything dependent on p&q or p&r will have different truth values with respect to your and your professor's truth table. – adamcatto Sep 15 '15 at 19:22
• tl;dr order matters if you swap the truth values of q and r but don't swap q with r for all other statements that use them (e.g. p^r, p^q, q-->p, etc.) – adamcatto Sep 15 '15 at 19:26
• But in an exam it would still be correct to list the axioms as I please? – Manumit Sep 15 '15 at 19:26
• Sure, just make sure to switch p,q,r accordingly (e.g. since you switched q and r here, you would need to change p^r to p^q, since the prof's r is your q) – adamcatto Sep 15 '15 at 19:28