Introduction to Logic - PowerPoint PPT Presentation

1 / 23
About This Presentation
Title:

Introduction to Logic

Description:

The 'red' operations are commutative ( a op b = b op a ), the 'blue' operations are not. ... Either Randy or Vijay, but not both are chatting (2) (R V) is True. ... – PowerPoint PPT presentation

Number of Views:905
Avg rating:3.0/5.0
Slides: 24
Provided by: isabellebi
Category:

less

Transcript and Presenter's Notes

Title: Introduction to Logic


1
Introduction to Logic
2
Learning Objectives
  • Introduction to numbers
  • Introduction to logic
  • propositions
  • propositional equivalences

3
Introduction to Numbers
  • Numbers N 0, 1, 2, Natural
    Numbers
  • Z , -10, -9, -8, , 0, 1, 2,
    Integers
  • Z 1, 2, 3, Positive Integers
  • Q Rational Numbers
  • R Real numbers
  • Are there real irrational numbers?
  • Notation a,b,c, n, k, m, i, j will usually
    denote integers (unless otherwise stated).

4
Introduction to Numbers
  • Binary operations - / (ab)
  • The red operations are commutative ( a op b
    b op a ), the blue operations are not.
  • The red operations are associative (a op b)
    op c a op (b op c) the blue are not.
  • / is further distinct from the other
    operations a / b may not be an integer, all
    other operations when operated on integers yield
    an integer.
  • Conclusion a / b / c is ambiguous. To resolve
    ambiguity we need parenthesis
  • Either (a / b) / c or a / (b / c). For
    instance, if a 9, b c 3 then
  • (a / b) / c 1 while a / (b / c) 9.

5
Introduction to Numbers
  • Math language n is an even integer n 2k
  • n is an odd integer n 2k1 (or n ? 2k)
  • c divides a a bc (c a)
  • a is a multiple of c
  • a is a square a n2
  • The division algorithm For any given
    integer a and positive integer b
  • a bq r where 0 ? r
  • (q quotient, r remainder).
  • (Note b a if and only if r 0).
  • Examples a 37, b 8 37 84 5
    (q 4 and r 5)
  • a -39, b 7 -39 7(-6) 3 (q
    -6 and r 3)

6
Introduction to Numbers
  • We expand our mathematical data base through
    Theorems.
  • Examples
  • Theorem 1.1 If n is odd then n2 is odd.
  • Proof n is odd ? n 2k 1 n2 (2k1)2
    4k2 4k 1 2(2k2 2k) 1 2m 1.
    QED
  • Theorem 1.2 The product of two consecutive
    integers is an even integer.
  • Proof (in math language k(k1) 2m).
  • Case 1 k is even, k 2j. k(k1) 2j(2j1)
    2(j(2j1)) 2m.
  • Case 2 k is odd, k 2j1. k(k1)
    (2j1)(2j2) (2j1)2(j1) 2(j1)(2j1) 2m.
  • QED

7
Introduction to Numbers
  • A positive integer p is prime if its only
    divisors are 1 and p. 2,3,5,7,11, are all
    prime numbers. If a is not prime it is called a
    composite number.
  • There are infinitely many primes (Greeks more
    than 2200 years ago).
  • Is everything known in Math? Anything left to be
    proved?
  • Pairs of primes that differ by 2 such as (11,
    13), (17, 19) (29, 31) are called twin primes.
  • Are three infinitely many twin primes?
  • An open problem!!! Over 2000 years old!
  • Maple introduction The functions isprime(n) and
    ithprime(n).

8
Logic
  • A proposition is a statement which is true or
    false but not both.
  • Today is Saturday 2 25 11.
  • Compound propositions
  • Negation ?p (if p T then ?p F)
  • Given two propositions, p, q. We can create new
    compound propositions.

9
Logic
  • Disjunction p ? q (p or q). This new
    proposition is False only when both p and q are
    False, for all other possibilities it is True.
  • Conjunction p ? q (p and q). This new
    proposition is True only when both p and q are
    True, for all other possibilities it is False.
  • Implication p ? q This new proposition is
    False only when p is True and q is False,
    otherwise it is True. p is called the hypothesis
    (antecedent, premise), and q the conclusion (or
    consequence).
  • XOR (exclusive or) p ? q This new
    proposition is True only when either p or q are
    True, but not both. It is False otherwise.

10
Truth Tables
11
Truth Tables
12
Logic
  • Example
  • Five friends have access to a chat room. Is it
    possible to determine who is chatting if the
    following information is known? Either Kevin or
    Heather or both, are chatting. Either Randy or
    Vijay, but not both are chatting. If Abby is
    chatting, so is Randy. Vijay and Kevin are
    either both chatting or neither are chatting. If
    Heather is chatting, then so are Abby and Kevin.

13
Logic
  • Ans. Create five propositions A Abbey is
    chatting.
  • H Heather is chatting
  • R Randy is chatting
  • V Vijay is chatting
  • K Kevin is chatting

14
Logic
  • Either Kevin or Heather or both, are chatting
    (1) H ? K is True.
  • Either Randy or Vijay, but not both are
    chatting (2) (R ? V) is True.
  • If Abby is chatting, so is Randy (3) A ? R
    is True
  • Vijay and Kevin are either both chatting or
    neither are chatting
  • (4) ( K ? V) ? (?K ? ?V) is True
  • If Heather is chatting, then so are Abby and
    Kevin. (5) H ? A ? K is True.

15
Logic
  • Assume H True.
  • From (5) A K True.
  • From (3) R True.
  • From (2) V False but then (4) is False!!!
    Contradiction.
  • So H False.
  • From (1) K True.
  • From (4) V True.
  • From (2) R False.
  • From (3) A False.
  • Answer YES!!! Vijay and Kevin are chatting!!!

16
Logic
  • Q ? P is the CONVERSE of P ? Q
  • ? Q ? ? P is the CONTRAPOSITIVE of P ? Q
  • _______________
  • Example
  • Find the converse and contrapositive of the
    following
  • statement
  • R Raining tomorrow is a sufficient condition
    for my not
  • going to town.
  • Step 1 Assign propositional variables to
    component
  • propositions
  • P It will rain tomorrow
  • Q I will not go to town

17
Logic
  • Step 2 Symbolize the assertion
  • R P ? Q
  • Step 3 Symbolize the converse
  • Q ? P
  • Step 4 Convert the symbols back into words
  • If I dont go to town then it will rain
    tomorrow
  • or
  • Raining tomorrow is a necessary condition for my
  • not going to town.
  • or
  • My not going to town is a sufficient condition
    for it
  • raining tomorrow.

18
Logic
  • Biconditional
  • if and only if, iff
  • Symbol ?
  • _________________
  • Example P - I am going to town, Q - It is
    going to rain
  • P ? Q I am going to town if and only if it is
    going to
  • rain.
  • Truth Table
  • Note Both P and Q must have the same truth
    value.
  • P Q P ? Q
  • 0 0 1
  • 0 1 0
  • 1 0 0
  • 1 1 1

19
Propositional Equivalences
  • A tautology is a proposition which is always true
    .Classic Example P ? ? P
  • ___________________
  • A contradiction is a proposition which is always
    false .Classic Example P ? ? P
  • ___________________
  • A contingency is a proposition which neither a
    tautology
  • nor a contradiction.Example (P ? Q) ? ? R
  • ____________________

20
Propositional Equivalences
  • Two propositions P and Q are logically equivalent
    if P ? Q is a tautology.
  • We write P?Q
  • ____________________
  • Example show that (P ? Q) ? (Q ? P) and (P ? Q)
    are logically equivalent (P ? Q) ? (Q ? P) ?(P ?
    Q)

21
Propositional Equivalences
22
Propositional Equivalence
  • To show that two propositions are NOT logically
    equivalent, it is enough to show a counterexample
    where both propositions do not have the same
    truth value.

23
Propositional Equivalence
  • Show that (p ? q) ? r and p ? (q ? r ) are NOT
    logically equivalent.
  • Note it is enough to show that for one
    assignment of truth values to p, q and r the two
    proposition will have distinct truth values.
  • Let p F, q T and r F.
  • Then (p ? q) ? r (F ? T) ? F T ? F
    F
  • p ? (q ? r) F ? (T ? F) F ? F T
Write a Comment
User Comments (0)
About PowerShow.com