SlideShare une entreprise Scribd logo
1  sur  27
Lecture 5
 Recall, Homework #1 posted in elearning.
    Due beginning of class Feb 11
 Solutions to Quiz #2
 Rules of Inference and Proofs
Rules of Inference for Propositional
Logic: Modus Ponens
                      Corresponding Tautology:
                         (p ∧ (p →q)) → q




          Example:
          Let p be “It is snowing.”
          Let q be “I will study discrete math.”

          “If it is snowing, then I will study discrete math.”
          “It is snowing.”

          “Therefore , I will study discrete math.”
Modus Tollens
                            Corresponding Tautology:
                               (¬p∧(p →q))→¬q




        Example:
        Let p be “it is snowing.”
        Let q be “I will study discrete math.”

        “If it is snowing, then I will study discrete math.”
        “I will not study discrete math.”

        “Therefore , it is not snowing.”
Hypothetical Syllogism
                          Corresponding Tautology:
                          ((p →q) ∧ (q→r))→(p→ r)




        Example:
        Let p be “it snows.”
        Let q be “I will study discrete math.”
        Let r be “I will get an A.”

        “If it snows, then I will study discrete math.”
        “If I study discrete math, I will get an A.”

        “Therefore , If it snows, I will get an A.”
Disjunctive Syllogism
                         Corresponding Tautology:
                         (¬p∧(p ∨q))→q



       Example:
       Let p be “I will study discrete math.”
       Let q be “I will study English literature.”

       “I will study discrete math or I will study English literature.”
       “I will not study discrete math.”

       “Therefore , I will study English literature.”
Addition
                             Corresponding Tautology:
                                  p →(p ∨q)



           Example:
           Let p be “I will study discrete math.”
           Let q be “I will visit Las Vegas.”

           “I will study discrete math.”

           “Therefore, I will study discrete math or I will visit
           Las Vegas.”
Simplification

                              Corresponding Tautology:
                                  (p∧q) →p



       Example:
       Let p be “I will study discrete math.”
       Let q be “I will study English literature.”

       “I will study discrete math and English literature”

       “Therefore, I will study discrete math.”
Conjunction
                                  Corresponding Tautology:
                                  ((p)∧ (q)) →(p ∧ q)



       Example:
       Let p be “I will study discrete math.”
       Let q be “I will study English literature.”


       “I will study discrete math.”
       “I will study English literature.”

       “Therefore, I will study discrete math and I will study
       English literature.”
Resolution                      Resolution plays an important role
                                in AI and is used in Prolog.


                            Corresponding Tautology:
                            ((¬p ∨ r )∧ (p ∨ q)) →(q ∨ r)



     Example:
     Let p be “I will study discrete math.”
     Let r be “I will study English literature.”
     Let q be “I will study databases.”

     “I will not study discrete math or I will study English literature.”
     “I will study discrete math or I will study databases.”

     “Therefore, I will study databases or I will English literature.”
Valid Arguments
Example 1: From the single proposition

Show that q is a conclusion.
Solution:
Handling Quantified Statements
 Valid arguments for quantified statements are a
 sequence of statements. Each statement is either a
 premise or follows from previous statements by rules
 of inference which include:
   Rules of Inference for Propositional Logic
   Rules of Inference for Quantified Statements
 The rules of inference for quantified statements are
 introduced in the next several slides.
Universal Instantiation (UI)



     Example:

     Our domain consists of all dogs and Fido is a dog.

     “All dogs are cuddly.”

     “Therefore, Fido is cuddly.”
Universal Generalization (UG)




        Used often implicitly in Mathematical Proofs.
Existential Instantiation (EI)



     Example:

     “There is someone who got an A in the course.”
     “Let’s call her a and say that a got an A”
Existential Generalization (EG)



     Example:

     “Michelle got an A in the class.”
     “Therefore, someone got an A in the class.”
Using Rules of Inference
Example 1: Using the rules of inference, construct a valid
  argument to show that
   “John Smith has two legs”
  is a consequence of the premises:
   “Every man has two legs.” “John Smith is a man.”
Solution: Let M(x) denote “x is a man” and L(x) “ x has two legs”
  and let John Smith be a member of the domain.
   Valid Argument:
Using Rules of Inference
 Example 2: Use the rules of inference to construct a valid argument
  showing that the conclusion
  “Someone who passed the first exam has not read the book.”
 follows from the premises
  “A student in this class has not read the book.”
  “Everyone in this class passed the first exam.”
 Solution: Let C(x) denote “x is in this class,” B(x) denote “ x has read
 the book,” and P(x) denote “x passed the first exam.”
   First we translate the
   premises and conclusion
   into symbolic form.




            Continued on next slide
Using Rules of Inference
 Valid Argument:
Section Summary
 Mathematical Proofs
 Forms of Theorems
 Direct Proofs
 Indirect Proofs
    Proof of the Contrapositive
    Proof by Contradiction
Proofs of Mathematical Statements
 A proof is a valid argument that establishes the truth of a
  statement.
 In math, CS, and other disciplines, informal proofs which are
  generally shorter, are generally used.
      More than one rule of inference are often used in a step.
      Steps may be skipped.
      The rules of inference used are not explicitly stated.
      Easier for to understand and to explain to people.
      But it is also easier to introduce errors.
 Proofs have many practical applications:
    verification that computer programs are correct
    establishing that operating systems are secure
    enabling programs to make inferences in artificial intelligence
    showing that system specifications are consistent
Definitions
 A theorem is a statement that can be shown to be true using:
    definitions
    other theorems
    axioms (statements which are given as true)
    rules of inference
 A lemma is a ‘helping theorem’ or a result which is needed to
  prove a theorem.
 A corollary is a result which follows directly from a theorem.
 Less important theorems are sometimes called propositions.
 A conjecture is a statement that is being proposed to be true.
  Once a proof of a conjecture is found, it becomes a theorem. It
  may turn out to be false.
Example of Conjectures
 Fermat’s Last Theorem
    Note scribbled by Pierre de Fermat in 1637 in his ancient
     Greek book “Arithmetica” by Diophantus



    Has no integer solutions for n>2, and
    A successful proof was published in 1995
 Goldbach’s conjecture (still unresolved)
    Every even integer greater than 2 can be expressed as the
     sum of two primes
Forms of Theorems
 Many theorems assert that a property holds for all elements
  in a domain, such as the integers, the real numbers, or
  some of the discrete structures that we will study in this
  class.
 Often the universal quantifier (needed for a precise
  statement of a theorem) is omitted by standard
  mathematical convention.
  For example, the statement:
“If x>y, where x and y are positive real numbers, then x2>y2 ”
  really means
“For all positive real numbers x and y, if x>y, then x2>y2 .”
Proving Theorems
 Many theorems have the form:


 To prove them, we show that where c is an arbitrary
  element of the domain,
 By universal generalization the truth of the original
  formula follows.
 So, we must prove something of the form:
Proving Conditional Statements: p → q

 Trivial Proof: If we know q is true, then
p→ q is true as well.

“If it is raining then 1=1.”

 Vacuous Proof: If we know p is false then
p→ q is true as well.
“If I am both rich and poor then 2 + 2 = 5.”
Proving Conditional Statements: p → q
 Direct Proof: Assume that p is true. Use rules of
  inference, axioms, and logical equivalences to show
  that q must also be true.
 Example: Give a direct proof of the theorem “If n is an
  odd integer, then n2 is odd.”
Solution: Assume that n is odd.
n2 = (2k + 1)2 = 4k2 + 4k +1 = 2(2k2 + 2k) + 1= 2r + 1,
   where r = 2k2 + 2k , an integer.


            QED (Quod Erat Demonstrandum) = which had to
            be demonstrated. Also
Proving Conditional Statements: p → q
 Definition: The real number r is rational if there exist
 integers p and q where q≠0 such that r = p/q
 Example: Prove that the sum of two rational numbers
 is rational.
 Solution: Assume r and s are two rational numbers.
 Then there must be integers p, qand also t, usuch that


                                      where v = pu+ qt
 Thus the sum is rational.                  w = qu≠ 0

Contenu connexe

Tendances

Predicates and quantifiers
Predicates and quantifiersPredicates and quantifiers
Predicates and quantifiersIstiak Ahmed
 
Slops of the Straight lines
Slops of the Straight linesSlops of the Straight lines
Slops of the Straight linesitutor
 
Half range sine cosine fourier series
Half range sine cosine fourier seriesHalf range sine cosine fourier series
Half range sine cosine fourier seriesHardik Parmar
 
AI 9 | Bayesian Network and Probabilistic Inference
AI 9 | Bayesian Network and Probabilistic InferenceAI 9 | Bayesian Network and Probabilistic Inference
AI 9 | Bayesian Network and Probabilistic InferenceMohammad Imam Hossain
 
Mathematical induction
Mathematical inductionMathematical induction
Mathematical inductionrey castro
 
Application of definite integrals
Application of definite integralsApplication of definite integrals
Application of definite integralsVaibhav Tandel
 
Discrete Math Presentation(Rules of Inference)
Discrete Math Presentation(Rules of Inference)Discrete Math Presentation(Rules of Inference)
Discrete Math Presentation(Rules of Inference)Ikhtiar Khan Sohan
 
Chapter 4 part2- Random Variables
Chapter 4 part2- Random VariablesChapter 4 part2- Random Variables
Chapter 4 part2- Random Variablesnszakir
 
Probabilistic Reasoning
Probabilistic Reasoning Probabilistic Reasoning
Probabilistic Reasoning Sushant Gautam
 
simpion's 3/8 rule
simpion's 3/8 rulesimpion's 3/8 rule
simpion's 3/8 rulesharma230399
 
MATLAB : Numerical Differention and Integration
MATLAB : Numerical Differention and IntegrationMATLAB : Numerical Differention and Integration
MATLAB : Numerical Differention and IntegrationAinul Islam
 

Tendances (20)

Predicates and quantifiers
Predicates and quantifiersPredicates and quantifiers
Predicates and quantifiers
 
Slops of the Straight lines
Slops of the Straight linesSlops of the Straight lines
Slops of the Straight lines
 
Half range sine cosine fourier series
Half range sine cosine fourier seriesHalf range sine cosine fourier series
Half range sine cosine fourier series
 
Bayes network
Bayes networkBayes network
Bayes network
 
AI 9 | Bayesian Network and Probabilistic Inference
AI 9 | Bayesian Network and Probabilistic InferenceAI 9 | Bayesian Network and Probabilistic Inference
AI 9 | Bayesian Network and Probabilistic Inference
 
Mathematical induction
Mathematical inductionMathematical induction
Mathematical induction
 
Application of definite integrals
Application of definite integralsApplication of definite integrals
Application of definite integrals
 
Discrete Math Presentation(Rules of Inference)
Discrete Math Presentation(Rules of Inference)Discrete Math Presentation(Rules of Inference)
Discrete Math Presentation(Rules of Inference)
 
Romberg’s method
Romberg’s methodRomberg’s method
Romberg’s method
 
Probability theory
Probability theoryProbability theory
Probability theory
 
Chapter 4 part2- Random Variables
Chapter 4 part2- Random VariablesChapter 4 part2- Random Variables
Chapter 4 part2- Random Variables
 
Probabilistic Reasoning
Probabilistic Reasoning Probabilistic Reasoning
Probabilistic Reasoning
 
Artificial Intelligence - Reasoning in Uncertain Situations
Artificial Intelligence - Reasoning in Uncertain SituationsArtificial Intelligence - Reasoning in Uncertain Situations
Artificial Intelligence - Reasoning in Uncertain Situations
 
simpion's 3/8 rule
simpion's 3/8 rulesimpion's 3/8 rule
simpion's 3/8 rule
 
Logic agent
Logic agentLogic agent
Logic agent
 
MATLAB : Numerical Differention and Integration
MATLAB : Numerical Differention and IntegrationMATLAB : Numerical Differention and Integration
MATLAB : Numerical Differention and Integration
 
07 approximate inference in bn
07 approximate inference in bn07 approximate inference in bn
07 approximate inference in bn
 
Locus
LocusLocus
Locus
 
Data mining
Data miningData mining
Data mining
 
First order logic
First order logicFirst order logic
First order logic
 

En vedette

10a chaptertenpowerpoint new
10a chaptertenpowerpoint new10a chaptertenpowerpoint new
10a chaptertenpowerpoint newsagebennet
 
Анализ тональности с помощью ДСМ метода
Анализ тональности с помощью ДСМ методаАнализ тональности с помощью ДСМ метода
Анализ тональности с помощью ДСМ методаDima Kostyaev
 
Ідентифікація багатофакторних залежностей на основі нечіткої бази знань з рі...
Ідентифікація  багатофакторних залежностей на основі нечіткої бази знань з рі...Ідентифікація  багатофакторних залежностей на основі нечіткої бази знань з рі...
Ідентифікація багатофакторних залежностей на основі нечіткої бази знань з рі...Роман Тилець
 
Экспертные системы
Экспертные системыЭкспертные системы
Экспертные системыОтшельник
 
The Science of UX Design
The Science of UX DesignThe Science of UX Design
The Science of UX DesignZack Naylor
 
Logical Inference in RTE
Logical Inference in RTELogical Inference in RTE
Logical Inference in RTEKilian Evang
 
Expert system (unit 1 & 2)
Expert system (unit 1 & 2)Expert system (unit 1 & 2)
Expert system (unit 1 & 2)Lakshya Gupta
 
Inference rulesproofmethods
Inference rulesproofmethodsInference rulesproofmethods
Inference rulesproofmethodsRajendran
 
CPSC 125 Ch 2 Sec 1
CPSC 125 Ch 2 Sec 1CPSC 125 Ch 2 Sec 1
CPSC 125 Ch 2 Sec 1David Wood
 
Bca ii dfs u-3 tree and graph
Bca  ii dfs u-3 tree and graphBca  ii dfs u-3 tree and graph
Bca ii dfs u-3 tree and graphRai University
 
Logical Abduction and an Application on Business Rules Management
Logical Abduction and an Application on Business Rules ManagementLogical Abduction and an Application on Business Rules Management
Logical Abduction and an Application on Business Rules ManagementTobias Trapp
 
Mayo aug1, jsm slides (3)
Mayo aug1, jsm slides (3)Mayo aug1, jsm slides (3)
Mayo aug1, jsm slides (3)jemille6
 
Proofs by contraposition
Proofs by contrapositionProofs by contraposition
Proofs by contrapositionAbdur Rehman
 
NUMA-optimized Parallel Breadth-first Search on Multicore Single-node System
NUMA-optimized Parallel Breadth-first Search on Multicore Single-node SystemNUMA-optimized Parallel Breadth-first Search on Multicore Single-node System
NUMA-optimized Parallel Breadth-first Search on Multicore Single-node SystemYuichiro Yasui
 

En vedette (20)

10a chaptertenpowerpoint new
10a chaptertenpowerpoint new10a chaptertenpowerpoint new
10a chaptertenpowerpoint new
 
Chapter 06 hurley 12e
Chapter 06 hurley 12eChapter 06 hurley 12e
Chapter 06 hurley 12e
 
Анализ тональности с помощью ДСМ метода
Анализ тональности с помощью ДСМ методаАнализ тональности с помощью ДСМ метода
Анализ тональности с помощью ДСМ метода
 
Ідентифікація багатофакторних залежностей на основі нечіткої бази знань з рі...
Ідентифікація  багатофакторних залежностей на основі нечіткої бази знань з рі...Ідентифікація  багатофакторних залежностей на основі нечіткої бази знань з рі...
Ідентифікація багатофакторних залежностей на основі нечіткої бази знань з рі...
 
Экспертные системы
Экспертные системыЭкспертные системы
Экспертные системы
 
Нечеткие знания в экспертных системах
Нечеткие знания в экспертных системахНечеткие знания в экспертных системах
Нечеткие знания в экспертных системах
 
The Science of UX Design
The Science of UX DesignThe Science of UX Design
The Science of UX Design
 
Logical Inference in RTE
Logical Inference in RTELogical Inference in RTE
Logical Inference in RTE
 
Expert system (unit 1 & 2)
Expert system (unit 1 & 2)Expert system (unit 1 & 2)
Expert system (unit 1 & 2)
 
Inference rulesproofmethods
Inference rulesproofmethodsInference rulesproofmethods
Inference rulesproofmethods
 
CPSC 125 Ch 2 Sec 1
CPSC 125 Ch 2 Sec 1CPSC 125 Ch 2 Sec 1
CPSC 125 Ch 2 Sec 1
 
Bca ii dfs u-3 tree and graph
Bca  ii dfs u-3 tree and graphBca  ii dfs u-3 tree and graph
Bca ii dfs u-3 tree and graph
 
Logical Abduction and an Application on Business Rules Management
Logical Abduction and an Application on Business Rules ManagementLogical Abduction and an Application on Business Rules Management
Logical Abduction and an Application on Business Rules Management
 
Backtracking
BacktrackingBacktracking
Backtracking
 
Mayo aug1, jsm slides (3)
Mayo aug1, jsm slides (3)Mayo aug1, jsm slides (3)
Mayo aug1, jsm slides (3)
 
Proofs by contraposition
Proofs by contrapositionProofs by contraposition
Proofs by contraposition
 
NUMA-optimized Parallel Breadth-first Search on Multicore Single-node System
NUMA-optimized Parallel Breadth-first Search on Multicore Single-node SystemNUMA-optimized Parallel Breadth-first Search on Multicore Single-node System
NUMA-optimized Parallel Breadth-first Search on Multicore Single-node System
 
Ai 2
Ai 2Ai 2
Ai 2
 
Expert System
Expert SystemExpert System
Expert System
 
Expert Systems
Expert SystemsExpert Systems
Expert Systems
 

Similaire à Lecture5

Chapter 01 - p3.pdf
Chapter 01 - p3.pdfChapter 01 - p3.pdf
Chapter 01 - p3.pdfsmarwaneid
 
Discrete-Chapter 05 Inference and Proofs
Discrete-Chapter 05 Inference and ProofsDiscrete-Chapter 05 Inference and Proofs
Discrete-Chapter 05 Inference and ProofsWongyos Keardsri
 
Valid and Invalid Arguments.pptx
Valid and Invalid Arguments.pptxValid and Invalid Arguments.pptx
Valid and Invalid Arguments.pptxLuisSalenga1
 
Valid & invalid arguments
Valid & invalid argumentsValid & invalid arguments
Valid & invalid argumentsAbdur Rehman
 
rules of inference in discrete structures
rules of inference in discrete structuresrules of inference in discrete structures
rules of inference in discrete structuresZenLooper
 
S2 1
S2 1S2 1
S2 1IIUM
 
Discrete Structure vs Discrete Mathematics
Discrete Structure vs Discrete MathematicsDiscrete Structure vs Discrete Mathematics
Discrete Structure vs Discrete MathematicsAbdulRehman378540
 
Drinkfromme.pptx
Drinkfromme.pptxDrinkfromme.pptx
Drinkfromme.pptxRavind8
 
Discrete mathematics Ch2 Propositional Logic_Dr.khaled.Bakro د. خالد بكرو
Discrete mathematics Ch2 Propositional Logic_Dr.khaled.Bakro د. خالد بكروDiscrete mathematics Ch2 Propositional Logic_Dr.khaled.Bakro د. خالد بكرو
Discrete mathematics Ch2 Propositional Logic_Dr.khaled.Bakro د. خالد بكروDr. Khaled Bakro
 
Chapter 01 - p1.pdf
Chapter 01 - p1.pdfChapter 01 - p1.pdf
Chapter 01 - p1.pdfsmarwaneid
 
chapter 1 (part 2)
chapter 1 (part 2)chapter 1 (part 2)
chapter 1 (part 2)Raechel Lim
 
Math logic student
Math logic studentMath logic student
Math logic studentIIUM
 
20220818151924_PPT01 - The Logic of Compound and Quantitative Statement.pptx
20220818151924_PPT01 - The Logic of Compound and Quantitative Statement.pptx20220818151924_PPT01 - The Logic of Compound and Quantitative Statement.pptx
20220818151924_PPT01 - The Logic of Compound and Quantitative Statement.pptxssuser92109d
 

Similaire à Lecture5 (20)

Chapter 01 - p3.pdf
Chapter 01 - p3.pdfChapter 01 - p3.pdf
Chapter 01 - p3.pdf
 
Chapter1p3.pptx
Chapter1p3.pptxChapter1p3.pptx
Chapter1p3.pptx
 
Logic
LogicLogic
Logic
 
Discrete-Chapter 05 Inference and Proofs
Discrete-Chapter 05 Inference and ProofsDiscrete-Chapter 05 Inference and Proofs
Discrete-Chapter 05 Inference and Proofs
 
Valid and Invalid Arguments.pptx
Valid and Invalid Arguments.pptxValid and Invalid Arguments.pptx
Valid and Invalid Arguments.pptx
 
Valid & invalid arguments
Valid & invalid argumentsValid & invalid arguments
Valid & invalid arguments
 
rules of inference in discrete structures
rules of inference in discrete structuresrules of inference in discrete structures
rules of inference in discrete structures
 
S2 1
S2 1S2 1
S2 1
 
Discrete Structure vs Discrete Mathematics
Discrete Structure vs Discrete MathematicsDiscrete Structure vs Discrete Mathematics
Discrete Structure vs Discrete Mathematics
 
Chapter1p1
Chapter1p1Chapter1p1
Chapter1p1
 
Drinkfromme.pptx
Drinkfromme.pptxDrinkfromme.pptx
Drinkfromme.pptx
 
Discrete mathematics Ch2 Propositional Logic_Dr.khaled.Bakro د. خالد بكرو
Discrete mathematics Ch2 Propositional Logic_Dr.khaled.Bakro د. خالد بكروDiscrete mathematics Ch2 Propositional Logic_Dr.khaled.Bakro د. خالد بكرو
Discrete mathematics Ch2 Propositional Logic_Dr.khaled.Bakro د. خالد بكرو
 
Chapter 01 - p1.pdf
Chapter 01 - p1.pdfChapter 01 - p1.pdf
Chapter 01 - p1.pdf
 
Logic
LogicLogic
Logic
 
chapter 1 (part 2)
chapter 1 (part 2)chapter 1 (part 2)
chapter 1 (part 2)
 
Chapter1p1.pdf
Chapter1p1.pdfChapter1p1.pdf
Chapter1p1.pdf
 
DS Lecture 2.ppt
DS Lecture 2.pptDS Lecture 2.ppt
DS Lecture 2.ppt
 
Math logic student
Math logic studentMath logic student
Math logic student
 
Per3 logika&pembuktian
Per3 logika&pembuktianPer3 logika&pembuktian
Per3 logika&pembuktian
 
20220818151924_PPT01 - The Logic of Compound and Quantitative Statement.pptx
20220818151924_PPT01 - The Logic of Compound and Quantitative Statement.pptx20220818151924_PPT01 - The Logic of Compound and Quantitative Statement.pptx
20220818151924_PPT01 - The Logic of Compound and Quantitative Statement.pptx
 

Lecture5

  • 1. Lecture 5  Recall, Homework #1 posted in elearning.  Due beginning of class Feb 11  Solutions to Quiz #2  Rules of Inference and Proofs
  • 2. Rules of Inference for Propositional Logic: Modus Ponens Corresponding Tautology: (p ∧ (p →q)) → q Example: Let p be “It is snowing.” Let q be “I will study discrete math.” “If it is snowing, then I will study discrete math.” “It is snowing.” “Therefore , I will study discrete math.”
  • 3. Modus Tollens Corresponding Tautology: (¬p∧(p →q))→¬q Example: Let p be “it is snowing.” Let q be “I will study discrete math.” “If it is snowing, then I will study discrete math.” “I will not study discrete math.” “Therefore , it is not snowing.”
  • 4. Hypothetical Syllogism Corresponding Tautology: ((p →q) ∧ (q→r))→(p→ r) Example: Let p be “it snows.” Let q be “I will study discrete math.” Let r be “I will get an A.” “If it snows, then I will study discrete math.” “If I study discrete math, I will get an A.” “Therefore , If it snows, I will get an A.”
  • 5. Disjunctive Syllogism Corresponding Tautology: (¬p∧(p ∨q))→q Example: Let p be “I will study discrete math.” Let q be “I will study English literature.” “I will study discrete math or I will study English literature.” “I will not study discrete math.” “Therefore , I will study English literature.”
  • 6. Addition Corresponding Tautology: p →(p ∨q) Example: Let p be “I will study discrete math.” Let q be “I will visit Las Vegas.” “I will study discrete math.” “Therefore, I will study discrete math or I will visit Las Vegas.”
  • 7. Simplification Corresponding Tautology: (p∧q) →p Example: Let p be “I will study discrete math.” Let q be “I will study English literature.” “I will study discrete math and English literature” “Therefore, I will study discrete math.”
  • 8. Conjunction Corresponding Tautology: ((p)∧ (q)) →(p ∧ q) Example: Let p be “I will study discrete math.” Let q be “I will study English literature.” “I will study discrete math.” “I will study English literature.” “Therefore, I will study discrete math and I will study English literature.”
  • 9. Resolution Resolution plays an important role in AI and is used in Prolog. Corresponding Tautology: ((¬p ∨ r )∧ (p ∨ q)) →(q ∨ r) Example: Let p be “I will study discrete math.” Let r be “I will study English literature.” Let q be “I will study databases.” “I will not study discrete math or I will study English literature.” “I will study discrete math or I will study databases.” “Therefore, I will study databases or I will English literature.”
  • 10. Valid Arguments Example 1: From the single proposition Show that q is a conclusion. Solution:
  • 11. Handling Quantified Statements  Valid arguments for quantified statements are a sequence of statements. Each statement is either a premise or follows from previous statements by rules of inference which include:  Rules of Inference for Propositional Logic  Rules of Inference for Quantified Statements  The rules of inference for quantified statements are introduced in the next several slides.
  • 12. Universal Instantiation (UI) Example: Our domain consists of all dogs and Fido is a dog. “All dogs are cuddly.” “Therefore, Fido is cuddly.”
  • 13. Universal Generalization (UG) Used often implicitly in Mathematical Proofs.
  • 14. Existential Instantiation (EI) Example: “There is someone who got an A in the course.” “Let’s call her a and say that a got an A”
  • 15. Existential Generalization (EG) Example: “Michelle got an A in the class.” “Therefore, someone got an A in the class.”
  • 16. Using Rules of Inference Example 1: Using the rules of inference, construct a valid argument to show that “John Smith has two legs” is a consequence of the premises: “Every man has two legs.” “John Smith is a man.” Solution: Let M(x) denote “x is a man” and L(x) “ x has two legs” and let John Smith be a member of the domain. Valid Argument:
  • 17. Using Rules of Inference Example 2: Use the rules of inference to construct a valid argument showing that the conclusion “Someone who passed the first exam has not read the book.” follows from the premises “A student in this class has not read the book.” “Everyone in this class passed the first exam.” Solution: Let C(x) denote “x is in this class,” B(x) denote “ x has read the book,” and P(x) denote “x passed the first exam.” First we translate the premises and conclusion into symbolic form. Continued on next slide
  • 18. Using Rules of Inference Valid Argument:
  • 19. Section Summary  Mathematical Proofs  Forms of Theorems  Direct Proofs  Indirect Proofs  Proof of the Contrapositive  Proof by Contradiction
  • 20. Proofs of Mathematical Statements  A proof is a valid argument that establishes the truth of a statement.  In math, CS, and other disciplines, informal proofs which are generally shorter, are generally used.  More than one rule of inference are often used in a step.  Steps may be skipped.  The rules of inference used are not explicitly stated.  Easier for to understand and to explain to people.  But it is also easier to introduce errors.  Proofs have many practical applications:  verification that computer programs are correct  establishing that operating systems are secure  enabling programs to make inferences in artificial intelligence  showing that system specifications are consistent
  • 21. Definitions  A theorem is a statement that can be shown to be true using:  definitions  other theorems  axioms (statements which are given as true)  rules of inference  A lemma is a ‘helping theorem’ or a result which is needed to prove a theorem.  A corollary is a result which follows directly from a theorem.  Less important theorems are sometimes called propositions.  A conjecture is a statement that is being proposed to be true. Once a proof of a conjecture is found, it becomes a theorem. It may turn out to be false.
  • 22. Example of Conjectures  Fermat’s Last Theorem  Note scribbled by Pierre de Fermat in 1637 in his ancient Greek book “Arithmetica” by Diophantus  Has no integer solutions for n>2, and  A successful proof was published in 1995  Goldbach’s conjecture (still unresolved)  Every even integer greater than 2 can be expressed as the sum of two primes
  • 23. Forms of Theorems  Many theorems assert that a property holds for all elements in a domain, such as the integers, the real numbers, or some of the discrete structures that we will study in this class.  Often the universal quantifier (needed for a precise statement of a theorem) is omitted by standard mathematical convention. For example, the statement: “If x>y, where x and y are positive real numbers, then x2>y2 ” really means “For all positive real numbers x and y, if x>y, then x2>y2 .”
  • 24. Proving Theorems  Many theorems have the form:  To prove them, we show that where c is an arbitrary element of the domain,  By universal generalization the truth of the original formula follows.  So, we must prove something of the form:
  • 25. Proving Conditional Statements: p → q  Trivial Proof: If we know q is true, then p→ q is true as well. “If it is raining then 1=1.”  Vacuous Proof: If we know p is false then p→ q is true as well. “If I am both rich and poor then 2 + 2 = 5.”
  • 26. Proving Conditional Statements: p → q  Direct Proof: Assume that p is true. Use rules of inference, axioms, and logical equivalences to show that q must also be true. Example: Give a direct proof of the theorem “If n is an odd integer, then n2 is odd.” Solution: Assume that n is odd. n2 = (2k + 1)2 = 4k2 + 4k +1 = 2(2k2 + 2k) + 1= 2r + 1, where r = 2k2 + 2k , an integer. QED (Quod Erat Demonstrandum) = which had to be demonstrated. Also
  • 27. Proving Conditional Statements: p → q Definition: The real number r is rational if there exist integers p and q where q≠0 such that r = p/q Example: Prove that the sum of two rational numbers is rational. Solution: Assume r and s are two rational numbers. Then there must be integers p, qand also t, usuch that where v = pu+ qt Thus the sum is rational. w = qu≠ 0