0% found this document useful (0 votes)
14 views33 pages

Week1 Part2 PropositionalEquivalences

Uploaded by

erenalp343471
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views33 pages

Week1 Part2 PropositionalEquivalences

Uploaded by

erenalp343471
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 33

Chapter 1, Part I

Propositional Equivalences

With Question/Answer Animations


Chapter Summary
● Propositional Logic
● Predicate Logic
● Proofs
Copyright © McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written consent of McGraw-Hill Education.
Section 1.3 of Rosen’s Book
Section Summary
● Tautologies, Contradictions, and Contingencies.
● Logical Equivalence
● Important Logical Equivalences
● Showing Logical Equivalence

● Normal Forms (optional, covered in exercises in text)


● Disjunctive Normal Form
● Conjunctive Normal Form

● Propositional Satisfiability
● Sudoku Example

2
Tautologies, Contradictions, and Contingencies
A tautology is a proposition which is always true.
● Example: p ∨¬p

3
Tautologies, Contradictions, and Contingencies
A contradiction is a proposition which is always false.
● Example: p ∧¬p

4
Tautologies, Contradictions, and Contingencies
A contingency is a proposition which is neither a
tautology nor a contradiction, such as p

5
Tautologies, Contradictions, and Contingencies

p ¬p p ∨¬p p ∧¬p

T F T F

F T T F

6
Logically Equivalent
p and q are logically equivalent if p↔q is a tautology.

7
Logically Equivalent
p and q are logically equivalent if p↔q is a tautology.

¬p ∨ q is equivalent to p → q.

p q ¬p ¬p ∨ q p→ q
T T F T T
T F F F F
F T T T T
F F T T T

(¬p ∨ q) ≡ (p → q)
8
De Morgan’s Laws
Augustus De Morgan

1806-1871

This truth table shows that De Morgan’s Second Law holds.

p q ¬p ¬q (p∨q) ¬(p∨q) ¬p∧¬q


T T F F T F F
T F F T T F F
F T T F T F F
F F T T F T T

9
Key Logical Equivalences
● Identity Laws: ,

● Domination Laws: ,

● Idempotent laws: ,

● Double Negation Law:

● Negation Laws: ,
10
Key Logical Equivalences (cont)
● Commutative Laws: ,

● Associative Laws:

● Distributive Laws:

● Absorption Laws:

11
More Logical Equivalences

12
Equivalence Proofs
Example: Show that
is logically equivalent to
Solution:

13
Equivalence Proofs
Example: Show that
is a tautology.
Solution:

14
Disjunctive Normal Form (optional)
● A propositional formula is in disjunctive normal form if it
consists of a disjunction of (1, … ,n) disjuncts where each
disjunct consists of a conjunction of (1, …, m) atomic
formulas or the negation of an atomic formula.
● Yes A
(A ∧ ¬B) ∨ ( ¬C ∧ D ∧ E)
(C ∧ D) ∨ E

● No C ∧ (D ∨ E)
● Disjunctive Normal Form is important for the circuit
design methods.
15
Disjunctive Normal Form (optional)
Example: Find the Disjunctive Normal Form (DNF) of
(p∨q)→¬r

Solution: This proposition is true when r is false or


when both p and q are false.
(¬ p∧ ¬ q) ∨ ¬r

16
Conjunctive Normal Form (optional)
● A compound proposition is in Conjunctive Normal Form (CNF) if it
is a conjunction of disjunctions.
● Every proposition can be put in an equivalent CNF.
● Conjunctive Normal Form (CNF) can be obtained by eliminating
implications, moving negation inwards and using the distributive
and associative laws.
● Important in resolution theorem proving used in artificial
Intelligence (AI).
● A compound proposition can be put in conjunctive normal form
through repeated application of the logical equivalences covered
earlier.

17
Conjunctive Normal Form (optional)
Example: Put the following into CNF:

Solution:
1. Eliminate implication signs:

2. Move negation inwards; eliminate double negation:

3. Convert to CNF using associative/distributive laws

18
Propositional Satisfiability
● A compound proposition is satisfiable if there is an
assignment of truth values to its variables that make it
true.
● When no such assignments exist, the compound
proposition is unsatisfiable.

19
Propositional Satisfiability
● A compound proposition is satisfiable if there is an
assignment of truth values to its variables that make it
true.
● When no such assignments exist, the compound
proposition is unsatisfiable.

A compound proposition is unsatisfiable


if and only if its negation is a tautology.

20
Questions on Propositional
Satisfiability
Example: Determine the satisfiability of the following
compound propositions:

21
Questions on Propositional
Satisfiability
Example: Determine the satisfiability of the following
compound propositions:

Solution:

Satisfiable. Assign T to p, q, and r.

22
Questions on Propositional
Satisfiability

Example: Determine the satisfiability of the following


compound propositions:

23
Questions on Propositional
Satisfiability

Example: Determine the satisfiability of the following


compound propositions:

Solution:

Satisfiable. Assign T to p and F to q.

24
Questions on Propositional
Satisfiability
Example: Determine the satisfiability of the following
compound propositions:

Solution:
Not satisfiable.

Check each possible assignment of truth values to the


propositional variables and none will make the
proposition true.
25
Notation

Needed for the next example.

26
Sudoku
● A Sudoku puzzle is represented by a 9×9 grid made
up of nine 3×3 subgrids, known as blocks. Some of
the 81 cells of the puzzle are assigned one of the
numbers 1,2, …, 9.
● The puzzle is solved by assigning numbers to each
blank cell so that every row, column and block
contains each of the nine possible numbers.
● Example

27
Encoding as a Satisfiability Problem
● Let p(i,j,n) denote the proposition that is true when
the number n is in the cell in the ith row and the jth
column.
● There are 9×9 × 9 = 729 such propositions.
● In the sample puzzle p(5,1,6) is true, but p(5,j,6) is
false for j = 2,3,…9

28
Encoding (cont)
● For each cell with a given value, assert p(i,j,n), when
the cell in row i and column j has the given value.
● Assert that every row contains every number.

[(p(1,1,1)Vp(1,2,1)V… p(1,9,1))and(p(1,1,2)V…p(1,9,2))and…] and


[(p(2,1,1)Vp(2,2,1)V… p(2,9,1))and(p(2,1,2)V…p(2,9,2))and…] and

[(p(9,1,1)Vp(9,2,1)V… p(9,9,1))and(p(9,1,2)V…p(9,9,2))and…]

29
Encoding (cont)
● For each cell with a given value, assert p(i,j,n), when
the cell in row i and column j has the given value.
● Assert that every column contains every number.

[(p(1,1,1)Vp(2,1,1)V… p(9,1,1))and(p(1,1,2)V…p(9,1,2))and…] and


[(p(1,2,1)Vp(2,2,1)V… p(9,2,1))and(p(1,2,2)V…p(9,2,2))and…] and

[(p(1,9,1)Vp(2,9,1)V… p(9,9,1))and(p(1,9,2)V…p(9,9,2))and…]

30
Encoding (cont)
● Assert that each of the 3 x 3 blocks contain every
number.

(this is tricky - ideas from chapter 4 help)


[(p(1,1,1)Vp(1,2,1)Vp(1,3,1))and(p(2,1,1)Vp(2,2,1)Vp(2,3,1))and(p(3,1,1)Vp(3,2,1)Vp(3,3,1)) and
(p(1,1,2)Vp(1,2,2)Vp(1,3,2))and(p(2,1,2)Vp(2,2,2)Vp(2,3,2))and(p(3,1,2)Vp(3,2,2)Vp(3,3,2)) and

(p(1,1,9)Vp(1,2,9)Vp(1,3,9))and(p(2,1,9)Vp(2,2,9)Vp(2,3,9))and(p(3,1,9)Vp(3,2,9)Vp(3,3,9))] and
[(p(1,4,1)Vp(1,5,1)Vp(1,6,1))and(p(2,4,1)Vp(2,5,1)Vp(2,6,1))and(p(3,4,1)Vp(3,5,1)Vp(3,6,1)) and
(p(1,4,2)Vp(1,5,2)Vp(1,6,2))and(p(2,4,2)Vp(2,5,2)Vp(2,6,2))and(p(3,4,2)Vp(3,5,2)Vp(3,6,2)) and

(p(1,4,9)Vp(1,5,9)Vp(1,6,9))and(p(2,4,9)Vp(2,5,9)Vp(2,6,9))and(p(3,4,9)Vp(3,5,9)Vp(3,6,9))] and

31
Encoding (cont)
● Assert that no cell contains more than one number.

● Take the conjunction over all values of n, n’, i, and j,


where each variable ranges from 1 to 9 and ,
of

32
Solving Satisfiability Problems
● To solve a Sudoku puzzle, we need to find an assignment
of truth values to the 729 variables of the form p(i,j,n) that
makes the conjunction of the assertions true.
—>Those variables that are assigned T yield a solution to the puzzle.
● A truth table can always be used to determine the
satisfiability of a compound proposition. But this is too
complex even for modern computers for large problems.
● There has been much work on developing efficient methods
for solving satisfiability problems as many practical
problems can be translated into satisfiability problems.

33

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy