Review I - PowerPoint PPT Presentation

1 / 43
About This Presentation
Title:

Review I

Description:

... So the implication is true no matter what someone making less than $25,000 does. ... Construct a truth table for the proposition. ... – PowerPoint PPT presentation

Number of Views:81
Avg rating:3.0/5.0
Slides: 44
Provided by: georgeb57
Category:
Tags: review | tableless

less

Transcript and Presenter's Notes

Title: Review I


1
Review I
Rosen 1.1-1.5, 3.1
2
Know your definitions!
3
Definition 1. Negation of p
  • Let p be a proposition. The statement It is
    not the case that p is also a proposition,
    called the negation of p or p (read not p)

p The sky is blue. ?p It is not the case that
the sky is blue. ?p The sky is not blue.
4
Definition 2. Conjunction of p and q
  • Let p and q be propositions. The proposition p
    and q, denoted by p?q is true when both p and q
    are true and is false otherwise. This is called
    the conjunction of p and q.

5
Definition 3. Disjunction of p and q
  • Let p and q be propositions. The proposition p
    or q, denoted by p?q, is the proposition that is
    false when p and q are both false and true
    otherwise.

6
Definition 4. Exclusive or of p and q
  • Let p and q be propositions. The exclusive or
    of p and q, denoted by p?q, is the proposition
    that is true when exactly one of p and q is true
    and is false otherwise.

7
Definition 5. Implication p?q
  • Let p and q be propositions. The implication p?q
    is the proposition that is false when p is true
    and q is false, and true otherwise. In this
    implication p is called the hypothesis (or
    antecedent or premise) and q is called the
    conclusion (or consequence).

8
Implications
  • If p, then q
  • p implies q
  • if p,q
  • p only if q
  • p is sufficient for q
  • q if p
  • q whenever p
  • q is necessary for p
  • Not the same as the if-then construct used in
    programming languages such as If p then S

9
Implications
  • How can both p and q be false, and p?q be true?
  • Think of p as a contract and q as its
    obligation that is only carried out if the
    contract is valid.
  • Example If you make more than 25,000, then you
    must file a tax return. This says nothing about
    someone who makes less than 25,000. So the
    implication is true no matter what someone making
    less than 25,000 does.
  • Another example
  • p Bill Gates is poor.
  • q Pigs can fly.
  • p?q is always true because Bill Gates is not
    poor. Another way of saying the implication is
  • Pigs can fly whenever Bill Gates is poor which
    is true since neither p nor q is true.

10
Related Implications
  • Converse of p ? q is q ? p
  • Contrapositive of p ? q is
    the proposition ?q ? ?p

11
Definition 6. Biconditional
  • Let p and q be propositions. The biconditional
    p?q is the proposition that is true when p and q
    have the same truth values and is false
    otherwise. p if and only if q, p is necessary
    and sufficient for q

12
Logical Equivalence
  • An important technique in proofs is to replace a
    statement with another statement that is
    logically equivalent.
  • Tautology compound proposition that is always
    true regardless of the truth values of the
    propositions in it.
  • Contradiction Compound proposition that is
    always false regardless of the truth values of
    the propositions in it.

13
Logically Equivalent
  • Compound propositions P and Q are logically
    equivalent if P?Q is a tautology. In other
    words, P and Q have the same truth values for all
    combinations of truth values of simple
    propositions.
  • This is denoted P?Q (or by P Q)

14
Example DeMorgans
  • Prove that ?(p?q) ? (?p ? ?q)
  • p q (p?q) ?(p?q) ?p ?q (?p ? ?q)

T T T F F T F F
T F F F F
T F F T F
T F T F F

F T T T T

15
List of Logical Equivalences
p?T ? p p?F ? p Identity Laws p?T ? T
p?F ? F Domination Laws p?p ? p p?p ? p
Idempotent Laws ?(?p) ? p Double Negation
Law p?q ? q?p p?q ? q?p Commutative
Laws (p?q)? r ? p? (q?r) (p?q) ? r ? p ? (q?r)

Associative Laws
16
List of Equivalences
p?(q?r) ? (p?q)?(p?r) Distribution Laws p?(q?r)
? (p?q)?(p?r) ?(p?q)?(?p ? ?q) De Morgans
Laws ?(p?q)?(?p ? ?q) Misc. , Table 6 p ? ?p
? T Or Tautology p ? ?p ? F And
Contradiction (p?q) ? (?p ? q) Implication
Equivalence p?q?(p?q) ? (q?p) Biconditional
Equivalence
17
Prove (p??q) ? q ? p?q
  • (p??q) ? q Left-Hand Statement
  • ? q ? (p??q) Commutative
  • ? (q?p) ? (q ??q) Distributive
  • ? (q?p) ? T Or Tautology (Misc. T6)
  • ? q?p Identity
  • ? p?q Commutative

Begin with exactly the left-hand side
statement End with exactly what is on the
right Justify EVERY step with a logical
equivalence
18
Prove (p??q) ? q ? p?q
  • (p??q) ? q Left-Hand Statement
  • ? q ? (p??q) Commutative
  • (q?p) ? (q ??q) Distributive
  • Why did we need this step?

Our logical equivalence specified that ? is
distributive on the right. This does not
guarantee distribution on the left! Ex. Matrix
multiplication is not always commutative (Note
that whether or not ? is distributive on the left
is not the point here.)
19
Prove or Disprove
  • p ? q ? p ? ?q ???
  • To prove that something is not true it is enough
    to provide one counter-example. (Something that
    is true must be true in every case.)
  • p q p?q p??q
  • F T T F
  • The statements are not logically equivalent

20
Method to construct DNF
  • Construct a truth table for the proposition.
  • Use the rows of the truth table where the
    proposition is True to construct minterms
  • If the variable is true, use the propositional
    variable in the minterm
  • If a variable is false, use the negation of the
    variable in the minterm
  • Connect the minterms with ?s.

21
How to find the DNF of (p Ú q)Ør
  • p q r (p Ú q) Ør (p Ú q)Ør
  • T T T T F F
  • T T F T T T
  • T F T T F F
  • T F F T T T
  • F T T T F F
  • F T F T T T
  • F F T F F T
  • F F F F T T
  • There are five sets of input that make the
    statement true. Therefore there are five
    minterms.

22
  • p q r (p Ú q) Ør (p Ú q)Ør
  • T T T T F F
  • T T F T T T
  • T F T T F F
  • T F F T T T
  • F T T T F F
  • F T F T T T
  • F F T F F T
  • F F F F T T
  • From the truth table we can set up the DNF
  • (p Ú q)Ør ? (p?q??r) ? (p??q??r) ? (?p?q??r) ?
    (?p??q?r) ? (?p??q??r)

23
Quantifiers
Universe of Discourse, U The domain of a
variable in a propositional function.
Universal Quantification of P(x) is the
propositionP(x) is true for all values of x in
U. Existential Quantification of P(x) is the
proposition There exists an element, x, in U
such that P(x) is true.
24
Universal Quantification of P(x)
?xP(x) for all x P(x) for every x
P(x) Defined as P(x0) ? P(x1) ? P(x2) ? P(x3) ?
. . . for all xi in U Example Let P(x) denote
x2 ? x If U is x such that 0 lt x lt 1 then ?xP(x)
is false. If U is x such that 1 lt x then ?xP(x)
is true.
25
Existential Quantification of P(x)
?xP(x) there is an x such that P(x) there is
at least one x such that P(x) there exists at
least one x such that P(x) Defined as P(x0) ?
P(x1) ? P(x2) ? P(x3) ? . . . for all xi in
U Example Let P(x) denote x2 ? x If U is x such
that 0 lt x ? 1 then ?xP(x) is true. If U is x
such that x lt 1 then ?xP(x) is true.
26
Quantifiers
  • ?xP(x)
  • True when P(x) is true for every x.
  • False if there is an x for which P(x) is false.
  • ?xP(x)
  • True if there exists an x for which P(x) is true.
  • False if P(x) is false for every x.

27
Negation (it is not the case)
  • ??xP(x) equivalent to ?x?P(x)
  • True when P(x) is false for every x
  • False if there is an x for which P(x) is true.
  • ? ?xP(x) is equivalent to ?x?P(x)
  • True if there exists an x for which P(x) is
    false.
  • False if P(x) is true for every x.

28
Quantification of Two Variables(read left to
right)
  • ?x?yP(x,y) or ?y?xP(x,y)
  • True when P(x,y) is true for every pair x,y.
  • False if there is a pair x,y for which P(x,y) is
    false.
  • ?x?yP(x,y) or ?y?xP(x,y)
  • True if there is a pair x,y for which P(x,y) is
    true.
  • False if P(x,y) is false for every pair x,y.

29
Quantification of Two Variables
  • ?x?yP(x,y)
  • True when for every x there is a y for which
    P(x,y) is true.
  • (in this case y can depend on x)
  • False if there is an x such that P(x,y) is false
    for every y.
  • ?y?xP(x,y)
  • True if there is a y for which P(x,y) is true for
    every x.
  • (i.e., true for a particular y regardless (or
    independent) of x)
  • False if for every y there is an x for which
    P(x,y) is false.
  • Note that order matters here
  • In particular, if ?y?xP(x,y) is true, then
    ?x?yP(x,y) is true.
  • However, if ?x?yP(x,y) is true, it is not
    necessary that ?y?xP(x,y) is true.

30
Basic Number Theory Definitionsfrom Chapters
1.6, 2
  • Z Set of all Integers
  • Z Set of all Positive Integers
  • N Set of Natural Numbers (Z and Zero)
  • R Set of Real Numbers
  • Addition and multiplication on integers produce
    integers. (a,b ? Z) ? (ab) ? Z ? (ab) ? Z

31
Number Theory Defs (cont.)
? such that
  • n is even is defined as ?k ? Z ? n 2k
  • n is odd is defined as ?k ? Z ? n 2k1
  • x is rational is defined as ?a,b ? Z ? x a/b,
    b?0
  • x is irrational is defined as ??a,b ? Z ? x
    a/b, b?0 or ?a,b ? Z, x ? a/b, b?0
  • p ? Z is prime means that the only positive
    factors of p are p and 1. If p is not prime we
    say it is composite.

32
Methods of Proof
  • p? q (Example if n is even, then n2 is even)
  • Direct proof Assume p is true and use a series
    of previously proven statements to show that q is
    true.
  • Indirect proof Show ?q ??p is true
    (contrapositive), using any proof technique
    (usually direct proof).
  • Proof by contradiction Assume negation of what
    you are trying to prove (p??q). Show that this
    leads to a contradiction.

33
Direct Proof
  • Prove ?n?Z, if n is even, then n2 is even.
  • Tabular-style proof
  • n is even hypothesis
  • n2k for some k?Z definition of even
  • n2 4k2 algebra
  • n2 2(2k2) which is algebra and mult of
  • 2(an integer) integers gives integers
  • n2 is even definition of even

34
Same Direct Proof
  • Prove ?n?Z, if n is even, then n2 is even.
  • Sentence-style proof
  • Assume that n is even. Thus, we know that n 2k
    for some integer k. It follows that n2 4k2
    2(2k2). Therefore n2 is even since it is 2 times
    2k2, which is an integer.

35
Structure of a Direct Proof
  • Prove ?n?Z, if n is even, then n2 is even.
  • Proof
  • Assume that n is even. Thus, we know that n 2k
    for some integer k. It follows that n2 4k2
    2(2k2). Therefore n2 is even since it is 2 times
    2k2 which is an integer.

36
Example of an Indirect Proof
  • Prove If n3 is even, then n is even.
  • Proof The contrapositive of If n3 is even,
    then n is even is If n is odd, then n3 is odd.
    If the contrapositive is true then the original
    statement must be true.
  • Assume n is odd. Then ?k?Z ? n 2k1. It
    follows that n3 (2k1)3 8k38k24k1
    2(4k34k22k)1. (4k34k22k) is an integer.
    Therefore n3 is 1 plus an even integer.
    Therefore n3 is odd.

Assumption, Definition, Arithmetic, Conclusion
37
Discussion of Indirect Proof
  • Could we do a direct proof of If n3 is even, then
    n is even?
  • Assume n3 is even . . . then what?

We dont have a rule about how to take n3 apart!
38
Example Proof by Contradiction
  • Prove The sum of an irrational number and a
    rational number is irrational.
  • Proof Let q be an irrational number and r be a
    rational number. Assume that their sum is
    rational, i.e., qrs where s is a rational
    number. Then q s-r. But by our previous proof
    the sum of two rational numbers must be rational,
    so we have an irrational number on the left equal
    to a rational number on the right. This is a
    contradiction. Therefore qr cant be rational
    and must be irrational.

39
Structure of Proof by Contradiction
  • Basic idea is to assume that the opposite of what
    you are trying to prove is true and show that it
    results in a violation of one of your initial
    assumptions.
  • In the previous proof we showed that assuming
    that the sum of a rational number and an
    irrational number is rational and showed that it
    resulted in the impossible conclusion that a
    number could be rational and irrational at the
    same time. (It can be put in a form that implies
    n ? ?n is true, which is a contradiction.)

40
Using Cases
Prove ?n ?Z, n3 n is even. Separate into cases
based on whether n is even or odd. Prove each
separately using direct proof. Proof We can
divide this problem into two cases. n can be even
or n can be odd. Case 1 n is even. Then ?k?Z ?
n 2k. n3n 8k3 2k 2(4k3k) which is even
since 4k3k must be an integer.
41
Cases (cont.)
  • Case 2 n is odd. Then ?k?Z ? n 2k1.
  • n3 n (8k3 12k2 6k 1) (2k 1) 2(4k3
    6k2 4k 1) which is even since 4k3 6k2
    4k 1 must be an integer.
  • Therefore ?n ?Z, n3 n is even

42
Proof?
  • Prove if n3 is even then n is even.
  • Proof Assume n3 is even.
  • Then ?k?Z ? n3 8k3 for some integer k. It
    follows that n 3?8k3 2k. Therefore n is
    even.
  • Statement is true but argument is false.
  • Argument assumes that n is even in making the
    claim n38k3, rather than n3 2k. This is
    circular reasoning.

43
Prove or Disprove
  • If m and n are even integers, then mn is
    divisible by 4.
  • The sum of two odd integers is odd.
  • The sum of two odd integers is even.
  • If n is a positive integer, then n is even iff
    3n28 is even.
  • n2 n 1 is a prime number whenever n is a
    positive integer.
  • n2 n 1 is a prime number whenever n is a
    prime number.
  • x y ? x y when x,y ? R.
  • ?3 is irrational.
Write a Comment
User Comments (0)
About PowerShow.com