lecture 7 – jan 28, 2002. chapter 2 the logic of quantified statements

27
Lecture 7 – Jan 28, 2002

Upload: marlene-price

Post on 18-Jan-2016

215 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Lecture 7 – Jan 28, 2002. Chapter 2 The Logic of Quantified Statements

Lecture 7 – Jan 28, 2002

Page 2: Lecture 7 – Jan 28, 2002. Chapter 2 The Logic of Quantified Statements

Chapter 2

The Logic of Quantified Statements

Page 3: Lecture 7 – Jan 28, 2002. Chapter 2 The Logic of Quantified Statements

Section 2.1

Predicates and Quantified Statements I

Page 4: Lecture 7 – Jan 28, 2002. Chapter 2 The Logic of Quantified Statements

Predicates A predicate is a sentence that

contains a finite number of variables, and becomes a statement when values are

substituted for the variables. “x flies like a y.”

Let x be “time” and y be “arrow.” Let x be “fruit” and y be “banana.”

Page 5: Lecture 7 – Jan 28, 2002. Chapter 2 The Logic of Quantified Statements

Domains of Predicate Variables The domain D of a predicate variable x is

the set of all values that x may take on. Let P(x) be the predicate. x is a free variable. The truth set of P(x) is the set of all values

of x D for which P(x) is true.

Page 6: Lecture 7 – Jan 28, 2002. Chapter 2 The Logic of Quantified Statements

The Universal Quantifier The symbol is the universal quantifier. The statement

x S, P(x)

means “for all x in S, P(x),” where S D. x is a bound variable, bound by the quantifier . The statement is true if P(x) is true for all x in S. The statement is false if P(x) is false for at least

one x in S.

Page 7: Lecture 7 – Jan 28, 2002. Chapter 2 The Logic of Quantified Statements

Examples Statement

“7 is a prime number” is true. Predicate

“x is a prime number” is neither true nor false. Statements

“x {2, 3, 5, 7}, x is a prime number” is true. “x {2, 3, 6, 7}, x is a prime number” is

false.

Page 8: Lecture 7 – Jan 28, 2002. Chapter 2 The Logic of Quantified Statements

Examples of Universal Statements x {1, …, 10}, x2 > 0. x {1, …, 10}, x2 > 100. x R, x3 – x 0. x R, y R, x2 + xy + y2 0. x , x2 > 100.

Page 9: Lecture 7 – Jan 28, 2002. Chapter 2 The Logic of Quantified Statements

The Existential Quantifier The symbol is the existential quantifier. The statement

x S, P(x)

means “there exists x in S such that P(x),” S D. x is a bound variable, bound by the quantifier . The statement is true if P(x) is true for at least one

x in S. The statement is false if P(x) is false for all x in S.

Page 10: Lecture 7 – Jan 28, 2002. Chapter 2 The Logic of Quantified Statements

Examples of Universal Statements x {1, …, 10}, x2 > 0. x {1, …, 10}, x2 > 100. x R, x3 – x 0. x R, y R, x2 + xy + y2 0. x , x2 > 100.

Page 11: Lecture 7 – Jan 28, 2002. Chapter 2 The Logic of Quantified Statements

Negations of Universal Statements The negation of

x S, P(x)

is the statement

x S, P(x). If “x R, x2 > 10” is false, then “x R,

x2 10” is true.

Page 12: Lecture 7 – Jan 28, 2002. Chapter 2 The Logic of Quantified Statements

Negations of Existential Statements The negation of

x S, P(x)

is the statement

x S, P(x). If “x R, x2 < 0” is false, then “x R,

x2 0” is true.

Page 13: Lecture 7 – Jan 28, 2002. Chapter 2 The Logic of Quantified Statements

Example: Negation of a Universal Statement p = “Everybody likes me.” Express p as

x {all people}, x likes me. p is the statement

x {all people}, x does not like me. p = “Somebody does not like me.”

Page 14: Lecture 7 – Jan 28, 2002. Chapter 2 The Logic of Quantified Statements

Example: Negation of an Existential Statement p = “Somebody likes me.” Express p as

x {all people}, x likes me. p is the statement

x {all people}, x does not like me. p = “Everyone does not like me.” p = “Nobody likes me.”

Page 15: Lecture 7 – Jan 28, 2002. Chapter 2 The Logic of Quantified Statements

Lecture 8 – Jan 29, 2002

Page 16: Lecture 7 – Jan 28, 2002. Chapter 2 The Logic of Quantified Statements

Section 2.2

Predicates and Quantified Statements II

Page 17: Lecture 7 – Jan 28, 2002. Chapter 2 The Logic of Quantified Statements

Multiply Quantified Statements Multiple universal statements

x S, y T, P(x, y) The order does not matter.

Multiple existential statements x S, y T, P(x, y) The order does not matter.

Page 18: Lecture 7 – Jan 28, 2002. Chapter 2 The Logic of Quantified Statements

Multiply Quantified Statements Mixed universal and existential statements

x S, y T, P(x, y) y T, x S, P(x, y) The order does matter. What is the difference?

Compare x R, y R, x + y = 0. y R, x R, x + y = 0.

Page 19: Lecture 7 – Jan 28, 2002. Chapter 2 The Logic of Quantified Statements

Negation of Multiply Quantified Statements Negate the statement

x R, y R, z R, x + y + z = 0. (x R, y R, z R, x + y + z = 0)

x R, (y R, z R, x + y + z = 0)

x R, y R, (z R, x + y + z = 0)

x R, y R, z R, (x + y + z = 0)

x R, y R, z R, x + y + z 0

Page 20: Lecture 7 – Jan 28, 2002. Chapter 2 The Logic of Quantified Statements

Negate the statement “Every integer can be written as the sum of three squares.” (n Z, r, s, t Z, n = r2 + s2 + t2). n Z, (r, s, t Z, n = r2 + s2 + t2). n Z, r, s, t Z, (n = r2 + s2 + t2). n Z, r, s, t Z, n r2 + s2 + t2.

Is the original statement true?

Page 21: Lecture 7 – Jan 28, 2002. Chapter 2 The Logic of Quantified Statements

Universal Conditional Statements A universal conditional statement is of the form

x S, P(x) Q(x). The converse is

x S, Q(x) P(x). The inverse is

x S, P(x) Q(x). The contrapositive is

x S, Q(x) P(x).

Page 22: Lecture 7 – Jan 28, 2002. Chapter 2 The Logic of Quantified Statements

Negation of Universal Conditional Statements Negate the statement

x R, x < 10 x2 < 100. (x R, x < 10 x2 < 100)

x R, (x < 10 x2 < 100)

x R, (x < 10) (x2 100). Which one is true?

Page 23: Lecture 7 – Jan 28, 2002. Chapter 2 The Logic of Quantified Statements

Putnam Question A-2 (1981) Two distinct squares of the 8 by 8 chessboard C

are said to be adjacent if they have a vertex or side in common.

Also, g is called a C-gap if for every numbering of the squares of C with all the integers 1, 2, …, 64, there exist two adjacent squares whose numbers differ by at least g.

Determine the largest C-gap g.

Page 24: Lecture 7 – Jan 28, 2002. Chapter 2 The Logic of Quantified Statements

Putnam Question A-2 (1981) Consider the standard numbering

1 2 3 4 5 6 7 8

9 10 11 12 13 14 15 16

17 18 19 20 21 22 23 24

25 26 27 28 29 30 31 32

33 34 35 36 37 38 39 40

41 42 43 44 45 46 47 48

49 50 51 52 53 54 55 56

57 58 59 60 61 62 63 64

Note that the largest difference is 9.

Page 25: Lecture 7 – Jan 28, 2002. Chapter 2 The Logic of Quantified Statements

Putnam Question A-2 (1981) Could the answer be 9? 9 is the largest C-gap if

9 is a C-gap, and 10 is not a C-gap.

Page 26: Lecture 7 – Jan 28, 2002. Chapter 2 The Logic of Quantified Statements

Putnam Question A-2 (1981) 10 is not a C-gap if

There exists a numbering of the squares such that no two adjacent squares differ by at least 10.

Equivalently, there exists a numbering of the squares such that every two adjacent squares differ by at most 9.

We have just seen that this is true. Therefore, 10 is not a C-gap.

Page 27: Lecture 7 – Jan 28, 2002. Chapter 2 The Logic of Quantified Statements

Putnam Question A-2 (1981) Is 9 a C-gap?

Consider the two squares that are labeled #1 and #64.

There is a path of at most 8 squares linking square #1 and square #64.

Of the 7 differences along this path, one must be at least 9, since the total difference is 63.

Therefore, 9 is a C-gap.