SlideShare a Scribd company logo
1 of 56
 Logic!




Introduction to Mathematical Logic: MATH-105   Jan-May 2013   1
• Crucial for mathematical reasoning
• Important for program design
• Used for designing electronic circuitry

• (Propositional )Logic is a system based on
  propositions.
• A proposition or statement is a (declarative)
  sentence that is either true or false (not both).
• We say that the truth value of a proposition is
  either true (T) or false (F).
•   Corresponds to 1 and 0 in digital circuits


        Introduction to Mathematical Logic: MATH-105   Jan-May 2013   2
   “Elephants are bigger than mice.”

Is this a sentence?                                                  yes

Is this a proposition?                                               yes

What is the truth value
of the proposition?                                                  true


       Introduction to Mathematical Logic: MATH-105   Jan-May 2013          3
     “520 < 111”

Is this a sentence?                                                 yes

Is this a proposition?                                              yes

What is the truth value
of the proposition?                                                 false


      Introduction to Mathematical Logic: MATH-105   Jan-May 2013           4
     “y > 5”

Is this a sentence?                                                 yes
Is this a proposition?                                              no

Its truth value depends on the value of y,
but this value is not specified.
We call this type of sentence a
propositional function or open sentence.

      Introduction to Mathematical Logic: MATH-105   Jan-May 2013         5
   “Today is January 27 and 99 < 5.”

Is this a sentence?                                                  yes

Is this a proposition?                                               yes

What is the truth value
of the proposition?                                                  false


       Introduction to Mathematical Logic: MATH-105   Jan-May 2013           6
     “Please do not fall asleep.”

Is this a sentence?                                                    yes
It’s a request.

Is this a proposition?                                                 no




         Introduction to Mathematical Logic: MATH-105   Jan-May 2013         7
   “If the moon is made of cheese,
              then I will be rich.”

Is this a sentence?                                                   yes

Is this a proposition?                                                yes

What is the truth value
of the proposition?                                                   probably true

        Introduction to Mathematical Logic: MATH-105   Jan-May 2013            8
“x < y if and only if y > x.”
Is this a sentence?           yes
Is this a proposition?        yes
… because its truth value
  does not depend on
  specific values of x and y.
What is the truth value
of the proposition?                                                  true

       Introduction to Mathematical Logic: MATH-105   Jan-May 2013          9
Aswe have seen in the previous
examples, one or more propositions can
be combined to form a single compound
proposition.

We  formalize this by denoting
propositions with letters such as p, q, r, s,
and introducing several logical operators
or logical connectives.


       Introduction to Mathematical Logic: MATH-105   Jan-May 2013   10
We will examine the following logical
operators:
• Negation                     (NOT, ¬ )
• Conjunction                  (AND, ∧ )
• Disjunction                  (OR, ∨ )
• Exclusive-or                 (XOR, ⊕ )
• Implication                  (if – then, → )
• Biconditional                (if and only if, ↔ )
Truth
     tables can be used to show how these
operators can combine propositions to
compound propositions.
         Introduction to Mathematical Logic: MATH-105   Jan-May 2013   11
   Unary Operator, Symbol: ¬

                         P                                    P
            true (T)                                false (F)
           false (F)                                 true (T)


     Introduction to Mathematical Logic: MATH-105   Jan-May 2013   12
   Binary Operator, Symbol: ∧
                       P                            Q              P Q
                       T                            T               T
                       T                            F               F
                       F                            T               F
                       F                            F               F

     Introduction to Mathematical Logic: MATH-105   Jan-May 2013          13
   Binary Operator, Symbol: ∨

                     P                       Q                P Q
                     T                       T                 T
                     T                        F                    T
                     F                        T                    T
                     F                        F                    F

     Introduction to Mathematical Logic: MATH-105   Jan-May 2013       14
   Binary Operator, Symbol: ⊕

                     P                       Q                     PQ
                     T                       T                      F
                     T                        F                    T
                     F                        T                    T
                     F                        F                    F

     Introduction to Mathematical Logic: MATH-105   Jan-May 2013         15
   Binary Operator, Symbol: →

                     P                       Q                     PQ
                     T                       T                      T
                     T                        F                    F
                     F                        T                    T
                     F                        F                    T

     Introduction to Mathematical Logic: MATH-105   Jan-May 2013         16
   Binary Operator, Symbol: ↔

                     P                       Q                     PQ
                     T                       T                      T
                     T                        F                    F
                     F                        T                    F
                     F                        F                    T

     Introduction to Mathematical Logic: MATH-105   Jan-May 2013         17
   Statements and operators can be combined
         in any way to form new statements.


     P             Q                P               Q             (P)(Q)
     T             T                F                 F                F
     T              F                F                T                T
     F              T                T                F                T
     F              F                T                T                T

      Introduction to Mathematical Logic: MATH-105   Jan-May 2013               18
   Statements and operators can be combined in
          any way to form new statements.


    P            Q              PQ (PQ) (P)(Q)
    T            T               T     F       F
    T             F                 F                    T            T
    F             T                 F                    T            T
    F             F                 F                    T            T

        Introduction to Mathematical Logic: MATH-105   Jan-May 2013       19
• Totake discrete mathematics, you must
 have taken calculus or a course in computer
 science.
• When you buy a new car from Acme Motor
 Company, you get $2000 back in cash or a
 2% car loan.
• School   is closed if more than 2 feet of snow
 falls or if the wind chill is below -100.




       Introduction to Mathematical Logic: MATH-105   Jan-May 2013   20
• To take discrete mathematics, you must have
  taken calculus or a course in computer science.
     › P: take discrete mathematics
     › Q: take calculus
     › R: take a course in computer science

•P   →Q∨R
• Problem        with proposition R



         Introduction to Mathematical Logic: MATH-105   Jan-May 2013   21
• When you buy a new car from Acme Motor
  Company, you get $2000 back in cash or a 2%
  car loan.
     › P: buy a car from Acme Motor Company
     › Q: get $2000 cash back
     › R: get a 2% car loan

•P   →Q⊕R
• Why use XOR here? – example of ambiguity
 of natural languages

         Introduction to Mathematical Logic: MATH-105   Jan-May 2013   22
• School is closed if more than 2 feet of snow
  falls or if the wind chill is below -100.
    › P: School is closed
    › Q: 2 feet of snow falls
    › R: wind chill is below -100

•Q   ∧R→P
• Precedence                among operators:
                 ¬, ∧, ∨, →, ↔

        Introduction to Mathematical Logic: MATH-105   Jan-May 2013   23
P         Q             (PQ)               (P)(Q)               (PQ)(P)(Q)

    T          T                   F                       F                     T
    T           F                  T                       T                     T
    F          T                   T                       T                     T
    F           F                  T                       T                     T
    The statements ¬(P∧Q) and (¬P) ∨ (¬Q) are logically equivalent, since
    they have the same truth table, or put it in another way, ¬(P∧Q) ↔(¬P)
                            ∨ (¬Q) is always true.



            Introduction to Mathematical Logic: MATH-105   Jan-May 2013              24
   A tautology is a statement that is always true.
   Examples:
     › R∨(¬R)
     › ¬(P∧Q) ↔ (¬P)∨(¬ Q)
   A contradiction is a statement that is always false.
   Examples:
     › R∧(¬R)
     › ¬(¬(P ∧ Q) ↔ (¬P) ∨ (¬Q))
   The negation of any tautology is a contradiction, and
    the negation of any contradiction is a tautology.

   If A has the truth value, T for at least one combination
    of truth values of P1, P2 , P3 ,…, Pn then A is said to be
    satisfiable.

          Introduction to Mathematical Logic: MATH-105   Jan-May 2013   25
   Definition: two propositional
    statements S1 and S2 are said to be
    (logically) equivalent, denoted S1 ≡ S2
    if
      › They have the same truth table, or
      › S1 ⇔ S2 is a tautology
   Equivalence can be established by
      › Constructing truth tables
      › Using equivalence laws



         Introduction to Mathematical Logic: MATH-105   Jan-May 2013   26
   Equivalence laws
    › Identity laws,                           P ∧ T ≡ P,
    › Domination laws,                         P ∧ F ≡ F,
    › Idempotent laws,                         P ∧ P ≡ P,
    › Double negation law,                                  ¬ (¬ P) ≡ P
    › Commutative laws, P ∧ Q ≡ Q ∧ P,
    › Associative laws,                        P ∧ (Q ∧ R)≡ (P ∧ Q) ∧ R,
    › Distributive laws,                       P ∧ (Q ∨ R)≡ (P ∧ Q) ∨ (P ∧ R),
    › De Morgan’s laws,                        ¬ (P∧Q) ≡ (¬ P) ∨ (¬ Q)
    › Law with implication P → Q ≡ ¬ P ∨ Q


           Introduction to Mathematical Logic: MATH-105   Jan-May 2013     27
• Show    that P → Q ≡ ¬ P ∨ Q: by truth table
• Showthat (P → Q) ∧ (P → R) ≡ P → (Q ∧ R):
 by equivalence laws:
  › Law with implication on both sides
  › Distribution law on LHS




         Introduction to Mathematical Logic: MATH-105   Jan-May 2013   28
•Proposition
 › Statement, Truth value,
 › Proposition, Propositional symbol, Open proposition
•Operators
 › Define by truth tables
 › Composite propositions
 › Tautology and contradiction
•Equivalence                  of propositional statements
 › Definition
 › Proving equivalence (by truth table or equivalence
   laws)


     Introduction to Mathematical Logic: MATH-105   Jan-May 2013   29
Propositionalfunction (open sentence):
statement involving one or more variables,

     e.g.: x-3 > 5.
Let us call this propositional function P(x),
where P is the predicate and x is the variable.
What is the truth value of P(2) ? false
What is the truth value of P(8) ? false
What is the truth value of P(9) ? true
When a variable is given a value, it is said to be
instantiated
Truth value depends on value of variable
        Introduction to Mathematical Logic: MATH-105   Jan-May 2013   30
Letus consider the propositional function
Q(x, y, z) defined as:
x   + y = z.
Here,Q is the predicate and x, y, and z are
the variables.
What is the truth value of Q(2, 3, 5) ?   true
What is the truth value of Q(0, 1, 2) ?   false
What is the truth value of Q(9, -9, 0) ? true
A propositional function (predicate) becomes a
proposition when all its variables are instantiated.

           Introduction to Mathematical Logic: MATH-105   Jan-May 2013   31
Other   examples of propositional functions

Person(x),
   Person(Socrates) = T x is a person
          which is true if
   Person(dog) = F
CSCourse(x), which is true if x is a
 computer science course
   CS Course(C-language) = T
   CS Course(MATH 102) = F




         Introduction to Mathematical Logic: MATH-105   Jan-May 2013   32
LetP(x) be a predicate (propositional
function).
Universally   quantified sentence:
For all x in the universe of discourse P(x) is true.

Using the universal quantifier ∀:
∀x P(x) “for all x P(x)” or “for every x P(x)”

(Note:∀x P(x) is either true or false, so it is a
proposition, not a propositional function.)


          Introduction to Mathematical Logic: MATH-105   Jan-May 2013   33
Example:         Let the universe of discourse be all people
       S(x): x is a Mathematics student.
       G(x): x is a genius.
What     does ∀x (S(x) → G(x)) mean ?
“If
   x is a mathematics student, then x is a genius.” or
“All Mathematics students are geniuses.”

Ifthe universe of discourse is all mathematics
students, then the same statement can be written as
       ∀x G(x)



            Introduction to Mathematical Logic: MATH-105   Jan-May 2013   34
Existentiallyquantified sentence:
There exists an x in the universe of discourse for
which P(x) is true.
Using the existential quantifier ∃:
∃x P(x) “There is an x such that P(x).”
         “There is at least one x such that P(x).”
(Note:∃x P(x) is either true or false, so it is a
proposition, but no propositional function.)


          Introduction to Mathematical Logic: MATH-105   Jan-May 2013   35
Example:
P(x):x is a Mathematics professor.
G(x): x is a genius.

What    does ∃x (P(x) ∧ G(x)) mean ?

“There is an x such that x is a Mathematics
professor and x is a genius.”
                       or
“At least one Mathematics professor is a
   genius.”

          Introduction to Mathematical Logic: MATH-105   Jan-May 2013   36
Another  example:
Let the universe of discourse be the real
numbers.
What    does ∀x∃y (x + y = 320) mean ?

“For   every x there exists a y so that x + y = 320.”
Is it true?                                                              yes

Is it true for the natural numbers?                                      no


           Introduction to Mathematical Logic: MATH-105   Jan-May 2013         37
A counterexample to ∀x P(x) is an object c so
that P(c) is false.

Statementssuch as ∀x (P(x) → Q(x)) can be
disproved by simply providing a
counterexample.

Statement: “All birds can fly.”
Disproved by counterexample: Penguin.


       Introduction to Mathematical Logic: MATH-105   Jan-May 2013   38
   ¬(∀x P(x)) is logically equivalent to ∃x (¬P(x)).

   ¬(∃x P(x)) is logically equivalent to ∀x (¬P(x)).


   This is de Morgan’s law for quantifiers




         Introduction to Mathematical Logic: MATH-105   Jan-May 2013   39
   Examples
   Not all roses are red
     ¬∀x (Rose(x) → Red(x))
     ∃x (Rose(x) ∧ ¬Red(x))
Nobody is perfect
    x (Person(x)  Perfect(x))
    x (Person(x)  Perfect(x))



        Introduction to Mathematical Logic: MATH-105   Jan-May 2013   40
   A predicate can have more than one
    variables.
    › S(x, y, z): z is the sum of x and y
    › F(x, y): x and y are friends
   We can quantify individual variables in
    different ways
    › ∀x, y, z (S(x, y, z) → (x <= z ∧ y <= z))
    › ∃x ∀y ∀z (F(x, y) ∧ F(x, z) ∧ (y != z) → ¬F(y, z)




         Introduction to Mathematical Logic: MATH-105   Jan-May 2013   41
   Exercise: translate the following English
    sentence into logical expression
    “There is a rational number in between every
      pair of distinct rational numbers”

   Use predicate Q(x), which is true when
    x is a rational number
     ∀x,y (Q(x) ∧ Q (y) ∧ (x < y) →
       ∃u (Q(u) ∧ (x < u) ∧ (u < y)))


        Introduction to Mathematical Logic: MATH-105   Jan-May 2013   42
• Propositional functions (predicates)
• Universal and existential quantifiers, and
  the duality of the two
• When predicates become propositions
    › All of its variables are instantiated
    › All of its variables are quantified
•   Nested quantifiers
    › Quantifiers with negation
•   Logical expressions formed by
    predicates, operators, and quantifiers


         Introduction to Mathematical Logic: MATH-105   Jan-May 2013   43
Mathematical
             Reasoning


Introduction to Mathematical Logic: MATH-105   Jan-May 2013   44
We need mathematical reasoning to determine
whether a mathematical argument is correct or
incorrect  and    construct    mathematical
arguments.




       Introduction to Mathematical Logic: MATH-105   Jan-May 2013   45
Argument: An argument is an assertion; that a
group of propositions called premises, yields an
other proposition, called the conclusion.

Let P1, P2 , P3 ,…, Pn is the group of propositions that
yields the conclusion Q. Then, it is denoted as P1, P2 ,
P3 ,…, Pn |- Q

 Valid Argument: An argument is called valid
argument if the conclusion is true whenever all the
premises are true
              or
The argument is valid iff the ANDing of the group of
propositions implies conclusion is a tautology
ie: P(P1, P2 , P3 ,…, Pn ) Q is a tautology    46
         Introduction to Mathematical Logic: MATH-105   Jan-May 2013
Fallacy Argument: An argument is called
fallacy or an invalid argument if it is not a valid
argument.




        Introduction to Mathematical Logic: MATH-105   Jan-May 2013   47
 Translate the following into symbolic form and
test the validity of the argument:

1.“If I will select in IAS examination, then I will not
be able to go to London. Since, I am going to
London, I will not select in IAS examination”.

2. “If 6 is even then 2 does not divide 7. Either 5 is
not prime or 2 divides 7. But 5 is prime, therefore,
6 is not even”.



         Introduction to Mathematical Logic: MATH-105   Jan-May 2013   48
Ans-1:
p: I will select in IAS examination
q: I will go to London

Premises: 1. p                      ~q
           2. q

Conclusion: ~p

Verify: [(p            ~q) ∧(q)]                         ~p is a tautology



          Introduction to Mathematical Logic: MATH-105   Jan-May 2013    49
 Ans-2:
p: 6 is even
q: 2 divides 7
r: 5 is prime

Premises: 1. p     ~q
          2. ~r ∨ q
          3. r
Conclusion: ~p

Verify: [ (1) ∧ (2) ∧ (3) ]                              ~p is a tautology


         Introduction to Mathematical Logic: MATH-105   Jan-May 2013    50
   The problem of finding whether a given
    statement is tautology or contradiction or
    satisfiable in a finite number of steps, is
    called     as   decision   problem,    the
    construction of truth tables may not be
    often a practical solution. We therefore
    consider alternate procedure known as
    reduction to normal forms. The two such
    forms are:
   Disjunctive Normal Form (DNF)
   Conjunctive Normal Form (CNF)
        Introduction to Mathematical Logic: MATH-105   Jan-May 2013   51
   A compound statement is said to be in dnf
    if it is disjunction of conjunction of the
    variables or their negations.
   Ex:(p ∧ q ∧ r) ∨ (~p ∧q ∧r) ∨ (~p ∧~q ∧ r)

   A compound statement is said to be in cnf
    if it is conjunction of disjunction of the
    variables or their negations.
   Ex:(p ∨ q ∨ ~r) ∧ (p ∨ ~q ∨ r) ∧ (~p ∨ ~q ∨ r)

        Introduction to Mathematical Logic: MATH-105   Jan-May 2013   52
   The truth table for the given statement is:
     P   Q      P        Q      Q            P          (P        Q)  (Q
                                                                   P)
     T   T           T                  T                               T
     T   F           F                  T                               F
     F   T           T                  F                               F
     F   F           F                  T                               T




         Introduction to Mathematical Logic: MATH-105    Jan-May 2013       53
   DNF:




   DNF: (P ∧ Q) ∨ (~P ∧ ~Q)


        Introduction to Mathematical Logic: MATH-105   Jan-May 2013   54
   CNF:




   CNF: ~(P ∧ ~Q) ∧ ~(~P ∧ Q)
        ≡ (~P ∨ Q) ∧ (P ∨ ~Q)

        Introduction to Mathematical Logic: MATH-105   Jan-May 2013   55
•   Mathematical Reasoning
•   Terminology (argument, valid argument
    and fallacy argument)
•   Examples on valid arguments
•   Normal forms (DNF and CNF)
•   Truth table method to express the
    statements as dnf and cnf forms




        Introduction to Mathematical Logic: MATH-105   Jan-May 2013   56

More Related Content

What's hot

Formal Logic - Lesson 4 - Tautology, Contradiction and Contingency
Formal Logic - Lesson 4 - Tautology, Contradiction and ContingencyFormal Logic - Lesson 4 - Tautology, Contradiction and Contingency
Formal Logic - Lesson 4 - Tautology, Contradiction and ContingencyLaguna State Polytechnic University
 
Mathematics applied in major fields of science and technology
Mathematics applied  in major fields of science and technologyMathematics applied  in major fields of science and technology
Mathematics applied in major fields of science and technologyshreetmishra98
 
Dijkstra's algorithm presentation
Dijkstra's algorithm presentationDijkstra's algorithm presentation
Dijkstra's algorithm presentationSubid Biswas
 
Disrete mathematics and_its application_by_rosen _7th edition_lecture_1
Disrete mathematics and_its application_by_rosen _7th edition_lecture_1Disrete mathematics and_its application_by_rosen _7th edition_lecture_1
Disrete mathematics and_its application_by_rosen _7th edition_lecture_1taimoor iftikhar
 
Relations digraphs
Relations  digraphsRelations  digraphs
Relations digraphsIIUM
 
Logic (LESSON) - Truth Table, Negation, Conjunction, Dis junction,
Logic (LESSON) - Truth Table, Negation, Conjunction, Dis junction, Logic (LESSON) - Truth Table, Negation, Conjunction, Dis junction,
Logic (LESSON) - Truth Table, Negation, Conjunction, Dis junction, Ria Micor
 
Rules of inference
Rules of inferenceRules of inference
Rules of inferenceLakshmi R
 
Discrete Mathematics Lecture
Discrete Mathematics LectureDiscrete Mathematics Lecture
Discrete Mathematics LectureGenie Rose Santos
 
Linear Congruences, reduced residue systems.pptx
Linear Congruences, reduced residue systems.pptxLinear Congruences, reduced residue systems.pptx
Linear Congruences, reduced residue systems.pptxKuparala Vidyasagar
 
Traveling salesman problem
Traveling salesman problemTraveling salesman problem
Traveling salesman problemJayesh Chauhan
 
Intro automata theory
Intro automata theory Intro automata theory
Intro automata theory Rajendran
 
Bellman Ford's Algorithm
Bellman Ford's AlgorithmBellman Ford's Algorithm
Bellman Ford's AlgorithmTanmay Baranwal
 
Propositional logic
Propositional logicPropositional logic
Propositional logicMamta Pandey
 

What's hot (20)

Formal Logic - Lesson 4 - Tautology, Contradiction and Contingency
Formal Logic - Lesson 4 - Tautology, Contradiction and ContingencyFormal Logic - Lesson 4 - Tautology, Contradiction and Contingency
Formal Logic - Lesson 4 - Tautology, Contradiction and Contingency
 
Shortest path algorithms
Shortest path algorithmsShortest path algorithms
Shortest path algorithms
 
Mathematics applied in major fields of science and technology
Mathematics applied  in major fields of science and technologyMathematics applied  in major fields of science and technology
Mathematics applied in major fields of science and technology
 
Dijkstra's algorithm presentation
Dijkstra's algorithm presentationDijkstra's algorithm presentation
Dijkstra's algorithm presentation
 
Disrete mathematics and_its application_by_rosen _7th edition_lecture_1
Disrete mathematics and_its application_by_rosen _7th edition_lecture_1Disrete mathematics and_its application_by_rosen _7th edition_lecture_1
Disrete mathematics and_its application_by_rosen _7th edition_lecture_1
 
Formal Logic - Lesson 5 - Logical Equivalence
Formal Logic - Lesson 5 - Logical EquivalenceFormal Logic - Lesson 5 - Logical Equivalence
Formal Logic - Lesson 5 - Logical Equivalence
 
Relations digraphs
Relations  digraphsRelations  digraphs
Relations digraphs
 
Logic (LESSON) - Truth Table, Negation, Conjunction, Dis junction,
Logic (LESSON) - Truth Table, Negation, Conjunction, Dis junction, Logic (LESSON) - Truth Table, Negation, Conjunction, Dis junction,
Logic (LESSON) - Truth Table, Negation, Conjunction, Dis junction,
 
Graph theory presentation
Graph theory presentationGraph theory presentation
Graph theory presentation
 
Number theory
Number theoryNumber theory
Number theory
 
Logic gates presentation
Logic gates presentationLogic gates presentation
Logic gates presentation
 
Rules of inference
Rules of inferenceRules of inference
Rules of inference
 
Greedy Algorithms
Greedy AlgorithmsGreedy Algorithms
Greedy Algorithms
 
A* algorithm
A* algorithmA* algorithm
A* algorithm
 
Discrete Mathematics Lecture
Discrete Mathematics LectureDiscrete Mathematics Lecture
Discrete Mathematics Lecture
 
Linear Congruences, reduced residue systems.pptx
Linear Congruences, reduced residue systems.pptxLinear Congruences, reduced residue systems.pptx
Linear Congruences, reduced residue systems.pptx
 
Traveling salesman problem
Traveling salesman problemTraveling salesman problem
Traveling salesman problem
 
Intro automata theory
Intro automata theory Intro automata theory
Intro automata theory
 
Bellman Ford's Algorithm
Bellman Ford's AlgorithmBellman Ford's Algorithm
Bellman Ford's Algorithm
 
Propositional logic
Propositional logicPropositional logic
Propositional logic
 

Viewers also liked

LOGIKA PROPOSISI & PREDIKATLogika proposisi & predikat
LOGIKA PROPOSISI & PREDIKATLogika proposisi & predikatLOGIKA PROPOSISI & PREDIKATLogika proposisi & predikat
LOGIKA PROPOSISI & PREDIKATLogika proposisi & predikatZulfadli Fadli
 
MDD and the Tautology Problem: Discussion Notes.
MDD and the Tautology Problem: Discussion Notes.MDD and the Tautology Problem: Discussion Notes.
MDD and the Tautology Problem: Discussion Notes.Bob Binder
 
CPSC 125 Ch 1 sec 1
CPSC 125 Ch 1 sec 1CPSC 125 Ch 1 sec 1
CPSC 125 Ch 1 sec 1David Wood
 
Kecerdasan buatan
Kecerdasan buatanKecerdasan buatan
Kecerdasan buatanzhu ma
 

Viewers also liked (6)

Ai 3
Ai 3Ai 3
Ai 3
 
LOGIKA PROPOSISI & PREDIKATLogika proposisi & predikat
LOGIKA PROPOSISI & PREDIKATLogika proposisi & predikatLOGIKA PROPOSISI & PREDIKATLogika proposisi & predikat
LOGIKA PROPOSISI & PREDIKATLogika proposisi & predikat
 
MDD and the Tautology Problem: Discussion Notes.
MDD and the Tautology Problem: Discussion Notes.MDD and the Tautology Problem: Discussion Notes.
MDD and the Tautology Problem: Discussion Notes.
 
8 logika predikat
8  logika predikat8  logika predikat
8 logika predikat
 
CPSC 125 Ch 1 sec 1
CPSC 125 Ch 1 sec 1CPSC 125 Ch 1 sec 1
CPSC 125 Ch 1 sec 1
 
Kecerdasan buatan
Kecerdasan buatanKecerdasan buatan
Kecerdasan buatan
 

More from Kumar

Graphics devices
Graphics devicesGraphics devices
Graphics devicesKumar
 
Fill area algorithms
Fill area algorithmsFill area algorithms
Fill area algorithmsKumar
 
region-filling
region-fillingregion-filling
region-fillingKumar
 
Bresenham derivation
Bresenham derivationBresenham derivation
Bresenham derivationKumar
 
Bresenham circles and polygons derication
Bresenham circles and polygons dericationBresenham circles and polygons derication
Bresenham circles and polygons dericationKumar
 
Introductionto xslt
Introductionto xsltIntroductionto xslt
Introductionto xsltKumar
 
Extracting data from xml
Extracting data from xmlExtracting data from xml
Extracting data from xmlKumar
 
Xml basics
Xml basicsXml basics
Xml basicsKumar
 
XML Schema
XML SchemaXML Schema
XML SchemaKumar
 
Publishing xml
Publishing xmlPublishing xml
Publishing xmlKumar
 
Applying xml
Applying xmlApplying xml
Applying xmlKumar
 
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XMLKumar
 
How to deploy a j2ee application
How to deploy a j2ee applicationHow to deploy a j2ee application
How to deploy a j2ee applicationKumar
 
JNDI, JMS, JPA, XML
JNDI, JMS, JPA, XMLJNDI, JMS, JPA, XML
JNDI, JMS, JPA, XMLKumar
 
EJB Fundmentals
EJB FundmentalsEJB Fundmentals
EJB FundmentalsKumar
 
JSP and struts programming
JSP and struts programmingJSP and struts programming
JSP and struts programmingKumar
 
java servlet and servlet programming
java servlet and servlet programmingjava servlet and servlet programming
java servlet and servlet programmingKumar
 
Introduction to JDBC and JDBC Drivers
Introduction to JDBC and JDBC DriversIntroduction to JDBC and JDBC Drivers
Introduction to JDBC and JDBC DriversKumar
 
Introduction to J2EE
Introduction to J2EEIntroduction to J2EE
Introduction to J2EEKumar
 

More from Kumar (20)

Graphics devices
Graphics devicesGraphics devices
Graphics devices
 
Fill area algorithms
Fill area algorithmsFill area algorithms
Fill area algorithms
 
region-filling
region-fillingregion-filling
region-filling
 
Bresenham derivation
Bresenham derivationBresenham derivation
Bresenham derivation
 
Bresenham circles and polygons derication
Bresenham circles and polygons dericationBresenham circles and polygons derication
Bresenham circles and polygons derication
 
Introductionto xslt
Introductionto xsltIntroductionto xslt
Introductionto xslt
 
Extracting data from xml
Extracting data from xmlExtracting data from xml
Extracting data from xml
 
Xml basics
Xml basicsXml basics
Xml basics
 
XML Schema
XML SchemaXML Schema
XML Schema
 
Publishing xml
Publishing xmlPublishing xml
Publishing xml
 
DTD
DTDDTD
DTD
 
Applying xml
Applying xmlApplying xml
Applying xml
 
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XML
 
How to deploy a j2ee application
How to deploy a j2ee applicationHow to deploy a j2ee application
How to deploy a j2ee application
 
JNDI, JMS, JPA, XML
JNDI, JMS, JPA, XMLJNDI, JMS, JPA, XML
JNDI, JMS, JPA, XML
 
EJB Fundmentals
EJB FundmentalsEJB Fundmentals
EJB Fundmentals
 
JSP and struts programming
JSP and struts programmingJSP and struts programming
JSP and struts programming
 
java servlet and servlet programming
java servlet and servlet programmingjava servlet and servlet programming
java servlet and servlet programming
 
Introduction to JDBC and JDBC Drivers
Introduction to JDBC and JDBC DriversIntroduction to JDBC and JDBC Drivers
Introduction to JDBC and JDBC Drivers
 
Introduction to J2EE
Introduction to J2EEIntroduction to J2EE
Introduction to J2EE
 

Recently uploaded

4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptxmary850239
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17Celine George
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfTechSoup
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)cama23
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSJoshuaGantuangco2
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxCarlos105
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfphamnguyenenglishnb
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONHumphrey A Beña
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptxSherlyMaeNeri
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxMaryGraceBautista27
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptxmary850239
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...Postal Advocate Inc.
 

Recently uploaded (20)

4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
 
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptxYOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptx
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptx
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 

discreet mathematics

  • 1.  Logic! Introduction to Mathematical Logic: MATH-105 Jan-May 2013 1
  • 2. • Crucial for mathematical reasoning • Important for program design • Used for designing electronic circuitry • (Propositional )Logic is a system based on propositions. • A proposition or statement is a (declarative) sentence that is either true or false (not both). • We say that the truth value of a proposition is either true (T) or false (F). • Corresponds to 1 and 0 in digital circuits Introduction to Mathematical Logic: MATH-105 Jan-May 2013 2
  • 3. “Elephants are bigger than mice.” Is this a sentence? yes Is this a proposition? yes What is the truth value of the proposition? true Introduction to Mathematical Logic: MATH-105 Jan-May 2013 3
  • 4. “520 < 111” Is this a sentence? yes Is this a proposition? yes What is the truth value of the proposition? false Introduction to Mathematical Logic: MATH-105 Jan-May 2013 4
  • 5. “y > 5” Is this a sentence? yes Is this a proposition? no Its truth value depends on the value of y, but this value is not specified. We call this type of sentence a propositional function or open sentence. Introduction to Mathematical Logic: MATH-105 Jan-May 2013 5
  • 6. “Today is January 27 and 99 < 5.” Is this a sentence? yes Is this a proposition? yes What is the truth value of the proposition? false Introduction to Mathematical Logic: MATH-105 Jan-May 2013 6
  • 7. “Please do not fall asleep.” Is this a sentence? yes It’s a request. Is this a proposition? no Introduction to Mathematical Logic: MATH-105 Jan-May 2013 7
  • 8. “If the moon is made of cheese, then I will be rich.” Is this a sentence? yes Is this a proposition? yes What is the truth value of the proposition? probably true Introduction to Mathematical Logic: MATH-105 Jan-May 2013 8
  • 9. “x < y if and only if y > x.” Is this a sentence? yes Is this a proposition? yes … because its truth value does not depend on specific values of x and y. What is the truth value of the proposition? true Introduction to Mathematical Logic: MATH-105 Jan-May 2013 9
  • 10. Aswe have seen in the previous examples, one or more propositions can be combined to form a single compound proposition. We formalize this by denoting propositions with letters such as p, q, r, s, and introducing several logical operators or logical connectives. Introduction to Mathematical Logic: MATH-105 Jan-May 2013 10
  • 11. We will examine the following logical operators: • Negation (NOT, ¬ ) • Conjunction (AND, ∧ ) • Disjunction (OR, ∨ ) • Exclusive-or (XOR, ⊕ ) • Implication (if – then, → ) • Biconditional (if and only if, ↔ ) Truth tables can be used to show how these operators can combine propositions to compound propositions. Introduction to Mathematical Logic: MATH-105 Jan-May 2013 11
  • 12. Unary Operator, Symbol: ¬ P  P true (T) false (F) false (F) true (T) Introduction to Mathematical Logic: MATH-105 Jan-May 2013 12
  • 13. Binary Operator, Symbol: ∧ P Q P Q T T T T F F F T F F F F Introduction to Mathematical Logic: MATH-105 Jan-May 2013 13
  • 14. Binary Operator, Symbol: ∨ P Q P Q T T T T F T F T T F F F Introduction to Mathematical Logic: MATH-105 Jan-May 2013 14
  • 15. Binary Operator, Symbol: ⊕ P Q PQ T T F T F T F T T F F F Introduction to Mathematical Logic: MATH-105 Jan-May 2013 15
  • 16. Binary Operator, Symbol: → P Q PQ T T T T F F F T T F F T Introduction to Mathematical Logic: MATH-105 Jan-May 2013 16
  • 17. Binary Operator, Symbol: ↔ P Q PQ T T T T F F F T F F F T Introduction to Mathematical Logic: MATH-105 Jan-May 2013 17
  • 18. Statements and operators can be combined in any way to form new statements. P Q P Q (P)(Q) T T F F F T F F T T F T T F T F F T T T Introduction to Mathematical Logic: MATH-105 Jan-May 2013 18
  • 19. Statements and operators can be combined in any way to form new statements. P Q PQ (PQ) (P)(Q) T T T F F T F F T T F T F T T F F F T T Introduction to Mathematical Logic: MATH-105 Jan-May 2013 19
  • 20. • Totake discrete mathematics, you must have taken calculus or a course in computer science. • When you buy a new car from Acme Motor Company, you get $2000 back in cash or a 2% car loan. • School is closed if more than 2 feet of snow falls or if the wind chill is below -100. Introduction to Mathematical Logic: MATH-105 Jan-May 2013 20
  • 21. • To take discrete mathematics, you must have taken calculus or a course in computer science. › P: take discrete mathematics › Q: take calculus › R: take a course in computer science •P →Q∨R • Problem with proposition R Introduction to Mathematical Logic: MATH-105 Jan-May 2013 21
  • 22. • When you buy a new car from Acme Motor Company, you get $2000 back in cash or a 2% car loan. › P: buy a car from Acme Motor Company › Q: get $2000 cash back › R: get a 2% car loan •P →Q⊕R • Why use XOR here? – example of ambiguity of natural languages Introduction to Mathematical Logic: MATH-105 Jan-May 2013 22
  • 23. • School is closed if more than 2 feet of snow falls or if the wind chill is below -100. › P: School is closed › Q: 2 feet of snow falls › R: wind chill is below -100 •Q ∧R→P • Precedence among operators:  ¬, ∧, ∨, →, ↔ Introduction to Mathematical Logic: MATH-105 Jan-May 2013 23
  • 24. P Q (PQ) (P)(Q) (PQ)(P)(Q) T T F F T T F T T T F T T T T F F T T T  The statements ¬(P∧Q) and (¬P) ∨ (¬Q) are logically equivalent, since they have the same truth table, or put it in another way, ¬(P∧Q) ↔(¬P) ∨ (¬Q) is always true. Introduction to Mathematical Logic: MATH-105 Jan-May 2013 24
  • 25. A tautology is a statement that is always true.  Examples: › R∨(¬R) › ¬(P∧Q) ↔ (¬P)∨(¬ Q)  A contradiction is a statement that is always false.  Examples: › R∧(¬R) › ¬(¬(P ∧ Q) ↔ (¬P) ∨ (¬Q))  The negation of any tautology is a contradiction, and the negation of any contradiction is a tautology.  If A has the truth value, T for at least one combination of truth values of P1, P2 , P3 ,…, Pn then A is said to be satisfiable. Introduction to Mathematical Logic: MATH-105 Jan-May 2013 25
  • 26. Definition: two propositional statements S1 and S2 are said to be (logically) equivalent, denoted S1 ≡ S2 if › They have the same truth table, or › S1 ⇔ S2 is a tautology  Equivalence can be established by › Constructing truth tables › Using equivalence laws Introduction to Mathematical Logic: MATH-105 Jan-May 2013 26
  • 27. Equivalence laws › Identity laws, P ∧ T ≡ P, › Domination laws, P ∧ F ≡ F, › Idempotent laws, P ∧ P ≡ P, › Double negation law, ¬ (¬ P) ≡ P › Commutative laws, P ∧ Q ≡ Q ∧ P, › Associative laws, P ∧ (Q ∧ R)≡ (P ∧ Q) ∧ R, › Distributive laws, P ∧ (Q ∨ R)≡ (P ∧ Q) ∨ (P ∧ R), › De Morgan’s laws, ¬ (P∧Q) ≡ (¬ P) ∨ (¬ Q) › Law with implication P → Q ≡ ¬ P ∨ Q Introduction to Mathematical Logic: MATH-105 Jan-May 2013 27
  • 28. • Show that P → Q ≡ ¬ P ∨ Q: by truth table • Showthat (P → Q) ∧ (P → R) ≡ P → (Q ∧ R): by equivalence laws: › Law with implication on both sides › Distribution law on LHS Introduction to Mathematical Logic: MATH-105 Jan-May 2013 28
  • 29. •Proposition › Statement, Truth value, › Proposition, Propositional symbol, Open proposition •Operators › Define by truth tables › Composite propositions › Tautology and contradiction •Equivalence of propositional statements › Definition › Proving equivalence (by truth table or equivalence laws) Introduction to Mathematical Logic: MATH-105 Jan-May 2013 29
  • 30. Propositionalfunction (open sentence): statement involving one or more variables,  e.g.: x-3 > 5. Let us call this propositional function P(x), where P is the predicate and x is the variable. What is the truth value of P(2) ? false What is the truth value of P(8) ? false What is the truth value of P(9) ? true When a variable is given a value, it is said to be instantiated Truth value depends on value of variable Introduction to Mathematical Logic: MATH-105 Jan-May 2013 30
  • 31. Letus consider the propositional function Q(x, y, z) defined as: x + y = z. Here,Q is the predicate and x, y, and z are the variables. What is the truth value of Q(2, 3, 5) ? true What is the truth value of Q(0, 1, 2) ? false What is the truth value of Q(9, -9, 0) ? true A propositional function (predicate) becomes a proposition when all its variables are instantiated. Introduction to Mathematical Logic: MATH-105 Jan-May 2013 31
  • 32. Other examples of propositional functions Person(x), Person(Socrates) = T x is a person which is true if Person(dog) = F CSCourse(x), which is true if x is a computer science course CS Course(C-language) = T CS Course(MATH 102) = F Introduction to Mathematical Logic: MATH-105 Jan-May 2013 32
  • 33. LetP(x) be a predicate (propositional function). Universally quantified sentence: For all x in the universe of discourse P(x) is true. Using the universal quantifier ∀: ∀x P(x) “for all x P(x)” or “for every x P(x)” (Note:∀x P(x) is either true or false, so it is a proposition, not a propositional function.) Introduction to Mathematical Logic: MATH-105 Jan-May 2013 33
  • 34. Example: Let the universe of discourse be all people S(x): x is a Mathematics student. G(x): x is a genius. What does ∀x (S(x) → G(x)) mean ? “If x is a mathematics student, then x is a genius.” or “All Mathematics students are geniuses.” Ifthe universe of discourse is all mathematics students, then the same statement can be written as ∀x G(x) Introduction to Mathematical Logic: MATH-105 Jan-May 2013 34
  • 35. Existentiallyquantified sentence: There exists an x in the universe of discourse for which P(x) is true. Using the existential quantifier ∃: ∃x P(x) “There is an x such that P(x).” “There is at least one x such that P(x).” (Note:∃x P(x) is either true or false, so it is a proposition, but no propositional function.) Introduction to Mathematical Logic: MATH-105 Jan-May 2013 35
  • 36. Example: P(x):x is a Mathematics professor. G(x): x is a genius. What does ∃x (P(x) ∧ G(x)) mean ? “There is an x such that x is a Mathematics professor and x is a genius.” or “At least one Mathematics professor is a genius.” Introduction to Mathematical Logic: MATH-105 Jan-May 2013 36
  • 37. Another example: Let the universe of discourse be the real numbers. What does ∀x∃y (x + y = 320) mean ? “For every x there exists a y so that x + y = 320.” Is it true? yes Is it true for the natural numbers? no Introduction to Mathematical Logic: MATH-105 Jan-May 2013 37
  • 38. A counterexample to ∀x P(x) is an object c so that P(c) is false. Statementssuch as ∀x (P(x) → Q(x)) can be disproved by simply providing a counterexample. Statement: “All birds can fly.” Disproved by counterexample: Penguin. Introduction to Mathematical Logic: MATH-105 Jan-May 2013 38
  • 39. ¬(∀x P(x)) is logically equivalent to ∃x (¬P(x)).  ¬(∃x P(x)) is logically equivalent to ∀x (¬P(x)).  This is de Morgan’s law for quantifiers Introduction to Mathematical Logic: MATH-105 Jan-May 2013 39
  • 40. Examples  Not all roses are red  ¬∀x (Rose(x) → Red(x))  ∃x (Rose(x) ∧ ¬Red(x)) Nobody is perfect x (Person(x)  Perfect(x)) x (Person(x)  Perfect(x)) Introduction to Mathematical Logic: MATH-105 Jan-May 2013 40
  • 41. A predicate can have more than one variables. › S(x, y, z): z is the sum of x and y › F(x, y): x and y are friends  We can quantify individual variables in different ways › ∀x, y, z (S(x, y, z) → (x <= z ∧ y <= z)) › ∃x ∀y ∀z (F(x, y) ∧ F(x, z) ∧ (y != z) → ¬F(y, z) Introduction to Mathematical Logic: MATH-105 Jan-May 2013 41
  • 42. Exercise: translate the following English sentence into logical expression “There is a rational number in between every pair of distinct rational numbers”  Use predicate Q(x), which is true when x is a rational number  ∀x,y (Q(x) ∧ Q (y) ∧ (x < y) →  ∃u (Q(u) ∧ (x < u) ∧ (u < y))) Introduction to Mathematical Logic: MATH-105 Jan-May 2013 42
  • 43. • Propositional functions (predicates) • Universal and existential quantifiers, and the duality of the two • When predicates become propositions › All of its variables are instantiated › All of its variables are quantified • Nested quantifiers › Quantifiers with negation • Logical expressions formed by predicates, operators, and quantifiers Introduction to Mathematical Logic: MATH-105 Jan-May 2013 43
  • 44. Mathematical Reasoning Introduction to Mathematical Logic: MATH-105 Jan-May 2013 44
  • 45. We need mathematical reasoning to determine whether a mathematical argument is correct or incorrect and construct mathematical arguments. Introduction to Mathematical Logic: MATH-105 Jan-May 2013 45
  • 46. Argument: An argument is an assertion; that a group of propositions called premises, yields an other proposition, called the conclusion. Let P1, P2 , P3 ,…, Pn is the group of propositions that yields the conclusion Q. Then, it is denoted as P1, P2 , P3 ,…, Pn |- Q  Valid Argument: An argument is called valid argument if the conclusion is true whenever all the premises are true or The argument is valid iff the ANDing of the group of propositions implies conclusion is a tautology ie: P(P1, P2 , P3 ,…, Pn ) Q is a tautology 46 Introduction to Mathematical Logic: MATH-105 Jan-May 2013
  • 47. Fallacy Argument: An argument is called fallacy or an invalid argument if it is not a valid argument. Introduction to Mathematical Logic: MATH-105 Jan-May 2013 47
  • 48.  Translate the following into symbolic form and test the validity of the argument: 1.“If I will select in IAS examination, then I will not be able to go to London. Since, I am going to London, I will not select in IAS examination”. 2. “If 6 is even then 2 does not divide 7. Either 5 is not prime or 2 divides 7. But 5 is prime, therefore, 6 is not even”. Introduction to Mathematical Logic: MATH-105 Jan-May 2013 48
  • 49. Ans-1: p: I will select in IAS examination q: I will go to London Premises: 1. p ~q 2. q Conclusion: ~p Verify: [(p ~q) ∧(q)] ~p is a tautology Introduction to Mathematical Logic: MATH-105 Jan-May 2013 49
  • 50.  Ans-2: p: 6 is even q: 2 divides 7 r: 5 is prime Premises: 1. p ~q 2. ~r ∨ q 3. r Conclusion: ~p Verify: [ (1) ∧ (2) ∧ (3) ] ~p is a tautology Introduction to Mathematical Logic: MATH-105 Jan-May 2013 50
  • 51. The problem of finding whether a given statement is tautology or contradiction or satisfiable in a finite number of steps, is called as decision problem, the construction of truth tables may not be often a practical solution. We therefore consider alternate procedure known as reduction to normal forms. The two such forms are:  Disjunctive Normal Form (DNF)  Conjunctive Normal Form (CNF) Introduction to Mathematical Logic: MATH-105 Jan-May 2013 51
  • 52. A compound statement is said to be in dnf if it is disjunction of conjunction of the variables or their negations.  Ex:(p ∧ q ∧ r) ∨ (~p ∧q ∧r) ∨ (~p ∧~q ∧ r)  A compound statement is said to be in cnf if it is conjunction of disjunction of the variables or their negations.  Ex:(p ∨ q ∨ ~r) ∧ (p ∨ ~q ∨ r) ∧ (~p ∨ ~q ∨ r) Introduction to Mathematical Logic: MATH-105 Jan-May 2013 52
  • 53. The truth table for the given statement is: P Q P Q Q P (P Q)  (Q P) T T T T T T F F T F F T T F F F F F T T Introduction to Mathematical Logic: MATH-105 Jan-May 2013 53
  • 54. DNF:  DNF: (P ∧ Q) ∨ (~P ∧ ~Q) Introduction to Mathematical Logic: MATH-105 Jan-May 2013 54
  • 55. CNF:  CNF: ~(P ∧ ~Q) ∧ ~(~P ∧ Q) ≡ (~P ∨ Q) ∧ (P ∨ ~Q) Introduction to Mathematical Logic: MATH-105 Jan-May 2013 55
  • 56. Mathematical Reasoning • Terminology (argument, valid argument and fallacy argument) • Examples on valid arguments • Normal forms (DNF and CNF) • Truth table method to express the statements as dnf and cnf forms Introduction to Mathematical Logic: MATH-105 Jan-May 2013 56