21
Fri, Sep

Discrete Structure | Truth Tables | Lecture 2

Discrete Structure
Typography

Truth Tables for:

  1. ~ p /\ q
  2. ~ p /\ (q \/ ~ r)
  3. (p \/ q) /\ ~ (p /\ q)

Truth table for the statement form ~ p /\ q

P q ~P ~P / \q
T T F F
T F F F
F T T T
F F T F

Truth table for ~ p /\ (q \/ ~ r)

Truth Tables

Truth table for (p \/ q) ~ (p /\ q)

Truth Tables

Double Negative Property ~(~p) ≡p

Truth Tables

Example

“It is not true that I am not happy”

Solution:

Let p“I am happy”
then ~ p“I am not happy”
and ~(~ p)“It is not true that I am not happy”
Since ~ (~p) ≡p

Hence the given statement is equivalent to:
“I am happy” ~ (p /\ q) and ~p /\ ~q are not logically equivalent.

Truth Table

Different truth values in row 2 and row 3

DE MORGAN’S LAWS:

  1. The negation of an and statement is logically equivalent to the or
    statement in which each component is negated.
    Symbolically ~(p /\ q) ≡~p \/ ~q.
  2. The negation of an or statement is logically equivalent to the and
    statement in which each component is negated.
    Symbolically: ~(p \/ q) ≡~p /\ ~q.
    ~(p \/ q) ≡~p /\ ~q

    Truth Table

    Application:

    Give negations for each of the following statements:

    • The fan is slow or it is very hot.
    • Akram is unfit and Saleem is injured.

    Solution.

    • The fan is not slow and it is not very hot.
    • Akram is not unfit or Saleem is not injured.

    Inequalities & Demorgan's Laws:

    Use DeMorgan’s Laws to write the negation of
    -1 < x < 4

    for some particular real no. x
    -1 < x < 4 means x > –1 and x < 4

    By DeMorgan’s Law, the negation is:

    x > –1 or x < 4Which is equivalent to: x < –1 or x > 4

    Exercise:

    1. (p /\ q) /\ r = p /\(q /\ r)
    2. Are the statements (p /\ q)\/ r and p /\~(q \/ r) logically equivalent?

    Tautology:

    A tautology is a statement form that is always true regardless of the truth values of the statement variables.

    A tautology is represented by the symbol “T”.

    Example:

    The statement form p \/ ~ p is tautology

    P ~P P \/ ~ P
    T F T
    F T T

    p \/ ~p ≡t

    Contradiction:

    A contradiction is a statement form that is always false regardless of the truth values of the statement variables.

    A contradiction is represented by the symbol “c”.
    So if we have to prove that a given statement form is CONTRADICTION we will make the truth table for the statement form and if in the column of the given statement form all the entries are F ,then we say that statement form is contradiction.

    Example:

    The statement form p /\ ~ p is a contradiction.

    P ~P P /\ ~P
    T F F
    F T F

    Since in the last column in the truth table we have F in all the entries so is a contradiction p /\ ~p ≡c.

    Remarks:

    • Most statements are neither tautologies nor contradictions.
    • The negation of a tautology is a contradiction and vice versa.
    • In common usage we sometimes say that two statements are contradictory.

    By this we mean that their conjunction is a contradiction: they cannot both be true.

    Logical Equivalence Involving Tautology.

    Show that p /\ t ≡p

    P T P /\ T
    T T T
    F T F

     

    Since in the above table the entries in the first and last columns are identical so we have the corresponding statement forms are Logically Equivalent that is
    p /\ t ≡p

    Logical Equivalence Involving Contradiction

    Show that p /\ c ≡c
    P C P /\ C
    T F F
    F F F

    Same truth values in the indicated columns so p /\ c ≡c

    Exercise:

    Use truth table to show that (p /\ q) \/(~p \/(p /\ ~q)) is a tautology.

    Solution:

    Since we have to show that the given statement form is Tautology so the column of the above proposition in the truth table will have all entries as T.

    As clear from the table below

    Truth Table

    Hence(p /\ q) \/ (~p \/(p /\ ~q)) ≡ t

    Exercise:

    Use truth table to show that (p /\ ~q) /\(~p \/ q) is a contradiction.

    Solution:

    Since we have to show that the given statement form is Contradiction so its column in the truth table will have all entries as F.

    As clear from the table below

    Truth Table

    Usage Of “OR” In English

    In English language the word or is sometimes used in an inclusive sense (p or q or both).

    Example:

    I shall buy a pen or a book.

    In the above statement, if you buy a pen or a book in both cases the statement is true and if you buy (both) pen and book then statement is again true. Thus we say in the above statement we use or in inclusive sense.
    The word or is sometimes used in an exclusive sense (p or q but not both). As in the below statement.

    Example:

    Tomorrow at 9, I’ll be in Lahore or Islamabad.

    Now in above statement we are using or in exclusive sense because both the statements are true then we have F for the statement.
    While defining a disjunction the word or is used in its inclusive sense. Thus the symbol \/ means the “inclusive or”.

    Exclusive OR:

    When or is used in its exclusive sense, the statement “p or q” means “p or q but not both” or “p or q and not p and q” which translates into symbols as:

    (p \/ q) /\ ~ (p /\ q)

    Which is abbreviated as:
    p Å q or p XOR q

    Truth Table For Exclusive OR:

    Truth Table

    Note:
    Basically p Å q ≡ (p /\ ~q)\/~(p /\ q)
    ≡ [p /\ ~q) \/~p] /\[(p /\ ~q) \/ q]
    ≡ (p \/ q) /\ ~ (p /\q)
    ≡ (p \/ q) /\(~p \/~q)