17
Topic: Truth table Discrete Mathematics Department of CSE

Discrete math Truth Table

Embed Size (px)

Citation preview

Page 1: Discrete math Truth Table

Topic: Truth tableDiscrete Mathematics

Department of CSE

Page 2: Discrete math Truth Table

Introduction The truth value of a statement is the

classification as true or false which denoted by T or F.

A truth table is a listing of all possible combinations of the individual statements as true or false, along with the resulting truth value of the compound statements.

Truth tables are an aide in distinguishing valid and invalid arguments.

Page 3: Discrete math Truth Table

ConjunctionDisjunctionNegationLogical equivalence

Page 4: Discrete math Truth Table

Conjunction

Joining two statements with AND forms a compound statement called a conjunction.

p Λ q Read as “p and q” The truth value is determined by the

possible values of ITS sub statements. To determine the truth value of a

compound statement we create a truth table

Page 5: Discrete math Truth Table

CONJUNCTION TRUTH TABLE

p q p Λ q

T T T

T F F

F T F

F F F

Page 6: Discrete math Truth Table

Disjunction

Joining two statements with OR forms a compound statement called a “disjunction.

p ν q Read as “p or q” The truth value is determined by the possible values

of ITS sub statements. To determine the truth value of a compound statement

we create a truth table

Page 7: Discrete math Truth Table

DISJUNCTION TRUTH TABLE

p q p ν q

T T T

T F T

F T T

F F F

Page 8: Discrete math Truth Table

NEGATION

¬ p read as not p Negation reverses the truth value of any

statement

Page 9: Discrete math Truth Table

NEGATION TRUTH TABLE

P ¬P

T F

F T

Page 10: Discrete math Truth Table

Truth Table for ¬p Recall that the negation of a

statement is the denial of the statement.

If the statement p is true, the negation of p, i.e. ~p is false.

If the statement p is false, then ¬p is true.

Note that since the statement p could be true or false, we have 2 rows in the truth table.

p ¬p

T FF T

Page 11: Discrete math Truth Table

LOGICAL EQUIVALENCE

Two propositions P(p , q,…) and Q(p , q, …) are said to be logically equivalent, or simply equivalent or equal when they have identical truth tables.

¬(p Λ q) ≡ ¬p V ¬q

Page 12: Discrete math Truth Table

Logical Equivalencep q p^q ¬(p^q)

T T T F

T F F T

F T F T

F F F T

p q ¬p ¬q ¬pV¬q

T T F F F

T F F T T

F T T F T

F F T T T

Page 13: Discrete math Truth Table

Truth Table for p ^ q Recall that the conjunction is

the joining of two statements with the word and.

The number of rows in this truth table will be 4. (Since p has 2 values, and q has 2 value.)

For p ^ q to be true, then both statements p, q, must be true.

If either statement or if both statements are false, then the conjunction is false.

p q p ^ q

T T TT F FF T FF F F

Page 14: Discrete math Truth Table

Truth Table for p v q Recall that a disjunction is the

joining of two statements with the word or.

The number of rows in this table will be 4, since we have two statements and they can take on the two values of true and false.

For a disjunction to be true, at least one of the statements must be true.

A disjunction is only false, if both statements are false.

p q p v q

T T TT F TF T TF F F

Page 15: Discrete math Truth Table

Truth Table for p q Recall that conditional is a

compound statement of the form “if p then q”.

Think of a conditional as a promise.

If I don’t keep my promise, in other words q is false, then the conditional is false if the premise is true.

If I keep my promise, that is q is true, and the premise is true, then the conditional is true.

When the premise is false (i.e. p is false), then there was no promise. Hence by default the conditional is true.

p q p q

T T TT F FF T TF F T

Page 16: Discrete math Truth Table

Equivalent Expressions Equivalent expressions are

symbolic expressions that have identical truth values for each corresponding entry in a truth table.

Hence ¬ (¬p) ≡ p. The symbol ≡ means

equivalent to.

p ¬p ¬(¬p)T F TF T F

Page 17: Discrete math Truth Table

De Morgan’s Laws

The negation of the conjunction p ^ q is given by ~(p ^ q) ≡ ~p v ~q.

“Not p and q” is equivalent to “not p or not q.”

The negation of the disjunction p v q is given by ~(p v q) ≡ ~p ^ ~q.

“Not p or q” is equivalent to “not p and not q.”