<<

Chapter 1.3-1.4 By: Nina L and Ben L Chapter 1.3 Propositional Equivalences

● Logical Equivalences ● Laws ● De Morgan’s Laws ● Propositional Satisfiability But first, some definitions...

Tautology - A compound proposition that is always true regardless of its propositional variables

Ex: That dog is a mammal

Contradiction - A compound proposition that is always

Ex: That dog is a reptile

Contingency - A compound proposition that is neither true or false Logical Equivalences

We can use logical equivalences to reduce complex formulas into simpler ones

T: (always 1)

C: (always 0)

Logic Laws De Morgan’s Laws

● De Morgan’s Theorem was created by Augustus De Morgan, a 19th-century mathematician who developed many of the concepts that make Boolean logic work with electronics. Among De Morgan’s most important work are two related theorems that have to do with how NOT gates are used in conjunction with AND and OR gates: De Morgan’s Laws cont...

The most important logic theorem for digital electronics, this theorem says that any logical binary expression remains unchanged if we

1. Change all variables to their complements. 2. Change all AND operations to ORs. 3. Change all OR operations to ANDs. 4. Take the complement of the entire expression. De Morgan’s Laws cont...

An AND gate with inverted output behaves the same as an OR gate with inverted inputs.

An OR gate with inverted output behaves the same as an AND gate with inverted inputs.

A NAND gate behaves the same as an OR gate with inverted inputs.

A NOR gate behaves the same as an AND gate with inverted inputs. An example of equivalent circuits...

● Makes complex circuits easier to read and build ● Helps lower manufacturing and sale costs. Propositional Satisfiability

A compound proposition is satisfiable if there is an assignment of truth values to its variables that makes it true

Ex: (p v ⇁q) ∧ (q v ⇁r) ∧ (r v ⇁p) T T T 1. p = T 2. Since p is T that would make ⇁p false so r would have to be true 3. Now finally, since r is true that would make ⇁r false leaving q to be true 4. There is an assignment of truth variables so this problem is satisfiable ( This would have worked if we made all of the parenthesis false Applications of satisfiability

● Robotics ● Software testing ● Computer-aided design ● Machine vision ● Integrating circuit design ● Computer networking ● Genetics ● Sudoku

All can be modeled using propositional satisfiability! 1.4 Predicates & Questions

What we will learn

● Predicates, like subject and predicates ● Quantifications ● Domains of Quantifications ● Logical equivalences of Quantifications ● De Morgan’s law applying to Quantifications Predicates

The subject refers to So say P(x) is the statement what the statement is “x is greater than 3”. P(x) talking about. would then mean (x>3). P(x) is known as a propositional The predicate refers to function. the property in the statement the subject P(4) = true and P(2) = false could have. Preconditions - Valid input “x is greater values Postconditions - Valid than 3” output values s ɹǝᴉɟᴉʇ Quantification u ɐ nb The extent in which a predicate is true over a range ǝɹ of elements. Ex. “All, some, few, none, many” ∀ uE '¡E 'xE 'xA / of discourse/ domain

The domain in which all values make the property true for a variable

∀xP(x)

“For all x, the function P(x)” Quantifications continued

Universal Quantification 1. P(x) means “x is greater than 0” 2. ∀xP(x) ∀ ● x “For all x” 3. “For all x, x is greater than 0” Existential Quantification 4. ∀xP(x) = false

● Ǝx “For at least one x”

Uniqueness quantification A. ƎxP(x) B. “For at least one x, x is greater ● Ǝ! “For exactly one x” than 0” C. ƎxP(x) = true ● Ǝn “For exactly n x” Domains of Quantification

∀x < 0 (x2>0) A variable is BOUND “For all x less than 0, x when a is squared is greater used on it than zero” A variable is FREE This is the same as when it is not bound by ∀x (x < 0 —> x2 > 0) a quantifier or set equal to a particular “For all x, if x is less value than 0 then x2 is greater than 0” Domains of Quantification example

∀y ≠ 0 ( y3 ≠ 0) Let’s say P(x) means (x-1 = 0)

“For all values y What is Ǝ!xP(x)? except 0, y cubed does not equal 0” “For at least one value x, x-1 will be 0” ∀y ≠ 0 ( y3 ≠ 0) is true X must equal 1 to for the statement to be true so

Ǝ!xP(x) is true Logical equivalences ∀xP(x) ∀xQ(x) ∀xP(x) Λ ∀xQ(x) ∀x( P(x) Λ Q(x) )

● To see if two propositions using quantifiers are equivalent, their truth tables must be T T T T the same. ● More technically, statements involving predicates and quantifiers are logically T F F F equivalent if they have the same truth value no matter what predicate or domain is used. F T F F Is ∀x( P(x) Λ Q(x) ) equal to ∀xP(x) Λ ∀xQ(x)

We would use a = sign with 3 lines instead of 2 to show equivalency among propositional F F F F statements Negating Quantified expressions/ De Morgan’s Law De Morgan’s Law example

What is the statements for ∀x(x2>x)?

( ∀x(x2>x) )’ = Ǝx (x2>x)’

Ǝx (x2>x)’ = Ǝx (x2 <= x) Comments? Questions? Concerns?

Some commonly asked Questions ● Who would win, a 43 yard field goal or Cody Parkey? ● Is that Professor Kardaras? ○ Too soon ○ Yes ● Is santa real? ● Who’s the guy with the photo of the neck? ○ It’s unlikely ○ I don’t know but it was on our professor’s ● What’s the meaning of life? NCC profile pic ○ Yes ● How do you tie your shoes? ○ Google it ● That was a lame presentation and it wasn’t funny ○ Okay