Normal Forms Note: all ppts about normal forms are skipped.

Similar documents
Disjunction/Conjunction Normal Form

COMP 182 Algorithmic Thinking. Proofs. Luay Nakhleh Computer Science Rice University

The following techniques for methods of proofs are discussed in our text: - Vacuous proof - Trivial proof

Chapter 1, Logic and Proofs (3) 1.6. Rules of Inference

Proofs. Introduction II. Notes. Notes. Notes. Slides by Christopher M. Bourke Instructor: Berthe Y. Choueiry. Fall 2007

software design & management Gachon University Chulyun Kim

Proofs: A General How To II. Rules of Inference. Rules of Inference Modus Ponens. Rules of Inference Addition. Rules of Inference Conjunction

UNIVERSITY OF CALICUT SCHOOL OF DISTANCE EDUCATION B Sc (MATHEMATICS) I Semester Core Course. FOUNDATIONS OF MATHEMATICS (MODULE I & ii) QUESTION BANK

Example ( x.(p(x) Q(x))) ( x.p(x) x.q(x)) premise. 2. ( x.(p(x) Q(x))) -elim, 1 3. ( x.p(x) x.q(x)) -elim, x. P(x) x.

Sec$on Summary. Mathematical Proofs Forms of Theorems Trivial & Vacuous Proofs Direct Proofs Indirect Proofs

Introduction to proofs. Niloufar Shafiei

Undergraduate Notes in Mathematics. Arkansas Tech University Department of Mathematics. Introductory Notes in Discrete Mathematics Solution Guide

First order Logic ( Predicate Logic) and Methods of Proof

Tools for reasoning: Logic. Ch. 1: Introduction to Propositional Logic Truth values, truth tables Boolean logic: Implications:

Section 1.2 Propositional Equivalences. A tautology is a proposition which is always true. A contradiction is a proposition which is always false.

The Foundations: Logic and Proofs. Chapter 1, Part III: Proofs

1 The Foundation: Logic and Proofs

Readings: Conjecture. Theorem. Rosen Section 1.5

Boolean Algebra and Proof. Notes. Proving Propositions. Propositional Equivalences. Notes. Notes. Notes. Notes. March 5, 2012

Propositional Calculus

Discrete Mathematics Logics and Proofs. Liangfeng Zhang School of Information Science and Technology ShanghaiTech University

Proofs. Joe Patten August 10, 2018

Unit I LOGIC AND PROOFS. B. Thilaka Applied Mathematics

Math.3336: Discrete Mathematics. Proof Methods and Strategy

1 The Foundation: Logic and Proofs

LECTURE NOTES DISCRETE MATHEMATICS. Eusebius Doedel

Discrete Mathematics & Mathematical Reasoning Predicates, Quantifiers and Proof Techniques

Conjunction: p q is true if both p, q are true, and false if at least one of p, q is false. The truth table for conjunction is as follows.

Equivalence of Propositions

Discrete Mathematics

Ch 3.2: Direct proofs

Full file at

Lecture Notes on DISCRETE MATHEMATICS. Eusebius Doedel

Mat 243 Exam 1 Review

Lecture 2: Proof Techniques Lecturer: Lale Özkahya

The Process of Mathematical Proof

Mathematical Reasoning Rules of Inference & Mathematical Induction. 1. Assign propositional variables to the component propositional argument.

(3,1) Methods of Proof

LECTURE NOTES DISCRETE MATHEMATICS. Eusebius Doedel

Homework 3: Solutions

1.7 Proof Methods and Strategy

2. The Logic of Compound Statements Summary. Aaron Tan August 2017

CSE 20 DISCRETE MATH. Winter

MATH CSE20 Homework 5 Due Monday November 4

Proof Terminology. Technique #1: Direct Proof. Learning objectives. Proof Techniques (Rosen, Sections ) Direct Proof:

EECS 1028 M: Discrete Mathematics for Engineers

CITS2211 Discrete Structures Proofs

Chapter 2 Section 2.1: Proofs Proof Techniques. CS 130 Discrete Structures

CSE 20 DISCRETE MATH. Fall

9/5/17. Fermat s last theorem. CS 220: Discrete Structures and their Applications. Proofs sections in zybooks. Proofs.

CMPSCI 250: Introduction to Computation. Lecture 11: Proof Techniques David Mix Barrington 5 March 2013

Midterm Exam Solution

Show Your Work! Point values are in square brackets. There are 35 points possible. Tables of tautologies and contradictions are on the last page.

Chapter 1 Elementary Logic

Logic as a Tool Chapter 4: Deductive Reasoning in First-Order Logic 4.4 Prenex normal form. Skolemization. Clausal form.

ECOM Discrete Mathematics

Proofs of Mathema-cal Statements. A proof is a valid argument that establishes the truth of a statement.

Section Summary. Proof by Cases Existence Proofs

Lecture 2. Logic Compound Statements Conditional Statements Valid & Invalid Arguments Digital Logic Circuits. Reading (Epp s textbook)

Foundations of Mathematics MATH 220 FALL 2017 Lecture Notes

Topics in Logic and Proofs

MaanavaN.Com MA1256 DISCRETE MATHEMATICS. DEPARTMENT OF MATHEMATICS QUESTION BANK Subject & Code : MA1256 DISCRETE MATHEMATICS

MATH 324 Summer 2011 Elementary Number Theory. Notes on Mathematical Induction. Recall the following axiom for the set of integers.

With Question/Answer Animations. Chapter 1, Part III: Proofs

Language of Propositional Logic

1.1 Language and Logic

Basic Proof Examples

Packet #1: Logic & Proofs. Applied Discrete Mathematics

Proofs. Example of an axiom in this system: Given two distinct points, there is exactly one line that contains them.

CSE20: Discrete Mathematics for Computer Science. Lecture Unit 2: Boolan Functions, Logic Circuits, and Implication

Some Review Problems for Exam 1: Solutions

CSC Discrete Math I, Spring Propositional Logic

Tecniche di Verifica. Introduction to Propositional Logic

Proofs. Chapter 2 P P Q Q

Steinhardt School of Culture, Education, and Human Development Department of Teaching and Learning. Mathematical Proof and Proving (MPP)

2. Prove that there are no positive perfect cubes less than 1000 that are the sum of the cubes of two positive integers.

Foundation of proofs. Jim Hefferon.

CSC 125 :: Final Exam May 3 & 5, 2010

Lecture Notes 1 Basic Concepts of Mathematics MATH 352

CS206 Lecture 03. Propositional Logic Proofs. Plan for Lecture 03. Axioms. Normal Forms

1.1 Language and Logic

Handout on Logic, Axiomatic Methods, and Proofs MATH Spring David C. Royster UNC Charlotte

Logic and Proof. Aiichiro Nakano

What is Logic? Introduction to Logic. Simple Statements. Which one is statement?

Discrete Mathematical Structures: Theory and Applications

Logic. Definition [1] A logic is a formal language that comes with rules for deducing the truth of one proposition from the truth of another.

Math 324 Summer 2012 Elementary Number Theory Notes on Mathematical Induction

586 Index. vertex, 369 disjoint, 236 pairwise, 272, 395 disjoint sets, 236 disjunction, 33, 36 distributive laws

Proofs. Chapter 2 P P Q Q

Lecture 7 Feb 4, 14. Sections 1.7 and 1.8 Some problems from Sec 1.8

In Exercises 1 12, list the all of the elements of the given set. 2. The set of all positive integers whose square roots are less than or equal to 3

Statements, Implication, Equivalence

Logic Overview, I. and T T T T F F F T F F F F

Section 3.1: Direct Proof and Counterexample 1

Propositional Resolution

Propositional Logic, Predicates, and Equivalence

Discrete Mathematics Basic Proof Methods

CSE 20 DISCRETE MATH WINTER

CSE 20 DISCRETE MATH SPRING

Announcements. Exam 1 Review

Transcription:

Normal Forms Note: all ppts about normal forms are skipped. Well formed formula (wff) also called formula, is a string consists of propositional variables, connectives, and parenthesis used in the proper manner. E.g. ((p q) ( p r)) p q r is a disjunction expression, and p q r is a conjunction expression. Product for conjunction, sum for disjunction. An elementary product is a conjunction of literals. An elementary sum is a disjunction of literals. A variable of the negation of a variable is called a literal. 1

Disjunction/Conjunction Normal Form Disjunctive normal form (DNF) a formula which is equivalent to a given formula and consists of a sum of elementary products E.g. (p q) q ( p q) (q q), that is ( p q), which is in DNF. Conjunctive normal form (CNF) - a formula which is equivalent to a given formula and consists of a product of elementary sums E.g (p q) q ( p q) q is in CNF. 2

Sufficient and Necessary Condition A necessary and sufficient condition for an elementary product to be false it contains at least one pair of literals in which one is the negation of the other. A necessary and sufficient condition for an elementary sum to be true it contains at least one pair of liters in which one is the negation of the other. p p F = F p p T = T 3

Fallacy or Tautology A given formula is identically false (a contradiction), if every elementary product appearing in its disjunctive normal form is identically false. A given formula in a given formula is identically true (a tautology), if every elementary sum appearing in the formula has at least two literals, of which one is the negation of the other. 4

Principal Disjunctive Normal Form Minterms of p and q p q, p q, p q, p q each variable occurs either negated or nonnegated but not both occur together in the conjunction. Principal disjunctive normal form for a given formula, an equivalent formula consisting of disjunctions of minterms only, also called sum of products canonical form. p q = p q = (p q) ( p q) ( p q) What is the principal disjunctive normal form for (p q) ( p r) (q r)? (see example 4) 5

Examples of PDNF p q = p q = ( p ( p q)) ((p ( p q)) = ( p) ( p q) ( p p) (p q) =( p ( q q)) (p q) ( p q) =( p q) (p q) ( p q) What is the principal disjunctive normal form for (p q) ( p r) (q r)? (see example 4) (p q)=(p q) (r r)=(p q r) (p q r) ( p r)=( p r q) ( p r q) (q r)=(p q r) ( p q r) Hence, (p q r) (p q r) ( p q r) ( p r q) 6

Principal Conjunctive Normal Form Maxterms of p and q p q, p q, p q, p q each variable occurs either negated or nonnegated but not both, appears only once. Principal conjunctive normal form for a given formula, an equivalent formula consisting of disjunctions of maxterms only, also called product-of-sums canonical form. p q = p q is in PCNF. What is the principal conjunctive normal form for [(p q) p q]? (see example 6) 7

Examples of PDNF & PCNF p q = (p q) ( p q) in PDNF. p q = [p (q q)] [ q (p p)] = (p q) (p q) ( q p) ( q p) = (p q) (p q) ( p q) in PDNF p q = ( p q) ( q p) in PCNF (p q) (q p) = ( p q) ( q p) = ( p q) ( q p) = = (p q) in PCNF 8

Notations of Σ and Π (mutually exclusive) maxterms of p and q p q, p q, p q, p q represented by 00, 10, 01, 11, or Π 0, Π 2, Π 1, Π 3 Minterms of p and q p q, p q, p q, p q represented by 11, 01, 10, 00, or Σ 3, Σ 1, Σ 2, Σ 0 [(p q) p q] =[(p p ) (q p)] q =(q p) q = (q p) q = q p q = p q = Π 1 (p q) (q p) =( p q ) ( q p) = ( p q ) ( q p) =(p q) ( q (p p)) (p (q q)) =(p q) (p q) ( p q) = Σ0,2,3 = Π 1 ( 兩者互補 ) 9

First Order Logic Clause form statements whose elementary components are connected by the operator OR ( ) Any statement expressed in the first-order logic can be expressed in clause form. Briefly speaking, each component of a first-order logic expression is expressed by using or or not operators and the whole expression is depicted without implications. 10

Prenex Normal Forms (1/2) A formula F is called a Prenex normal form iff F is a first order logic and is in the form of (Q 1 x 1,, Q n x n )(M) where every (Q i x i ), i=1,,n is either ( x i ) or ( x i ) and M is a formula containing no quantifiers. (Q 1 x 1,, Q n x n ) is called the prefix, and M is called the matrix of F. 11

Prenex Normal Forms (2/2) Convert a first order logic into prenex normal form 1. Replace and using,, 2. Use double negation and De Morgan s law repeatedly 3. Rename the variables if necessary 4. Use rules of (i) distributes over, distributes over (ii) doesn t distribute over, doesn t distribute over and bring the quantifiers to the left. 12

Examples of Prenex Normal Forms (1/2) There are 4 rules which are frequently used: 1. 2. x P(x) x P(x) x P(x) x P(x) 3. (Qx) F(x) G Qx (F(x) G), if G doesn t contain x 4. (Qx) F(x) G Qx (F(x) G), if G doesn t contain x 13

Examples of Prenex Normal Forms (2/2) E.g. 1 x P(x) x Q(x) sol: ( x P(x)) x Q(x) x P(x) x Q(x) x ( P(x) Q(x)) E.g. 2 x y ( z (P(x,z) P(y,z)) uq(x,y,u) sol: x y z(p(x,z) P(y,z)) uq(x,y,u) x y ( z P(x,z) P(y,z)) uq(x,y,u) x y z u (( P(x,z) P(y,z)) Q(x,y,u)) x y z u ( P(x,z) P(x,z) Q(x,y,u)) 14

Terminology for Proof Axioms statements we assume to be true Proposition, Lemma, Theorem statement that can be shown to be true. Corollary theorem that can be established directly from a proven theorem Conjecture statement that is being proposed to be a true statement, usually based on the basis of some partial evidence, a heuristic argument, or an intuition of an expert. 15

Why Proof? Introduction to Proofs. What is a (valid) proof? Why are proofs necessary? 16

Introduction to Proof techniques In a proof, one uses axioms/definitions, premises and proven theorems Proof methods: direct, indirect, trivial, contradiction, proof by cases (exhaustive proof), proof of equivalence, existence proofs (constructive or non-constructive), proof by counterexamples, backward/forward reasoning Open Problems famous unsolved problems 17

Direct/Indirect Proof A direct proof of a conditional statement p q is constructed when the first step is the assumption that p is true, subsequent steps using rules of inference, with the final step showing q must also be true. Indirect proof if we prove the theorem without starting with the premises and end with the conclusion. E.g. If n is an odd integer, then n 2 is odd. E.g. If n is an integer and 3n+2 is odd, then n is odd. (using indirect proof) 18

Proof by Contraposition If (pq) (p+q)/2, then p q Direct proof?? (not trivial) Contrapositive: If p = q, then (pq) = (p+q)/2 It follows by: (pq) = (pp) = (p 2 ) = p (p+p)/2 = (p+q)/2 = p. 19

Vacuous and Trivial Proof Vacuous proof in p q, if we know p is false already, the conditional statement must be true. Trivial proof in p q, if we know q is already true. E.g. P(n) is if n > 1, then n 2 > n. Prove P(0) is true. E.g. P(n) is If a and b are positive integers with a b, then a n b n. Prove P(0) is true. 20

Proof by cases If n is an integer, then n(n+1)/2 is an integer Case 1: n is even. or n = 2a, for some integer a So n(n+1)/2 = 2a*(n+1)/2 = a*(n+1), which is an integer. Case 2: n is odd. n+1 is even, or n+1 = 2a, for an integer a So n(n+1)/2 = n*2a/2 = n*a, which is an integer. 21

Proof by Contradiction 2 is irrational Suppose 2 is rational. Then 2 = p/q, such that p, q have no common factors. Squaring and transposing, p 2 = 2q 2 (even number) So, p is even (if x 2 is even, then x is even) that is, p = 2x for some integer x hence, 4x 2 = 2q 2 or q 2 = 2x 2 So, q is even (if x 2 is even, then x is even) So, p,q are both even they have a common factor of 2. CONTRADICTION. So 2 is NOT rational. Q.E.D. 22

Indirect or Contradiction If n is an integer and n 3 +5 is odd, then n is an even Indirect proof (contrapositive) : Let n= k+1, n 3 +5 = 2(4k 3 +6k 2 +3k+3) Proof by Contradiction: Suppose that n 3 +5 is odd and n is odd 5 = (n 3 +5) - n 3 should be even, because of the difference of two odds, but it is an odd. p q: p and q are true, leading to a contradiction. 23

Existence Proofs (1/2) E.g.1 There exists (distinct) integers x,y,z satisfying x 2 +y 2 = z 2 Proof: x = 3, y = 4, z = 5. (by constructive existence proof) E.g.2 There is a positive integer that can be written as the sum of cubes of positive integers in two different ways. Proof: 1729 = 10 3 +9 3 = 12 3 +1 3 24

Existence Proofs (2/2) There exists irrational b,c, such that b c is rational By nonconstructive proof: Consider 2 2. Two cases are possible: Case 1: 2 2 is rational DONE (b = c = 2). Case 2: 2 2 is irrational Let b = 2 2, c = 2. Then b c = ( 2 2 ) 2 = ( 2) 2* 2 = ( 2) 2 = 2 25

The Use of Counterexamples EX1. All prime numbers are odd (false) Proof: 2 is an even number and a prime. EX2. Every prime number can be written as the difference of two squares, i.e. a 2 b 2. Proof: 2 can t be written as a 2 b 2 26

Proof by Equivalence n is even iff n 2 is even Proof (by equivalence) Let P be n is even, Q be n 2 is even P and Q are equivalence can be proven by P Q and Q P 27

Proofs by Exhaustion Prove that (n+1) 3 3 n if n is a positive integer with n 4 Prove that the only consecutive positive integers not exceeding 100 that are perfect powers are 8 and 9. Show that there are no solutions in integers x and y of x 2 + 3y 2 = 8 Note that: x is perfect power if x = n a, a is a positive integer. 28

What is wrong with the proof? If n 2 is positive, then n is positive. Proof: Suppose that n 2 is positive. Because the conditional statement If n is positive, then n 2 is positive is true, hence we can conclude that n is positive. (fallacy of affirming the conclusion) If n is not positive, then n 2 is not positive. Proof: Suppose that n is not positive. Because the conditional statement If n is positive, then n 2 is positive is true, hence we conclude that n 2 is not positive. (fallacy of denying the hypothesis) 29

What is wrong with the proof? n is an even integer whenever n 2 is an even integer. Proof: Suppose that n 2 is even. Then n 2 =2k fro some integer k. Let n = 2l for some integer l. This shows that n is even. (fallacy of circular reasoning) Hint: Let n = 2l for some integer l is invalid, since no argument has been given to show that n can be written as 2l for some integer l. 30

Conjectures Fermat s Last Theorem x n + y n = z n has no solution in (positive) integers x,y,z with xyz =! 0 whenever n is an integer and is greater than 2. x, y, z, n such that x n + y n = z n? domain of x, y, and z is Z +, domain of n is {x\x > 2, x Z} 31

The 3X + 1 Conjecture 3x+1 conjecture Game: Start from a given integer n. If n is even, replace n by n/2. If n is odd, replace n with 3n+1. Keep doing this until you hit 1. e.g. n=5 16 8 4 2 1 Q: Does this game terminate for all n? 32

Which Mean? For two positive real numbers x and y, Arithmetic mean Is (x+y)/2 Geometric mean Is Sqrt(xy) (which is less than A-mean) Harmonic mean (G 2 = HA) Is 2/(1/x + 1/y)= 2xy/(x+y) Quadratic mean Is Sqrt((x 2 + y 2 )/2) 33

MEMO Read the sections of 1.7 and 1.8. Get familiar with terminology of theorem proving Be familiar with proof methods of contrapositive, counterexample, exhaustive, and existence What is the Fermat s last theorem? HW #13-15,17-19 of 1.7, #13-14,23-24,29-30 of 1.8. 34