Truth table confusion

323 Views Asked by At

I'm given a conditional statement

$ ~p \lor q \rightarrow r$

From what I understand, the state of $r$ is dependent on the state of $p$ and $q$. The truth table I came up with based on this is:

\begin{array}{ccc} p&q & r \\ \hline 0 & 0 & 1 \\ 0 & 1 & 1 \\ 1 & 0 & 0\\ 1 & 1 & 1\\ \end{array}

However, I used a truth table generator to check my answer, and I'm getting confusing results.

\begin{array}{ccc|c} p&q & r & \lnot p\lor q \to r\\ \hline 0 & 0 & 0 &0\\ 0 & 0 & 1 &1\\ 0 & 1 & 0& 0\\ 0 & 1 & 1& 1\\ 1 & 0 & 0 & 1\\ 1 & 0 & 1 & 1\\ 1 & 1 & 0& 0\\ 1 & 1 & 1& 1\\ \end{array}

I fail to understand how $r$ can have different states despite $p$ and $q$ remaining the same, if its conditionally dependent on them. I also don't understand where the constants on the rightmost column are being derived from. Wouldn't they be the same as $r$?

Am I just using the online truth table tools wrong?

3

There are 3 best solutions below

3
On BEST ANSWER

The “$\to$” in $\sim p\lor q\to r$ does not denote a "gives", but is a logical operator, with the following truth table: $$\begin{array}{cc|c} a & b & a\to b\\ \hline 0 & 0 & 1\\ 0 & 1 & 1\\ 1 & 0 & 0\\ 1 & 1 & 1 \end{array}$$ That is, $a\to b$ is a logical statement that can be true or false. It basically says "$b$ is at least as true as $a$".

It is completely equivalent with $\sim a\lor b$.

0
On

I would say you simply misunderstood the question. The table is evaluating a statment with three variables. $S(p,q,r)$ and you are evaluating the truth values for the 8 possible states of $p,q,r$. Think you misunderstood this as statement $S(p,q) = r$ and thought to evaluate the values of the statement with two variable for the 4 possible states of $p, q$. But that is the wrong why of interpreting the question.

You are being asked to evaluate the truth of $S(p,q,r) = \lnot p \lor q \to r$

which is:

$$\begin{array}{ccc|c} p&q & r & S=(\lnot p\lor q) \to r\\ \hline 0 & 0 & 0 &0\\ 0 & 0 & 1 &1\\ 0 & 1 & 0& 0\\ 0 & 1 & 1& 1\\ 1 & 0 & 0 & 1\\ 1 & 0 & 1 & 1\\ 1 & 1 & 0& 0\\ 1 & 1 & 1& 1\\ \end{array}$$

You interpreted it to mean to evaluat the truth of $R(p,q) = \lnot p \lor q$ which you evaluated as:

$$\begin{array}{cc|c} p&q & R=(\lnot p\lor q)\\ \hline 0 & 0 & 1 \\ 0 & 1 & 1 \\ 1 & 0 & 0\\ 1 & 1 & 1\\ \end{array}$$

We can combine the two results to get a clearer truth table:

$$\begin{array}{cc|c|c|c} p&q &R=\lnot p \lor q & r& S=(\lnot p\lor q) \to r=R\to r\\ \hline 0 & 0 & 1 &0&0\\ 0 & 0 & 1 &1&1\\ 0 & 1 & 1& 0&0\\ 0 & 1 & 1& 1&1\\ 1 & 0 & 0 & 0&1\\ 1 & 0 & 0 & 1&1\\ 1 & 1 & 1& 0&0\\ 1 & 1 & 1& 1&1\\ \end{array}$$

0
On

You're not using the online tool incorrectly; you're doing your own truth-table incorrectly.

The whole point of a truth-table is to explore all possible truth-assignments to the propositional variables involved. So, given that each of the three variables involved, $p$, $q$, and $r$ can take on the value of either $0$ or $1$, there are $2^3=8$ possible truth-assignments that the table needs to consider, i.e. your table needs $8$ rows, not $4$. The online tool has it exactly right.