0% found this document useful (0 votes)
11 views

Chapter 1 Quantifier and Proof Part 4

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

Chapter 1 Quantifier and Proof Part 4

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 43

Chapter 1

Part 4
Quantifiers & Proof Technique

1
QUANTIFIERS

 Most of the statements in mathematics and


computer science are not described properly by
the propositions.
 Since most of the statements in mathematics and
computer science use variables, the system of logic
must be extended to include statements with the
variables.

2
QUANTIFIERS

 Let P(x) is a statement with variable x and A is a


set.
 P a propositional function or also known as
predicate if for each x in A, P(x) is a proposition.
 Set A is the domain of discourse of P.
 Domain of discourse -> the particular domain of
the variable in a propositional function.

3
QUANTIFIERS

 A predicate is a statement that contains variables.

Example:
P (x) : x > 3
Q (x,y) : x = y + 3
R (x,y,z) : x + y = z

4
Example

x2 + 4x is an odd integer
(domain of discourse is set of positive numbers).

x2 – x – 6 = 0
(domain of discourse is set of real numbers).

x is rated as Research University in Malaysia


(domain of discourse is set of university in Malaysia).

5
QUANTIFIERS
A predicate becomes a proposition if the variable(s) contained
is(are)
 Assigned specific value(s)
 Quantified

Example
• P(x) : x > 3.
What are the truth values of P(4) and P(2)?
• Q(x,y) : x = y + 3. (multiple variables)
What are the truth values of Q(1,2) and Q(3,0)?

6
Propositional functions

• Let P(x) : “x is a multiple of 5”


• For what values of x is P(x) true?

• Let P(x) : x+1 > x


• For what values of x is P(x) true?

• Let P(x) : x + 3 =0
• For what values of x is P(x) true?

7
QUANTIFIERS

• Two types of quantifiers:


 Universal
 Existential

8
QUANTIFIERS

 Let A be a propositional function with domain of


discourse B. The statement
for every x, A(x)
is universally quantified statement

 Symbol ∀ called a universal quantifier is used “for


every”.
 Can be read as “for all”, “for any”.

9
Universal quantifiers

Represented by an upside-down A: "


 It means “for all”

Example
Let P(x) = x+1 > x
We can state the following:
 "x P(x)
 English translation: “for all values of x, P(x) is true”
 English translation: “for all values of x, x+1>x is true”

10

10
QUANTIFIERS
 The statement can be written as
∀x A(x)
 Above statement is true if A(x) is true for every x in B
(false if A(x) is false for at least one x in B ).
 OR In order to prove that a universal quantification is true,
it must be shown for ALL cases
In order to prove that a universal quantification is false, it
must be shown to be false for only ONE case
 A value x in the domain of discourse that makes the statement A(x)
false is called a counterexample to the statement.

11
Example

 Let the universally quantified statement is


∀x (x2 ≥ 0)
Domain of discourse is the set of real numbers.

 This statement is true because for every real number


x, it is true that the square of x is positive or zero.

12
Example

 Let the universally quantified statement is


∀x (x2 ≤ 9)
Domain of discourse is a set B = {1, 2, 3, 4}

 When x = 4, the statement produce false value.


 Thus, the above statement is false and the
counterexample is 4.

13
QUANTIFIERS
 Easy to prove a universally quantified statement is true
or false if the domain of discourse is not too large.
 What happen if the domain of discourse contains a
large number of elements?
 For example, a set of integer from 1 to 100, the set of
positive integers, the set of real numbers or a set of
students in School of Computing. It will be hard to
show that every element in the set is true.

Use existential quantifier!!

14
QUANTIFIERS

 Let A be a propositional function with domain of


discourse B. The statement
There exist x, A(x)
is existentially quantified statement
 Symbol ∃ called an existential quantifier is used
“there exist”.
 Can be read as “for some”, “for at least one”.

15
QUANTIFIERS

 The statement can be written as


∃x A(x)
 Above statement is true if A(x) is true for at least one x
in B (false if every x in B makes the statement A(x)
false).

 Just find one x that makes A(x) true!

16
Example
 Let the existentially quantified statement is
∃x  x 2
 2 = 
 x 1 5
Domain of discourse is the set of real numbers.

 Statement is true because it is possible to find at least


one real number x to make the proposition true.
 For example, if x = 2, we obtain the true proposition as
below
 x 2  2 2
 2 = =
  2 = 
 x  1 5   2  1 5 

17
Negation of Quantifiers

 Distributing a negation operator across a


quantifier changes a universal to an existential and
vice versa.

¬ ("x P(x)) ; $x ¬ P(x)

¬ ($x P(x)) ; "x ¬ P(x)

18
Example

 Let P(x) : x is taking Discrete Structure course with


the domain of discourse is the set of all students.

∀x P(x)
All students are taking Discrete Structure course.

∃x P(x)
There is some students who are taking Discrete
Structure course.

19
Example

¬ ($x P(x)) ; "x ¬ P(x)

¬∃x P(x)
None of the students are taking Discrete Structure course.

∀x ¬ P(x)
All students are not taking Discrete Structure course.

20
Example

¬ ("x P(x)) ; $x ¬ P(x)

¬∀x P(x)
Not all students are taking Discrete Structure course.

∃x ¬P(x)
There is some students who are not taking Discrete Structure
course

21
Translating from English

 Consider “For every student in this class, that


student has studied calculus”
 Rephrased: “For every student x in this class, x has
studied calculus”
• Let C(x) be “x has studied calculus”
• Let S(x) be “x is a student in this class”

"x C(x)
• True if the universe of discourse is all students in
this class
22

22
Translating from English

 What about if the universe of discourse is all


students (or all people?)

• "x (S(x)C(x)) X
• This is wrong! Why? (because this statement says
that all people are students in this class and have
studied calculus)

• "x (S(x)→C(x)) √

C(x) : “x has studied calculus”


S(x) : “x is a student in this class”
23

23
Translating from English

 Consider:
• “Some students have visited Mexico”
• Rephrasing: “There exists a student who has visited
Mexico”

 Let:
• S(x) be “x is a student”
• M(x) be “x has visited Mexico”
$x M(x)
• True if the universe of discourse is all students

24

24
Translating from English

• What about if the universe of discourse is all people?

$x (S(x)  M(x))

$x (S(x) → M(x)) This is wrong! Why?

suppose someone is not student= F->T or F->F, both


make the statement true (refer to truth table p → q)

S(x) :“x is a student”


M(x): “x has visited Mexico”
25

25
Exercise
Let P(x, y) = (x * y)2 1. Given the domain of discourse for x and y is set of integer, Z.
Determine the truth value of the following statements. Give the value of x and y that make the
statement TRUE or FALSE.

a) $x$y P(x, y)

b) "x"y P(x, y)

26

26
Translating from English
 Consider “Every student in this class has visited Canada or
Mexico”
 Let, S(x) be “x is a student in this class”
M(x) be “x has visited Mexico”
C(x) be “x has visited Canada”

"x (M(x)C(x))
(When the universe of discourse is all students in this class)

"x (S(x)→(M(x)C(x))
(When the universe of discourse is all people or all students)

27

27
Proof Techniques
Mathematical systems consists:

 Axioms: assumed to be true.


 Definitions: used to create new concepts.
 Undefined terms: some terms that are not
explicitly defined.
 Theorem
• Statement that can be shown to be true (under certain
conditions)
• Typically stated in one of three ways:
• As Facts
• As Implications
• As Bi-implications

28
Proof Techniques
Direct Proof (Direct Method)
 Proof of those theorems that can be expressed in
the form ∀x (P(x) → Q(x)), D is the domain of
discourse.
 Select a particular, but arbitrarily chosen, member a
of the domain D.
 Show that the statement P(a) → Q(a) is true.
(Assume that P(a) is true).
 Show that Q(a) is true.
 By the rule of Universal Generalization (UG),
∀x (P(x) → Q(x)) is true.

29
Example
“For all integer x, if x is odd, then x2 is odd”
Or P(x) : x is an odd integer
Q(x) : x2 is an odd integer

"x( P ( x)  Q( x))
The domain of discourse is set Z of all integer.
Can verify the theorem for certain value of x.
x=3, x2 =9 ; odd
Or show that the square of an odd number is an odd number
Rephrased: “if n is odd, then n2 is odd”

30
Example
• a is an odd integer

 a = 2n  1 for some integer n

2 2
 a = (2 n  1)
2 2
 a = 4n  4n  1
2 2
 a = 2(2 n  2n)  1
2 where m= 2n2 + 2n is an integer
 a = 2m  1
2
 a is an odd integer

31
Proof Techniques
Indirect Proof
 The implication p → q is equivalent to the
implication (¬q → ¬p) (contrapositive)
 Therefore, in order to show that p → q is true,
one can also show that the implication (¬q →
¬p) is true.
 To show that (¬ q → ¬ p) is true, assume that
the negation of q is true and prove that the
negation of p is true.

32
Example
P(n) : n2+3 is an odd number
Q(n) : n is even number

" n ( P ( n )  Q ( n ))
P (n)  Q (n)   Q (n)   P (n)

¬ Q(n) is true , n is not even (n is odd), so n=2k+1


2 2
n  3 = (2 k  1)  3
2
= 4 k  4 k  1  3
2
= 4 k  4 k  4
2
= 2 (2 k  2 k  2 )

33
Example
2 2
n  3 = (2 k  1)  3
2
= 4 k  4 k  1  3
2
= 4 k  4 k  4
2
= 2 (2 k  2 k  2 )

t = 2k 2  2k  2
t is integer
2
n  3 = 2t
n2+3 is an even integer, thus ¬ P(n) is true

34
Which to use

 When do you use a direct proof versus an


indirect proof?

 If it’s not clear from the problem, try direct


first, then indirect second
 If indirect fails, try the other proofs

35

35
Example
Prove that “if n is an integer and n3+5 is odd, then
n is even”

Via direct proof


• n3+5 = 2k+1 for some integer k (definition of
odd numbers)
• n3 = 2k - 4
• n = 3 2k  4
• Umm…
So direct proof didn’t work out.
Next up: indirect proof
36

36
Example

Prove that “if n is an integer and n3+5 is odd, then n is even”

Via indirect proof


• Contrapositive: If n is odd, then n3+5 is even
• Assume n is odd, and show that n3+5 is even
• n=2k+1 for some integer k (definition of odd numbers)
• n3+5 = (2k+1)3+5 = 8k3+12k2+6k+6 = 2(4k3+6k2+3k+3)
• As 2(4k3+6k2+3k+3) is 2 times an integer, it is even

37

37
Proof Techniques

Proof by Contradiction

Assume that the hypothesis is true and that the


conclusion is false and then, arrive at a contradiction.

Proposition “if P then Q”


Proof. Suppose P and ~Q

Since we have a contradiction, it must be that Q is true

38
Example
Prove that “there are infinitely many prime numbers”.
Proof:
 Assume there are not infinitely many prime numbers,
therefore they are can be listed, i.e. p1,p2,…,pn
 Consider the number q = p1 x p2 x…x pn + 1.
 q is either prime or not divisible, but not listed above.
Therefore, q is a prime. However, it was not listed.
 Contradiction! Therefore, there are infinitely many
primes numbers.

39
Example

• For all real numbers x and y, if x+y 2, then either


x  1 or y  1.

Proof
• Suppose that the conclusion is false. Then
x < 1 and y <1
Add these inequalities, x+y < 1+1 = 2 (x+y <2)
• Contradiction
• Thus we conclude that the statement is true.

40
Example
Suppose a∈Z . If a2 is even, then a is even
Proof
• Contradiction: Suppose a2 is even and a is not even.
• Then a2 is even, and a is odd
• Let, a = 2c 1 (odd)
2
 
a 2 = 2c  1 = 4c 2  4c  1 = 2 2c 2  2c  1 (odd)

• Contradiction
• Thus we conclude that the statement is true.

41
Exercise

Prove that if 5n+6 is odd then n is odd using


an indirect proof

42
Thank You

43

You might also like