Find the conectives of a composed proposition given a a true table

116 Views Asked by At

How can I construct a proposition P with the values given in the table using p,q, and r?

\begin{array}{|c3:c|}\hline p & q & r & P \\\hline 0 & 0 & 0 & 1 \\ 0 & 0 & 1 & 0 \\ 0 & 1 & 0 & 1 \\ 0 & 1 & 1 & 1 \\ 1 & 0 & 0 & 1\\ 1 & 0 & 1 & 0 \\ 1 & 1 & 0 & 0 \\ 1 & 1 & 1 & 1 \\ \hline\end{array}

My fist idea wasto fill each row and given those values , keep filling the values of the following rows but I always got some contradiction, I have no idea how to solve this :/ Thanks if anyone can help me with another idea to solve the problem

2

There are 2 best solutions below

0
On

Use Karnaugh maps:

     pq
     00 01 11 10
r 0 | 1  1  0  1
  1 | 0  1  1  0

The proposition is then given by covering the 1's with rectangles. We see that if r is false, P is true if p NAND q is true; this yields a term $\neg r\wedge\neg(p \wedge q)$, or (by de Morgan's laws) $\neg(r \vee(p\wedge q))$. If r is true then q must be true; this yields a term $r\wedge q$. Hence the final expression for P is the OR of these terms: $$\neg(r \vee(p\wedge q))\vee(r\wedge q)$$

0
On

You can also solve this mechanically line by line. For the first line consider formula $\neg p\wedge \neg q \wedge\neg r$ call it $P_1$. Obivously $P_1$ is true exactly when you use the evaluation $0,0,0$. Similarly you construct a formula $P_i$ for every line with value $1$. The resulting formula is then their disjunction $\bigvee P_i$. This is actually a way how to transform a formula into disjunctive normal form.