mathematics for computing
play

Mathematics for Computing COMP SCI 1FC3 McMaster University, Winter - PDF document

Mathematics for Computing COMP SCI 1FC3 McMaster University, Winter 2013 Wolfram Kahl kahl@cas.mcmaster.ca 31 January 2013 Preliminary Slides Plan for Today Textbook Chapter 3: Propositional Calculus Disjunction Conjunction Doing proofs


  1. Mathematics for Computing COMP SCI 1FC3 McMaster University, Winter 2013 Wolfram Kahl kahl@cas.mcmaster.ca 31 January 2013 Preliminary Slides Plan for Today Textbook Chapter 3: Propositional Calculus Disjunction Conjunction Doing proofs

  2. Theorems A theorem is either an axiom or the conclusion of an inference rule where the premises are theorems or a Boolean expression proved (using the inference rules) equal to an axiom or a previously proved theorem . Such proofs will be presented in the calculational style . Note: “ theorem ” is a syntactic concept − → proofs “ validity ” is a semantic concept − → truth tables For the propositional logic E , theoremhood and validity coincide: All theorems in E are valid: E is sound All valid Boolean expressions are theorems in E : E is complete Disjunction Axioms (3.24) Axiom, Symmetry of ∨ : p ∨ q ≡ q ∨ p (3.25) Axiom, Associativity of ∨ : ( p ∨ q ) ∨ r ≡ p ∨ ( q ∨ r ) (3.26) Axiom, Idempotency of ∨ : p ∨ p ≡ p (3.27) Axiom, Distributivity of ∨ over ≡ : p ∨ ( q ≡ r ) ≡ p ∨ q ≡ p ∨ r p ∨ ¬ p (3.28) Axiom, Excluded Middle :

  3. Disjunction Axioms and Theorems (3.24) Axiom, Symmetry of ∨ : p ∨ q ≡ q ∨ p (3.25) Axiom, Associativity of ∨ : ( p ∨ q ) ∨ r ≡ p ∨ ( q ∨ r ) (3.26) Axiom, Idempotency of ∨ : p ∨ p ≡ p (3.27) Axiom, Distr. of ∨ over ≡ : p ∨ ( q ≡ r ) ≡ p ∨ q ≡ p ∨ r p ∨ ¬ p (3.28) Axiom, Excluded Middle : Theorems: (3.29) Zero of ∨ : p ∨ true ≡ true (3.30) Identity of ∨ : p ∨ false ≡ p (3.31) Distrib. of ∨ over ∨ : p ∨ ( q ∨ r ) ≡ ( p ∨ q ) ∨ ( p ∨ r ) p ∨ q ≡ p ∨ ¬ q ≡ p (3.32) (3.32) Heuristics of Directing Calculations (3.33) Heuristic: To prove P ≡ Q , transform the expression with the most structure (either P or Q ) into the other. Proving (3.29) p ∨ true ≡ true : Proving (3.29) p ∨ true ≡ true : p ∨ true true ? = � Identity of ≡ (3.3) � = � Identity of ≡ (3.3) � p ∨ ( q ≡ q ) p ∨ p ≡ p ∨ p = � Distr. of ∨ over ≡ (3.27) � = � Distr. of ∨ over ≡ (3.27) � p ∨ q ≡ p ∨ q p ∨ ( p ≡ p ) = � Identity of ≡ (3.3) � = � Identity of ≡ (3.3) � p ∨ true true (3.34) Principle: Structure proofs to minimize the number of rabbits pulled out of a hat — make each step seem obvi- ous, based on the structure of the expression and the goal of the manipulation.

  4. The Conjunction Axiom: The “Golden Rule” (3.35) Axiom, Golden rule : p ∧ q ≡ p ≡ q ≡ p ∨ q Can be used as: p ∧ q = ( p ≡ q ≡ p ∨ q ) ( p ≡ q ) = ( p ∧ q ≡ p ∨ q ) . . . Theorems: (3.36) Symmetry of ∧ : p ∧ q ≡ q ∧ p (3.37) Associativity of ∧ : ( p ∧ q ) ∧ r ≡ p ∧ ( q ∧ r ) (3.38) Idempotency of ∧ : p ∧ p ≡ p (3.39) Identity of ∧ : p ∧ true ≡ p (3.40) Zero of ∧ : p ∧ false ≡ false (3.41) Distributivity of ∧ over ∧ : p ∧ ( q ∧ r ) ≡ ( p ∧ q ) ∧ ( p ∧ r ) (3.42) Contradiction : p ∧ ¬ p ≡ false Theorems Relating ∧ and ∨ p ∧ ( p ∨ q ) ≡ (3.43) Absorption : p p ∨ ( p ∧ q ) ≡ p p ∧ ( ¬ p ∨ q ) ≡ p ∧ q (3.44) Absorption : p ∨ ( ¬ p ∧ q ) ≡ p ∨ q (3.45) Distributivity of ∨ over ∧ : p ∨ ( q ∧ r ) ≡ ( p ∨ q ) ∧ ( p ∨ r ) (3.46) Distributivity of ∧ over ∨ : p ∧ ( q ∨ r ) ≡ ( p ∧ q ) ∨ ( p ∧ r ) ¬ ( p ∧ q ) ≡ ¬ p ∨ ¬ q (3.47) De Morgan : ¬ ( p ∨ q ) ≡ ¬ p ∧ ¬ q

  5. Raymond Smullyan posed many puzzles about an island that has two kinds of inhabitants: knights , who always tell the truth, and knaves , who always lie. You encounter two people A and B . What are A and B if A says “We are both knaves.”? 1 A says “At least one of us is a knave.”? 2 A says “If I am a knight, then so is B .”? 3 A says “We are of the same type.”? 4 A says “ B is a knight” and 5 B says “The two of us are opposite types.”? A says “We are both knaves.”? 1 ≡ ≡ ¬ X A says X A V A says ( A V ∧ B V )

  6. Theorems Relating ∧ and ≡ p ∧ q ≡ p ∧ ¬ q ≡ ¬ p (3.48) (3.48) p ∧ ( q ≡ r ) ≡ p ∧ q ≡ p ∧ r ≡ (3.49) p p ∧ ( q ≡ p ) ≡ p ∧ q (3.50) ( p ≡ q ) ∧ ( r ≡ p ) ≡ ( p ≡ q ) ∧ ( r ≡ q ) (3.51) Replacement : Alternative Definitions of ≡ and �≡ (3.52) Definition of ≡ : p ≡ q ≡ ( p ∧ q ) ∨ ( ¬ p ∧ ¬ q ) (3.53) Definition of �≡ : p �≡ q ≡ ( ¬ p ∧ q ) ∨ ( p ∧ ¬ q )

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend