Page 30 - HOW TO PROVE IT: A Structured Approach, Second Edition
P. 30

P1: PIG/
                   0521861241c01  CB996/Velleman  October 19, 2005  23:46  0 521 86124 1  Char Count= 0






                                   16                      Sentential Logic
                                   Example 1.2.1. Make a truth table for the formula ¬(P ∨¬Q).
                                   Solution
                                                   P  Q   ¬Q   P ∨¬Q   ¬(P ∨¬Q)
                                                   F  F    T      T        F
                                                   F  T    F      F        T
                                                   T  F    T      T        F
                                                   T  T    F      T        F

                                     The first two columns of this table list the four possible combinations of
                                   truth values of P and Q. The third column, listing truth values for the formula
                                   ¬Q, is found by simply negating the truth values for Q in the second column.
                                   The fourth column, for the formula P ∨¬Q, is found by combining the truth
                                   values for P and ¬Q listed in the first and third columns, according to the
                                   truth value rule for ∨ summarized in Figure 4. According to this rule, P ∨¬Q
                                   will be false only if both P and ¬Q are false. Looking in the first and third
                                   columns, we see that this happens only in row two of the table, so the fourth
                                   column contains an F in the second row and T’s in all other rows. Finally, the
                                   truth values for the formula ¬(P ∨¬Q) are listed in the fifth column, which
                                   is found by negating the truth values in the fourth column. (Note that these
                                   columns had to be worked out in order, because each was used in computing
                                   the next.)

                                   Example 1.2.2. Make a truth table for the formula ¬(P ∧ Q) ∨¬R.

                                   Solution
                                           P   Q   R  P ∧ Q  ¬(P ∧ Q)  ¬R   ¬(P ∧ Q) ∨¬R
                                           F   F   F    F       T       T        T
                                           F   F   T    F       T       F        T
                                           F   T   F    F       T       T        T
                                           F   T   T    F       T       F        T
                                           T   F   F    F       T       T        T
                                           T   F   T    F       T       F        T
                                           T   T   F    T       F       T        T
                                           T   T   T    T       F       F        F
                                     Note that because this formula contains three letters, it takes eight lines to
                                   list all possible combinations of truth values for these letters. (If a formula
                                   contains n different letters, how many lines will its truth table have?)


                                     Here’sawayofmakingtruthtablesmorecompactly.Insteadofusingseparate
                                   columns to list the truth values for the component parts of a formula, just list
                                   those truth values below the corresponding connective symbol in the original
                                   formula. This is illustrated in Figure 5, for the formula from Example 1.2.1.
   25   26   27   28   29   30   31   32   33   34   35