0
$\begingroup$

This is my first day learning about logic and logic programming, I have been doing some exercises using a truth table for propositional logic questions

p ∧ (q ∨ r ) ≡ (p ∧ q) ∨ (p ∧ r )

Using a truth table I worked out that this statement is false, but I don't know whether this is correct. If someone could break this down for me or point me to a resource i would really appreciate it.

    p ∧ (q ∨ r ) ≡ (p ∧ q) ∨ (p ∧ r )                       


p ∧     (q ∨ r )    p ∧ (q ∨ r )
 F         F            F
 T         T            T
           T            T
           T            T
(p ∧ r )    (p ∧ q) ∨ (p ∧ r )
   F                  F
   F                  F
   F                  F
   T                  T
$\endgroup$
  • $\begingroup$ You should include the truth table you made for this propositional statement. I suspect that there may be an error in it. $\endgroup$ – Mike Pierce Jan 18 '16 at 17:46
  • $\begingroup$ @MikePierce I have added the truth table now, although it isn't being pasted correctly $\endgroup$ – user5647516 Jan 18 '16 at 18:10
  • 2
    $\begingroup$ ... really?! Then edit the truth table in your post to make it display correctly. Hint: since there are three symbols in your propositional statement ($p$,$q$,$r$), there should be $2^3=8$ rows in your table. $\endgroup$ – Mike Pierce Jan 18 '16 at 18:20
  • $\begingroup$ @MikePierce is the above better? Sorry I am just still trying to get my head around this $\endgroup$ – user5647516 Jan 18 '16 at 18:41
  • $\begingroup$ No, the above is not better. See my answer. $\endgroup$ – Mike Pierce Jan 18 '16 at 21:21
4
$\begingroup$

Here's a truth table for your propositional statement $$ p\wedge(q \vee r) \;\;\equiv\;\; (p \wedge q)\vee(p \wedge r) $$ Notice that the last two columns are identical, so the statement is true.

\begin{array}{c|c|c|c|c|c|c|c} p&q&r&(q \vee r)&(p \wedge q)&(p \wedge r)&p\wedge(q \vee r)&(p \wedge q)\vee(p \wedge r)\\\hline T&T&T&T&T&T&T&T\\ T&T&F&T&T&F&T&T\\ T&F&T&T&F&T&T&T\\ T&F&F&F&F&F&F&F\\ F&T&T&T&F&F&F&F\\ F&T&F&T&F&F&F&F\\ F&F&T&T&F&F&F&F\\ F&F&F&F&F&F&F&F\\ \end{array}

$\endgroup$
  • $\begingroup$ sorry for the late response, thanks it makes sense now @MikePierce $\endgroup$ – user5647516 Jan 19 '16 at 16:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.