lecture 2 1.2 propositional equivalences. compound propositions compound propositions are made by...

18
Lecture 2 1.2 Propositional Equivalences

Upload: benedict-booth

Post on 13-Jan-2016

237 views

Category:

Documents


5 download

TRANSCRIPT

Page 1: Lecture 2 1.2 Propositional Equivalences. Compound Propositions Compound propositions are made by combining existing propositions using logical operators

Lecture 2

1.2 Propositional Equivalences

Page 2: Lecture 2 1.2 Propositional Equivalences. Compound Propositions Compound propositions are made by combining existing propositions using logical operators

Compound Propositions

Compound propositions are made by combining existing propositions using logical operators

Page 3: Lecture 2 1.2 Propositional Equivalences. Compound Propositions Compound propositions are made by combining existing propositions using logical operators

Logical Equivalences

Page 4: Lecture 2 1.2 Propositional Equivalences. Compound Propositions Compound propositions are made by combining existing propositions using logical operators

Example - DeMorgans Laws

Page 5: Lecture 2 1.2 Propositional Equivalences. Compound Propositions Compound propositions are made by combining existing propositions using logical operators

When the number of variables are small, a truth table is an effective method of proof in which all possible truth value permutations are evaluated.

How many rows are in a truth table that enumerates an compound proposition that is comprised of N variables?

More Examples

Page 6: Lecture 2 1.2 Propositional Equivalences. Compound Propositions Compound propositions are made by combining existing propositions using logical operators

Important Equivalences

Page 7: Lecture 2 1.2 Propositional Equivalences. Compound Propositions Compound propositions are made by combining existing propositions using logical operators

Logical Equivalences Involving Quantifiers

Statements involving predicates and quantifiers are logically equivalent iff they have the same

truth value for all applications and for all domains of discourse.

)()()()( xQxxPxxQxPx

)()( xPxxxP

)()( xPxxxP

)()()()( xQxPxxQxPx

Page 8: Lecture 2 1.2 Propositional Equivalences. Compound Propositions Compound propositions are made by combining existing propositions using logical operators

Negation of a Proposition

Let p be a proposition. The negation of p, denoted by ~p is the statement

"It is not the case that p."

or

"The proposition, p is false"

or

"Not p is true"

The proposition ~p is read "not p". The truth value of the negation of p, ~p, is the opposite of the truth value of p.

Pigs have wings.

I have a million dollars.

The negation operation will become more interesting when we introduce univeral and existential quantifiers.

Page 9: Lecture 2 1.2 Propositional Equivalences. Compound Propositions Compound propositions are made by combining existing propositions using logical operators

Conditional Statements

Let p and q be propositions. The conditional statement (or implication) is the proposition "if p, then q." The conditional statement is false when p is true and q is false, and true otherwise. In this conditional statement p is the hypothesis (also called the antecedent or premise) and q is called the conclusion (also called the consequence).

qp

http://www.stanford.edu/class/cs103a/handouts/17%20Conditionals.pdf

Page 10: Lecture 2 1.2 Propositional Equivalences. Compound Propositions Compound propositions are made by combining existing propositions using logical operators

Equivalances with Conditionals and Biconditionals

Page 11: Lecture 2 1.2 Propositional Equivalences. Compound Propositions Compound propositions are made by combining existing propositions using logical operators

Biconditional Statements

Let p and q be propositions. The biconditional statement is the proposition "p if and only if q." The biconditional statement is true when p and q have the same truth values, and is false otherwise.

qp

http://www.stanford.edu/class/cs103a/handouts/17%20Conditionals.pdf

Page 12: Lecture 2 1.2 Propositional Equivalences. Compound Propositions Compound propositions are made by combining existing propositions using logical operators

The converse of the conditional statement is .

Converse

pq qp

p q p->q q->p

0 0 1 1

0 1 1 0

1 0 0 1

1 1 1 1

Page 13: Lecture 2 1.2 Propositional Equivalences. Compound Propositions Compound propositions are made by combining existing propositions using logical operators

Inverse

The inverse of the conditional statement is .qp qp

p q p->q ~p->~q

0 0 1 1

0 1 1 0

1 0 0 1

1 1 1 1

Page 14: Lecture 2 1.2 Propositional Equivalences. Compound Propositions Compound propositions are made by combining existing propositions using logical operators

Contrapositive

The inverse of the conditional statement is . The contrapositivealways has the same truth value as the original statement.

pq qp

p q p->q ~q->~p

0 0 1 1

0 1 1 1

1 0 0 0

1 1 1 1

Page 15: Lecture 2 1.2 Propositional Equivalences. Compound Propositions Compound propositions are made by combining existing propositions using logical operators

Testing System SpecificationsDetermine whether these system specifications are consistent:

"The diagnostic message is stored in the buffer or it is retransmitted"

"The diagnostic message is not stored in the buffer."

"If the diagnostic message is stored in the buffer, then it is retransmitted."

p = "The diagnostic message is stored in the buffer"q = "The diagnostic message is retransmitted."

a.

b.

c.

a.

b.

c. qp

p

qp

For the system to be consistent there must be at least one truth assignment for the variables that make all the statements true.

Add the specification, "The diagnostic message is not retransmitted." and determine if thesystem remains consistent.

a.

b.

c.

d. q

qp

p

qp

p q pvq ~p ~q p->q

0 0 0 1 1 1

0 1 1 1 0 1

1 0 1 0 1 0

1 1 1 0 0 1

Page 16: Lecture 2 1.2 Propositional Equivalences. Compound Propositions Compound propositions are made by combining existing propositions using logical operators

Dual

The dual of a compound proposition that contains only the logical operators , , and is the compound proposition obtained by replacing each by , and each by , each T by F, and each F by T. The dual of s is denoted by s*.

Fqpqp Tqpqp

expression dual

Page 17: Lecture 2 1.2 Propositional Equivalences. Compound Propositions Compound propositions are made by combining existing propositions using logical operators

Satisfiability

A compund proposition is satisfiable if there is an assignment of truth values to the variables in the compund proposition that makes the statement form true.

)()()()()( rqpqrqrppqp

0 0 0 0 1 1 1 1 1

0 0 1 0 1 0 1 1 1

0 1 0 1 1 1 0 0 1

0 1 1 1 1 0 1 0 0

1 0 0 1 0 1 1 1 1

1 0 1 1 0 1 1 1 1

1 1 0 1 0 1 0 0 1

1 1 1 1 0 1 1 0 1

Page 18: Lecture 2 1.2 Propositional Equivalences. Compound Propositions Compound propositions are made by combining existing propositions using logical operators

rqrprqp

Problem:Let X and Y be straight lines and define,

p = "X and Y lie in the same plane" q = "X and Y never cross" r = "X and Y are parallel"

(1) verify that the logical expression is a tautology(2) rewrite the tautology as a statement using the propositions(3) explain the apparent inconsistency

The expression below is one of the logical equivalences listed in Table 6 of the textbook.

Puzzle