discrete mathematics structures slide 2

18
Discrete Mathematics Structures 6 1391

Upload: askari

Post on 28-Feb-2018

215 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Discrete Mathematics Structures Slide 2

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 118

Discrete Mathematics Structures

6 1391

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 218

983094983089983091983097983089

Predicate Logic - everybody loves somebody

Proposition YES or NO3 + 2 = 5

X + 2 = 5

X + 2 = 5 for any choice of X in 1 2 3X + 2 = 5 for some X in 1 2 3

YES

NO

YES

YES

- 983090

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 318

983094983089983091983097983089

Predicate Logic - everybody loves somebody

Alicia eats pizza at least once a weekGarrett eats pizza at least once a weekAllison eats pizza at least once a week

Gregg eats pizza at least once a weekRyan eats pizza at least once a weekMeera eats pizza at least once a week

Ariel eats pizza at least once a week

hellip - 983091

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 418

983094983089983091983097983089

Predicates

Alicia eats pizza at least once a week

DefineEP(x) = ldquox eats pizza at least once a weekrdquoUniverse of Discourse - x is a student in DM

A predicate or propositional function is a functionthat takes some variable(s) as arguments andreturns True or False

Note that EP(x) is not a proposition EP( Ariel ) is

hellip

- 983092

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 518

983094983089983091983097983089

Predicates

Suppose Q(xy) = ldquox gt y rdquo

Proposition YES or NO

Q(xy) Q( 34 ) Q(x9 )

NO

YES

NO

Predicate YES or NO

Q(xy)

Q( 34 )

Q(x9 )

YES

NO

YES

- 983093

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 618

983094983089983091983097983089

Predicates - the universal quantifier

Another way of changing a predicate into a proposition

Suppose P(x) is a predicate on some universe of discourseEx B(x) = ldquox is carrying a backpackrdquo x is set of DM students

The universal quantifier of P(x) is the proposition

ldquoP(x) is true for all x in the universe of discourserdquo

We write it forallx P(x) and say ldquofor all x P(x)rdquo

forallx P(x) is TRUE if P(x) is true for every single xforallx P(x) is FALSE if there is an x for which P(x) is false

forallx B(x)

- 983094

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 718

983094983089983091983097983089

Predicates - the universal quantifier

B(x) = ldquox is wearing sneakersrdquo

L(x) = ldquox is at least 21 years oldrdquoY(x)= ldquox is less than 24 years oldrdquo

Are either of these propositions true

a) forallx (Y(x) rarr B(x))b) forallx (Y(x) or L(x))

A only a is true

B only b is true

C both are true

D neither is true

Universe of discourse

is people in this room

- 983095

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 818

983094983089983091983097983089

Predicates - the existential quantifier

Another way of changing a predicate into a proposition

Suppose P(x) is a predicate on some universe of discourseEx C(x) = ldquox has a carrdquo x is set of DM students

The existential quantifier of P(x) is the proposition

ldquoP(x) is true for some x in the universe of discourserdquo

We write it existx P(x) and say ldquofor some x P(x)rdquo

existx P(x) is TRUE if there is an x for which P(x) is trueexistx P(x) is FALSE if P(x) is false for every single x

existx C(x)

- 983096

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 918

983094983089983091983097983089

Predicates - the existential quantifier

B(x) = ldquox is wearing sneakersrdquo

L(x) = ldquox is at least 21 years oldrdquoY(x)= ldquox is less than 24 years oldrdquo

Are either of these propositions true

a) existx B(x)b) existx (Y(x) and L(x))

A only a is true

B only b is true

C both are true

D neither is true

Universe of

discourse is peoplein this room

- 983097

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1018

983094983089983091983097983089

Predicates - more examples

Universe of discourse

is all creatures

L(x) = ldquox is a lionrdquo

F(x) = ldquox is fiercerdquoC(x) = ldquox drinks coffeerdquo

All lions are fierce

Some lions donrsquot drink coffee

Some fierce creatures donrsquot drink coffee

forallx (L(x) rarr F(x))

existx (L(x) and notC(x))

existx (F(x) and notC(x))

- 983089983088

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1118

983094983089983091983097983089

Predicates - more examples

Universe of discourseis all creatures

B(x) = ldquox is a hummingbirdrdquo

L(x) = ldquox is a large birdrdquoM(x) = ldquox lives on mountainrdquoR(x) = ldquox is richly coloredrdquo

All hummingbirds are richly colored

No large birds live on mountain

Birds that do not live on mountain are dully colored

forallx (B(x) rarr R(x))

notexistx (L(x) and M(x))

forallx (notM(x) rarr notR(x))

- 983089983089

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1218

983094983089983091983097983089

Predicates - quantifier negation

Not all large birds live on mountain

forallx P(x) means ldquoP(x) is true for every xrdquoWhat about notforallx P(x)

Not [ldquoP(x) is true for every xrdquo]

ldquoThere is an x for which P(x) is not truerdquoexistx notP(x)

Sonotforallnotforallnotforallnotforall

x P(x) is the same asexistexistexistexist

xnotnotnotnot

P(x)

notforallx (L(x) rarr M(x))

existx not(L(x) rarr M(x))

- 983089983090

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1318

983094983089983091983097983089

Predicates - quantifier negation

No large birds live on Mountain

existx P(x) means ldquoP(x) is true for some xrdquoWhat about notexistx P(x)

Not [ldquoP(x) is true for some xrdquo]

ldquoP(x) is not true for all xrdquoforallx notP(x)

Sonotexistnotexistnotexistnotexist

x P(x) is the same asforallforallforallforall

xnotnotnotnot

P(x)

notexistx (L(x) and M(x))

forallx not(L(x) and M(x))

- 983089983091

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1418

983094983089983091983097983089

Predicates - quantifier negation

So notforallx P(x) is the same as existx notP(x)So notexistx P(x) is the same as forallx notP(x)

General rule to negate a quantifier movenegation to the right changing quantifiers as

you go

- 983089983092

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1518

983094983089983091983097983089

Predicates - quantifier negation

No large birds live on Mountain

notexistx (L(x) and M(x)) equiv forallx not(L(x) and M(x)) Negationrule

equiv forall

x (not

L(x)or not

M(x)) DeMorganrsquosequiv forallx (L(x) rarr notM(x)) Subst for rarr

Whatrsquos wrong with thisproof

- 983089983093

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1618

983094983089983091983097983089

Predicates - free and bound variables

A variable is bound if it is known or quantified

Otherwise it is free

ExamplesP(x) x is freeP(5) x is bound to 5forallx P(x) x is bound by quantifier

Reminder in a

proposition allvariables must be

bound

- 983089983094

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1718

983094983089983091983097983089

Predicates - multiple quantifiers

To bind many variables use many quantifiers

Example P(xy) = ldquox gt yrdquoforallx P(xy)forallxforall y P(xy)forallxexist y P(xy)forallx P(x3)

a) True proposition

b) False proposition

c) Not a proposition

d) No clue

c)

b)

a)

b)

- 983089983095

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1818

Predicates - the meaning of multiple

quantifiers

forallxforall y P(xy)

existxexist y P(xy)

forallxexist y P(xy)

existxforall y P(xy)

983094983089983091983097983089

P(xy) true for all x y pairs

For every value of x we can find a (possibly different)

y so that P(xy) is true

P(xy) true for at least one x y pair

There is at least one x for which P(xy)

is always true

quantification order is notcommutative

Suppose P(xy) = ldquoxrsquos favorite class is yrdquo

- 983089983096

Page 2: Discrete Mathematics Structures Slide 2

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 218

983094983089983091983097983089

Predicate Logic - everybody loves somebody

Proposition YES or NO3 + 2 = 5

X + 2 = 5

X + 2 = 5 for any choice of X in 1 2 3X + 2 = 5 for some X in 1 2 3

YES

NO

YES

YES

- 983090

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 318

983094983089983091983097983089

Predicate Logic - everybody loves somebody

Alicia eats pizza at least once a weekGarrett eats pizza at least once a weekAllison eats pizza at least once a week

Gregg eats pizza at least once a weekRyan eats pizza at least once a weekMeera eats pizza at least once a week

Ariel eats pizza at least once a week

hellip - 983091

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 418

983094983089983091983097983089

Predicates

Alicia eats pizza at least once a week

DefineEP(x) = ldquox eats pizza at least once a weekrdquoUniverse of Discourse - x is a student in DM

A predicate or propositional function is a functionthat takes some variable(s) as arguments andreturns True or False

Note that EP(x) is not a proposition EP( Ariel ) is

hellip

- 983092

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 518

983094983089983091983097983089

Predicates

Suppose Q(xy) = ldquox gt y rdquo

Proposition YES or NO

Q(xy) Q( 34 ) Q(x9 )

NO

YES

NO

Predicate YES or NO

Q(xy)

Q( 34 )

Q(x9 )

YES

NO

YES

- 983093

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 618

983094983089983091983097983089

Predicates - the universal quantifier

Another way of changing a predicate into a proposition

Suppose P(x) is a predicate on some universe of discourseEx B(x) = ldquox is carrying a backpackrdquo x is set of DM students

The universal quantifier of P(x) is the proposition

ldquoP(x) is true for all x in the universe of discourserdquo

We write it forallx P(x) and say ldquofor all x P(x)rdquo

forallx P(x) is TRUE if P(x) is true for every single xforallx P(x) is FALSE if there is an x for which P(x) is false

forallx B(x)

- 983094

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 718

983094983089983091983097983089

Predicates - the universal quantifier

B(x) = ldquox is wearing sneakersrdquo

L(x) = ldquox is at least 21 years oldrdquoY(x)= ldquox is less than 24 years oldrdquo

Are either of these propositions true

a) forallx (Y(x) rarr B(x))b) forallx (Y(x) or L(x))

A only a is true

B only b is true

C both are true

D neither is true

Universe of discourse

is people in this room

- 983095

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 818

983094983089983091983097983089

Predicates - the existential quantifier

Another way of changing a predicate into a proposition

Suppose P(x) is a predicate on some universe of discourseEx C(x) = ldquox has a carrdquo x is set of DM students

The existential quantifier of P(x) is the proposition

ldquoP(x) is true for some x in the universe of discourserdquo

We write it existx P(x) and say ldquofor some x P(x)rdquo

existx P(x) is TRUE if there is an x for which P(x) is trueexistx P(x) is FALSE if P(x) is false for every single x

existx C(x)

- 983096

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 918

983094983089983091983097983089

Predicates - the existential quantifier

B(x) = ldquox is wearing sneakersrdquo

L(x) = ldquox is at least 21 years oldrdquoY(x)= ldquox is less than 24 years oldrdquo

Are either of these propositions true

a) existx B(x)b) existx (Y(x) and L(x))

A only a is true

B only b is true

C both are true

D neither is true

Universe of

discourse is peoplein this room

- 983097

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1018

983094983089983091983097983089

Predicates - more examples

Universe of discourse

is all creatures

L(x) = ldquox is a lionrdquo

F(x) = ldquox is fiercerdquoC(x) = ldquox drinks coffeerdquo

All lions are fierce

Some lions donrsquot drink coffee

Some fierce creatures donrsquot drink coffee

forallx (L(x) rarr F(x))

existx (L(x) and notC(x))

existx (F(x) and notC(x))

- 983089983088

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1118

983094983089983091983097983089

Predicates - more examples

Universe of discourseis all creatures

B(x) = ldquox is a hummingbirdrdquo

L(x) = ldquox is a large birdrdquoM(x) = ldquox lives on mountainrdquoR(x) = ldquox is richly coloredrdquo

All hummingbirds are richly colored

No large birds live on mountain

Birds that do not live on mountain are dully colored

forallx (B(x) rarr R(x))

notexistx (L(x) and M(x))

forallx (notM(x) rarr notR(x))

- 983089983089

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1218

983094983089983091983097983089

Predicates - quantifier negation

Not all large birds live on mountain

forallx P(x) means ldquoP(x) is true for every xrdquoWhat about notforallx P(x)

Not [ldquoP(x) is true for every xrdquo]

ldquoThere is an x for which P(x) is not truerdquoexistx notP(x)

Sonotforallnotforallnotforallnotforall

x P(x) is the same asexistexistexistexist

xnotnotnotnot

P(x)

notforallx (L(x) rarr M(x))

existx not(L(x) rarr M(x))

- 983089983090

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1318

983094983089983091983097983089

Predicates - quantifier negation

No large birds live on Mountain

existx P(x) means ldquoP(x) is true for some xrdquoWhat about notexistx P(x)

Not [ldquoP(x) is true for some xrdquo]

ldquoP(x) is not true for all xrdquoforallx notP(x)

Sonotexistnotexistnotexistnotexist

x P(x) is the same asforallforallforallforall

xnotnotnotnot

P(x)

notexistx (L(x) and M(x))

forallx not(L(x) and M(x))

- 983089983091

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1418

983094983089983091983097983089

Predicates - quantifier negation

So notforallx P(x) is the same as existx notP(x)So notexistx P(x) is the same as forallx notP(x)

General rule to negate a quantifier movenegation to the right changing quantifiers as

you go

- 983089983092

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1518

983094983089983091983097983089

Predicates - quantifier negation

No large birds live on Mountain

notexistx (L(x) and M(x)) equiv forallx not(L(x) and M(x)) Negationrule

equiv forall

x (not

L(x)or not

M(x)) DeMorganrsquosequiv forallx (L(x) rarr notM(x)) Subst for rarr

Whatrsquos wrong with thisproof

- 983089983093

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1618

983094983089983091983097983089

Predicates - free and bound variables

A variable is bound if it is known or quantified

Otherwise it is free

ExamplesP(x) x is freeP(5) x is bound to 5forallx P(x) x is bound by quantifier

Reminder in a

proposition allvariables must be

bound

- 983089983094

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1718

983094983089983091983097983089

Predicates - multiple quantifiers

To bind many variables use many quantifiers

Example P(xy) = ldquox gt yrdquoforallx P(xy)forallxforall y P(xy)forallxexist y P(xy)forallx P(x3)

a) True proposition

b) False proposition

c) Not a proposition

d) No clue

c)

b)

a)

b)

- 983089983095

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1818

Predicates - the meaning of multiple

quantifiers

forallxforall y P(xy)

existxexist y P(xy)

forallxexist y P(xy)

existxforall y P(xy)

983094983089983091983097983089

P(xy) true for all x y pairs

For every value of x we can find a (possibly different)

y so that P(xy) is true

P(xy) true for at least one x y pair

There is at least one x for which P(xy)

is always true

quantification order is notcommutative

Suppose P(xy) = ldquoxrsquos favorite class is yrdquo

- 983089983096

Page 3: Discrete Mathematics Structures Slide 2

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 318

983094983089983091983097983089

Predicate Logic - everybody loves somebody

Alicia eats pizza at least once a weekGarrett eats pizza at least once a weekAllison eats pizza at least once a week

Gregg eats pizza at least once a weekRyan eats pizza at least once a weekMeera eats pizza at least once a week

Ariel eats pizza at least once a week

hellip - 983091

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 418

983094983089983091983097983089

Predicates

Alicia eats pizza at least once a week

DefineEP(x) = ldquox eats pizza at least once a weekrdquoUniverse of Discourse - x is a student in DM

A predicate or propositional function is a functionthat takes some variable(s) as arguments andreturns True or False

Note that EP(x) is not a proposition EP( Ariel ) is

hellip

- 983092

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 518

983094983089983091983097983089

Predicates

Suppose Q(xy) = ldquox gt y rdquo

Proposition YES or NO

Q(xy) Q( 34 ) Q(x9 )

NO

YES

NO

Predicate YES or NO

Q(xy)

Q( 34 )

Q(x9 )

YES

NO

YES

- 983093

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 618

983094983089983091983097983089

Predicates - the universal quantifier

Another way of changing a predicate into a proposition

Suppose P(x) is a predicate on some universe of discourseEx B(x) = ldquox is carrying a backpackrdquo x is set of DM students

The universal quantifier of P(x) is the proposition

ldquoP(x) is true for all x in the universe of discourserdquo

We write it forallx P(x) and say ldquofor all x P(x)rdquo

forallx P(x) is TRUE if P(x) is true for every single xforallx P(x) is FALSE if there is an x for which P(x) is false

forallx B(x)

- 983094

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 718

983094983089983091983097983089

Predicates - the universal quantifier

B(x) = ldquox is wearing sneakersrdquo

L(x) = ldquox is at least 21 years oldrdquoY(x)= ldquox is less than 24 years oldrdquo

Are either of these propositions true

a) forallx (Y(x) rarr B(x))b) forallx (Y(x) or L(x))

A only a is true

B only b is true

C both are true

D neither is true

Universe of discourse

is people in this room

- 983095

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 818

983094983089983091983097983089

Predicates - the existential quantifier

Another way of changing a predicate into a proposition

Suppose P(x) is a predicate on some universe of discourseEx C(x) = ldquox has a carrdquo x is set of DM students

The existential quantifier of P(x) is the proposition

ldquoP(x) is true for some x in the universe of discourserdquo

We write it existx P(x) and say ldquofor some x P(x)rdquo

existx P(x) is TRUE if there is an x for which P(x) is trueexistx P(x) is FALSE if P(x) is false for every single x

existx C(x)

- 983096

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 918

983094983089983091983097983089

Predicates - the existential quantifier

B(x) = ldquox is wearing sneakersrdquo

L(x) = ldquox is at least 21 years oldrdquoY(x)= ldquox is less than 24 years oldrdquo

Are either of these propositions true

a) existx B(x)b) existx (Y(x) and L(x))

A only a is true

B only b is true

C both are true

D neither is true

Universe of

discourse is peoplein this room

- 983097

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1018

983094983089983091983097983089

Predicates - more examples

Universe of discourse

is all creatures

L(x) = ldquox is a lionrdquo

F(x) = ldquox is fiercerdquoC(x) = ldquox drinks coffeerdquo

All lions are fierce

Some lions donrsquot drink coffee

Some fierce creatures donrsquot drink coffee

forallx (L(x) rarr F(x))

existx (L(x) and notC(x))

existx (F(x) and notC(x))

- 983089983088

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1118

983094983089983091983097983089

Predicates - more examples

Universe of discourseis all creatures

B(x) = ldquox is a hummingbirdrdquo

L(x) = ldquox is a large birdrdquoM(x) = ldquox lives on mountainrdquoR(x) = ldquox is richly coloredrdquo

All hummingbirds are richly colored

No large birds live on mountain

Birds that do not live on mountain are dully colored

forallx (B(x) rarr R(x))

notexistx (L(x) and M(x))

forallx (notM(x) rarr notR(x))

- 983089983089

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1218

983094983089983091983097983089

Predicates - quantifier negation

Not all large birds live on mountain

forallx P(x) means ldquoP(x) is true for every xrdquoWhat about notforallx P(x)

Not [ldquoP(x) is true for every xrdquo]

ldquoThere is an x for which P(x) is not truerdquoexistx notP(x)

Sonotforallnotforallnotforallnotforall

x P(x) is the same asexistexistexistexist

xnotnotnotnot

P(x)

notforallx (L(x) rarr M(x))

existx not(L(x) rarr M(x))

- 983089983090

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1318

983094983089983091983097983089

Predicates - quantifier negation

No large birds live on Mountain

existx P(x) means ldquoP(x) is true for some xrdquoWhat about notexistx P(x)

Not [ldquoP(x) is true for some xrdquo]

ldquoP(x) is not true for all xrdquoforallx notP(x)

Sonotexistnotexistnotexistnotexist

x P(x) is the same asforallforallforallforall

xnotnotnotnot

P(x)

notexistx (L(x) and M(x))

forallx not(L(x) and M(x))

- 983089983091

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1418

983094983089983091983097983089

Predicates - quantifier negation

So notforallx P(x) is the same as existx notP(x)So notexistx P(x) is the same as forallx notP(x)

General rule to negate a quantifier movenegation to the right changing quantifiers as

you go

- 983089983092

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1518

983094983089983091983097983089

Predicates - quantifier negation

No large birds live on Mountain

notexistx (L(x) and M(x)) equiv forallx not(L(x) and M(x)) Negationrule

equiv forall

x (not

L(x)or not

M(x)) DeMorganrsquosequiv forallx (L(x) rarr notM(x)) Subst for rarr

Whatrsquos wrong with thisproof

- 983089983093

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1618

983094983089983091983097983089

Predicates - free and bound variables

A variable is bound if it is known or quantified

Otherwise it is free

ExamplesP(x) x is freeP(5) x is bound to 5forallx P(x) x is bound by quantifier

Reminder in a

proposition allvariables must be

bound

- 983089983094

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1718

983094983089983091983097983089

Predicates - multiple quantifiers

To bind many variables use many quantifiers

Example P(xy) = ldquox gt yrdquoforallx P(xy)forallxforall y P(xy)forallxexist y P(xy)forallx P(x3)

a) True proposition

b) False proposition

c) Not a proposition

d) No clue

c)

b)

a)

b)

- 983089983095

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1818

Predicates - the meaning of multiple

quantifiers

forallxforall y P(xy)

existxexist y P(xy)

forallxexist y P(xy)

existxforall y P(xy)

983094983089983091983097983089

P(xy) true for all x y pairs

For every value of x we can find a (possibly different)

y so that P(xy) is true

P(xy) true for at least one x y pair

There is at least one x for which P(xy)

is always true

quantification order is notcommutative

Suppose P(xy) = ldquoxrsquos favorite class is yrdquo

- 983089983096

Page 4: Discrete Mathematics Structures Slide 2

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 418

983094983089983091983097983089

Predicates

Alicia eats pizza at least once a week

DefineEP(x) = ldquox eats pizza at least once a weekrdquoUniverse of Discourse - x is a student in DM

A predicate or propositional function is a functionthat takes some variable(s) as arguments andreturns True or False

Note that EP(x) is not a proposition EP( Ariel ) is

hellip

- 983092

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 518

983094983089983091983097983089

Predicates

Suppose Q(xy) = ldquox gt y rdquo

Proposition YES or NO

Q(xy) Q( 34 ) Q(x9 )

NO

YES

NO

Predicate YES or NO

Q(xy)

Q( 34 )

Q(x9 )

YES

NO

YES

- 983093

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 618

983094983089983091983097983089

Predicates - the universal quantifier

Another way of changing a predicate into a proposition

Suppose P(x) is a predicate on some universe of discourseEx B(x) = ldquox is carrying a backpackrdquo x is set of DM students

The universal quantifier of P(x) is the proposition

ldquoP(x) is true for all x in the universe of discourserdquo

We write it forallx P(x) and say ldquofor all x P(x)rdquo

forallx P(x) is TRUE if P(x) is true for every single xforallx P(x) is FALSE if there is an x for which P(x) is false

forallx B(x)

- 983094

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 718

983094983089983091983097983089

Predicates - the universal quantifier

B(x) = ldquox is wearing sneakersrdquo

L(x) = ldquox is at least 21 years oldrdquoY(x)= ldquox is less than 24 years oldrdquo

Are either of these propositions true

a) forallx (Y(x) rarr B(x))b) forallx (Y(x) or L(x))

A only a is true

B only b is true

C both are true

D neither is true

Universe of discourse

is people in this room

- 983095

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 818

983094983089983091983097983089

Predicates - the existential quantifier

Another way of changing a predicate into a proposition

Suppose P(x) is a predicate on some universe of discourseEx C(x) = ldquox has a carrdquo x is set of DM students

The existential quantifier of P(x) is the proposition

ldquoP(x) is true for some x in the universe of discourserdquo

We write it existx P(x) and say ldquofor some x P(x)rdquo

existx P(x) is TRUE if there is an x for which P(x) is trueexistx P(x) is FALSE if P(x) is false for every single x

existx C(x)

- 983096

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 918

983094983089983091983097983089

Predicates - the existential quantifier

B(x) = ldquox is wearing sneakersrdquo

L(x) = ldquox is at least 21 years oldrdquoY(x)= ldquox is less than 24 years oldrdquo

Are either of these propositions true

a) existx B(x)b) existx (Y(x) and L(x))

A only a is true

B only b is true

C both are true

D neither is true

Universe of

discourse is peoplein this room

- 983097

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1018

983094983089983091983097983089

Predicates - more examples

Universe of discourse

is all creatures

L(x) = ldquox is a lionrdquo

F(x) = ldquox is fiercerdquoC(x) = ldquox drinks coffeerdquo

All lions are fierce

Some lions donrsquot drink coffee

Some fierce creatures donrsquot drink coffee

forallx (L(x) rarr F(x))

existx (L(x) and notC(x))

existx (F(x) and notC(x))

- 983089983088

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1118

983094983089983091983097983089

Predicates - more examples

Universe of discourseis all creatures

B(x) = ldquox is a hummingbirdrdquo

L(x) = ldquox is a large birdrdquoM(x) = ldquox lives on mountainrdquoR(x) = ldquox is richly coloredrdquo

All hummingbirds are richly colored

No large birds live on mountain

Birds that do not live on mountain are dully colored

forallx (B(x) rarr R(x))

notexistx (L(x) and M(x))

forallx (notM(x) rarr notR(x))

- 983089983089

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1218

983094983089983091983097983089

Predicates - quantifier negation

Not all large birds live on mountain

forallx P(x) means ldquoP(x) is true for every xrdquoWhat about notforallx P(x)

Not [ldquoP(x) is true for every xrdquo]

ldquoThere is an x for which P(x) is not truerdquoexistx notP(x)

Sonotforallnotforallnotforallnotforall

x P(x) is the same asexistexistexistexist

xnotnotnotnot

P(x)

notforallx (L(x) rarr M(x))

existx not(L(x) rarr M(x))

- 983089983090

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1318

983094983089983091983097983089

Predicates - quantifier negation

No large birds live on Mountain

existx P(x) means ldquoP(x) is true for some xrdquoWhat about notexistx P(x)

Not [ldquoP(x) is true for some xrdquo]

ldquoP(x) is not true for all xrdquoforallx notP(x)

Sonotexistnotexistnotexistnotexist

x P(x) is the same asforallforallforallforall

xnotnotnotnot

P(x)

notexistx (L(x) and M(x))

forallx not(L(x) and M(x))

- 983089983091

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1418

983094983089983091983097983089

Predicates - quantifier negation

So notforallx P(x) is the same as existx notP(x)So notexistx P(x) is the same as forallx notP(x)

General rule to negate a quantifier movenegation to the right changing quantifiers as

you go

- 983089983092

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1518

983094983089983091983097983089

Predicates - quantifier negation

No large birds live on Mountain

notexistx (L(x) and M(x)) equiv forallx not(L(x) and M(x)) Negationrule

equiv forall

x (not

L(x)or not

M(x)) DeMorganrsquosequiv forallx (L(x) rarr notM(x)) Subst for rarr

Whatrsquos wrong with thisproof

- 983089983093

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1618

983094983089983091983097983089

Predicates - free and bound variables

A variable is bound if it is known or quantified

Otherwise it is free

ExamplesP(x) x is freeP(5) x is bound to 5forallx P(x) x is bound by quantifier

Reminder in a

proposition allvariables must be

bound

- 983089983094

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1718

983094983089983091983097983089

Predicates - multiple quantifiers

To bind many variables use many quantifiers

Example P(xy) = ldquox gt yrdquoforallx P(xy)forallxforall y P(xy)forallxexist y P(xy)forallx P(x3)

a) True proposition

b) False proposition

c) Not a proposition

d) No clue

c)

b)

a)

b)

- 983089983095

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1818

Predicates - the meaning of multiple

quantifiers

forallxforall y P(xy)

existxexist y P(xy)

forallxexist y P(xy)

existxforall y P(xy)

983094983089983091983097983089

P(xy) true for all x y pairs

For every value of x we can find a (possibly different)

y so that P(xy) is true

P(xy) true for at least one x y pair

There is at least one x for which P(xy)

is always true

quantification order is notcommutative

Suppose P(xy) = ldquoxrsquos favorite class is yrdquo

- 983089983096

Page 5: Discrete Mathematics Structures Slide 2

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 518

983094983089983091983097983089

Predicates

Suppose Q(xy) = ldquox gt y rdquo

Proposition YES or NO

Q(xy) Q( 34 ) Q(x9 )

NO

YES

NO

Predicate YES or NO

Q(xy)

Q( 34 )

Q(x9 )

YES

NO

YES

- 983093

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 618

983094983089983091983097983089

Predicates - the universal quantifier

Another way of changing a predicate into a proposition

Suppose P(x) is a predicate on some universe of discourseEx B(x) = ldquox is carrying a backpackrdquo x is set of DM students

The universal quantifier of P(x) is the proposition

ldquoP(x) is true for all x in the universe of discourserdquo

We write it forallx P(x) and say ldquofor all x P(x)rdquo

forallx P(x) is TRUE if P(x) is true for every single xforallx P(x) is FALSE if there is an x for which P(x) is false

forallx B(x)

- 983094

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 718

983094983089983091983097983089

Predicates - the universal quantifier

B(x) = ldquox is wearing sneakersrdquo

L(x) = ldquox is at least 21 years oldrdquoY(x)= ldquox is less than 24 years oldrdquo

Are either of these propositions true

a) forallx (Y(x) rarr B(x))b) forallx (Y(x) or L(x))

A only a is true

B only b is true

C both are true

D neither is true

Universe of discourse

is people in this room

- 983095

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 818

983094983089983091983097983089

Predicates - the existential quantifier

Another way of changing a predicate into a proposition

Suppose P(x) is a predicate on some universe of discourseEx C(x) = ldquox has a carrdquo x is set of DM students

The existential quantifier of P(x) is the proposition

ldquoP(x) is true for some x in the universe of discourserdquo

We write it existx P(x) and say ldquofor some x P(x)rdquo

existx P(x) is TRUE if there is an x for which P(x) is trueexistx P(x) is FALSE if P(x) is false for every single x

existx C(x)

- 983096

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 918

983094983089983091983097983089

Predicates - the existential quantifier

B(x) = ldquox is wearing sneakersrdquo

L(x) = ldquox is at least 21 years oldrdquoY(x)= ldquox is less than 24 years oldrdquo

Are either of these propositions true

a) existx B(x)b) existx (Y(x) and L(x))

A only a is true

B only b is true

C both are true

D neither is true

Universe of

discourse is peoplein this room

- 983097

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1018

983094983089983091983097983089

Predicates - more examples

Universe of discourse

is all creatures

L(x) = ldquox is a lionrdquo

F(x) = ldquox is fiercerdquoC(x) = ldquox drinks coffeerdquo

All lions are fierce

Some lions donrsquot drink coffee

Some fierce creatures donrsquot drink coffee

forallx (L(x) rarr F(x))

existx (L(x) and notC(x))

existx (F(x) and notC(x))

- 983089983088

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1118

983094983089983091983097983089

Predicates - more examples

Universe of discourseis all creatures

B(x) = ldquox is a hummingbirdrdquo

L(x) = ldquox is a large birdrdquoM(x) = ldquox lives on mountainrdquoR(x) = ldquox is richly coloredrdquo

All hummingbirds are richly colored

No large birds live on mountain

Birds that do not live on mountain are dully colored

forallx (B(x) rarr R(x))

notexistx (L(x) and M(x))

forallx (notM(x) rarr notR(x))

- 983089983089

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1218

983094983089983091983097983089

Predicates - quantifier negation

Not all large birds live on mountain

forallx P(x) means ldquoP(x) is true for every xrdquoWhat about notforallx P(x)

Not [ldquoP(x) is true for every xrdquo]

ldquoThere is an x for which P(x) is not truerdquoexistx notP(x)

Sonotforallnotforallnotforallnotforall

x P(x) is the same asexistexistexistexist

xnotnotnotnot

P(x)

notforallx (L(x) rarr M(x))

existx not(L(x) rarr M(x))

- 983089983090

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1318

983094983089983091983097983089

Predicates - quantifier negation

No large birds live on Mountain

existx P(x) means ldquoP(x) is true for some xrdquoWhat about notexistx P(x)

Not [ldquoP(x) is true for some xrdquo]

ldquoP(x) is not true for all xrdquoforallx notP(x)

Sonotexistnotexistnotexistnotexist

x P(x) is the same asforallforallforallforall

xnotnotnotnot

P(x)

notexistx (L(x) and M(x))

forallx not(L(x) and M(x))

- 983089983091

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1418

983094983089983091983097983089

Predicates - quantifier negation

So notforallx P(x) is the same as existx notP(x)So notexistx P(x) is the same as forallx notP(x)

General rule to negate a quantifier movenegation to the right changing quantifiers as

you go

- 983089983092

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1518

983094983089983091983097983089

Predicates - quantifier negation

No large birds live on Mountain

notexistx (L(x) and M(x)) equiv forallx not(L(x) and M(x)) Negationrule

equiv forall

x (not

L(x)or not

M(x)) DeMorganrsquosequiv forallx (L(x) rarr notM(x)) Subst for rarr

Whatrsquos wrong with thisproof

- 983089983093

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1618

983094983089983091983097983089

Predicates - free and bound variables

A variable is bound if it is known or quantified

Otherwise it is free

ExamplesP(x) x is freeP(5) x is bound to 5forallx P(x) x is bound by quantifier

Reminder in a

proposition allvariables must be

bound

- 983089983094

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1718

983094983089983091983097983089

Predicates - multiple quantifiers

To bind many variables use many quantifiers

Example P(xy) = ldquox gt yrdquoforallx P(xy)forallxforall y P(xy)forallxexist y P(xy)forallx P(x3)

a) True proposition

b) False proposition

c) Not a proposition

d) No clue

c)

b)

a)

b)

- 983089983095

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1818

Predicates - the meaning of multiple

quantifiers

forallxforall y P(xy)

existxexist y P(xy)

forallxexist y P(xy)

existxforall y P(xy)

983094983089983091983097983089

P(xy) true for all x y pairs

For every value of x we can find a (possibly different)

y so that P(xy) is true

P(xy) true for at least one x y pair

There is at least one x for which P(xy)

is always true

quantification order is notcommutative

Suppose P(xy) = ldquoxrsquos favorite class is yrdquo

- 983089983096

Page 6: Discrete Mathematics Structures Slide 2

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 618

983094983089983091983097983089

Predicates - the universal quantifier

Another way of changing a predicate into a proposition

Suppose P(x) is a predicate on some universe of discourseEx B(x) = ldquox is carrying a backpackrdquo x is set of DM students

The universal quantifier of P(x) is the proposition

ldquoP(x) is true for all x in the universe of discourserdquo

We write it forallx P(x) and say ldquofor all x P(x)rdquo

forallx P(x) is TRUE if P(x) is true for every single xforallx P(x) is FALSE if there is an x for which P(x) is false

forallx B(x)

- 983094

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 718

983094983089983091983097983089

Predicates - the universal quantifier

B(x) = ldquox is wearing sneakersrdquo

L(x) = ldquox is at least 21 years oldrdquoY(x)= ldquox is less than 24 years oldrdquo

Are either of these propositions true

a) forallx (Y(x) rarr B(x))b) forallx (Y(x) or L(x))

A only a is true

B only b is true

C both are true

D neither is true

Universe of discourse

is people in this room

- 983095

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 818

983094983089983091983097983089

Predicates - the existential quantifier

Another way of changing a predicate into a proposition

Suppose P(x) is a predicate on some universe of discourseEx C(x) = ldquox has a carrdquo x is set of DM students

The existential quantifier of P(x) is the proposition

ldquoP(x) is true for some x in the universe of discourserdquo

We write it existx P(x) and say ldquofor some x P(x)rdquo

existx P(x) is TRUE if there is an x for which P(x) is trueexistx P(x) is FALSE if P(x) is false for every single x

existx C(x)

- 983096

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 918

983094983089983091983097983089

Predicates - the existential quantifier

B(x) = ldquox is wearing sneakersrdquo

L(x) = ldquox is at least 21 years oldrdquoY(x)= ldquox is less than 24 years oldrdquo

Are either of these propositions true

a) existx B(x)b) existx (Y(x) and L(x))

A only a is true

B only b is true

C both are true

D neither is true

Universe of

discourse is peoplein this room

- 983097

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1018

983094983089983091983097983089

Predicates - more examples

Universe of discourse

is all creatures

L(x) = ldquox is a lionrdquo

F(x) = ldquox is fiercerdquoC(x) = ldquox drinks coffeerdquo

All lions are fierce

Some lions donrsquot drink coffee

Some fierce creatures donrsquot drink coffee

forallx (L(x) rarr F(x))

existx (L(x) and notC(x))

existx (F(x) and notC(x))

- 983089983088

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1118

983094983089983091983097983089

Predicates - more examples

Universe of discourseis all creatures

B(x) = ldquox is a hummingbirdrdquo

L(x) = ldquox is a large birdrdquoM(x) = ldquox lives on mountainrdquoR(x) = ldquox is richly coloredrdquo

All hummingbirds are richly colored

No large birds live on mountain

Birds that do not live on mountain are dully colored

forallx (B(x) rarr R(x))

notexistx (L(x) and M(x))

forallx (notM(x) rarr notR(x))

- 983089983089

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1218

983094983089983091983097983089

Predicates - quantifier negation

Not all large birds live on mountain

forallx P(x) means ldquoP(x) is true for every xrdquoWhat about notforallx P(x)

Not [ldquoP(x) is true for every xrdquo]

ldquoThere is an x for which P(x) is not truerdquoexistx notP(x)

Sonotforallnotforallnotforallnotforall

x P(x) is the same asexistexistexistexist

xnotnotnotnot

P(x)

notforallx (L(x) rarr M(x))

existx not(L(x) rarr M(x))

- 983089983090

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1318

983094983089983091983097983089

Predicates - quantifier negation

No large birds live on Mountain

existx P(x) means ldquoP(x) is true for some xrdquoWhat about notexistx P(x)

Not [ldquoP(x) is true for some xrdquo]

ldquoP(x) is not true for all xrdquoforallx notP(x)

Sonotexistnotexistnotexistnotexist

x P(x) is the same asforallforallforallforall

xnotnotnotnot

P(x)

notexistx (L(x) and M(x))

forallx not(L(x) and M(x))

- 983089983091

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1418

983094983089983091983097983089

Predicates - quantifier negation

So notforallx P(x) is the same as existx notP(x)So notexistx P(x) is the same as forallx notP(x)

General rule to negate a quantifier movenegation to the right changing quantifiers as

you go

- 983089983092

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1518

983094983089983091983097983089

Predicates - quantifier negation

No large birds live on Mountain

notexistx (L(x) and M(x)) equiv forallx not(L(x) and M(x)) Negationrule

equiv forall

x (not

L(x)or not

M(x)) DeMorganrsquosequiv forallx (L(x) rarr notM(x)) Subst for rarr

Whatrsquos wrong with thisproof

- 983089983093

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1618

983094983089983091983097983089

Predicates - free and bound variables

A variable is bound if it is known or quantified

Otherwise it is free

ExamplesP(x) x is freeP(5) x is bound to 5forallx P(x) x is bound by quantifier

Reminder in a

proposition allvariables must be

bound

- 983089983094

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1718

983094983089983091983097983089

Predicates - multiple quantifiers

To bind many variables use many quantifiers

Example P(xy) = ldquox gt yrdquoforallx P(xy)forallxforall y P(xy)forallxexist y P(xy)forallx P(x3)

a) True proposition

b) False proposition

c) Not a proposition

d) No clue

c)

b)

a)

b)

- 983089983095

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1818

Predicates - the meaning of multiple

quantifiers

forallxforall y P(xy)

existxexist y P(xy)

forallxexist y P(xy)

existxforall y P(xy)

983094983089983091983097983089

P(xy) true for all x y pairs

For every value of x we can find a (possibly different)

y so that P(xy) is true

P(xy) true for at least one x y pair

There is at least one x for which P(xy)

is always true

quantification order is notcommutative

Suppose P(xy) = ldquoxrsquos favorite class is yrdquo

- 983089983096

Page 7: Discrete Mathematics Structures Slide 2

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 718

983094983089983091983097983089

Predicates - the universal quantifier

B(x) = ldquox is wearing sneakersrdquo

L(x) = ldquox is at least 21 years oldrdquoY(x)= ldquox is less than 24 years oldrdquo

Are either of these propositions true

a) forallx (Y(x) rarr B(x))b) forallx (Y(x) or L(x))

A only a is true

B only b is true

C both are true

D neither is true

Universe of discourse

is people in this room

- 983095

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 818

983094983089983091983097983089

Predicates - the existential quantifier

Another way of changing a predicate into a proposition

Suppose P(x) is a predicate on some universe of discourseEx C(x) = ldquox has a carrdquo x is set of DM students

The existential quantifier of P(x) is the proposition

ldquoP(x) is true for some x in the universe of discourserdquo

We write it existx P(x) and say ldquofor some x P(x)rdquo

existx P(x) is TRUE if there is an x for which P(x) is trueexistx P(x) is FALSE if P(x) is false for every single x

existx C(x)

- 983096

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 918

983094983089983091983097983089

Predicates - the existential quantifier

B(x) = ldquox is wearing sneakersrdquo

L(x) = ldquox is at least 21 years oldrdquoY(x)= ldquox is less than 24 years oldrdquo

Are either of these propositions true

a) existx B(x)b) existx (Y(x) and L(x))

A only a is true

B only b is true

C both are true

D neither is true

Universe of

discourse is peoplein this room

- 983097

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1018

983094983089983091983097983089

Predicates - more examples

Universe of discourse

is all creatures

L(x) = ldquox is a lionrdquo

F(x) = ldquox is fiercerdquoC(x) = ldquox drinks coffeerdquo

All lions are fierce

Some lions donrsquot drink coffee

Some fierce creatures donrsquot drink coffee

forallx (L(x) rarr F(x))

existx (L(x) and notC(x))

existx (F(x) and notC(x))

- 983089983088

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1118

983094983089983091983097983089

Predicates - more examples

Universe of discourseis all creatures

B(x) = ldquox is a hummingbirdrdquo

L(x) = ldquox is a large birdrdquoM(x) = ldquox lives on mountainrdquoR(x) = ldquox is richly coloredrdquo

All hummingbirds are richly colored

No large birds live on mountain

Birds that do not live on mountain are dully colored

forallx (B(x) rarr R(x))

notexistx (L(x) and M(x))

forallx (notM(x) rarr notR(x))

- 983089983089

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1218

983094983089983091983097983089

Predicates - quantifier negation

Not all large birds live on mountain

forallx P(x) means ldquoP(x) is true for every xrdquoWhat about notforallx P(x)

Not [ldquoP(x) is true for every xrdquo]

ldquoThere is an x for which P(x) is not truerdquoexistx notP(x)

Sonotforallnotforallnotforallnotforall

x P(x) is the same asexistexistexistexist

xnotnotnotnot

P(x)

notforallx (L(x) rarr M(x))

existx not(L(x) rarr M(x))

- 983089983090

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1318

983094983089983091983097983089

Predicates - quantifier negation

No large birds live on Mountain

existx P(x) means ldquoP(x) is true for some xrdquoWhat about notexistx P(x)

Not [ldquoP(x) is true for some xrdquo]

ldquoP(x) is not true for all xrdquoforallx notP(x)

Sonotexistnotexistnotexistnotexist

x P(x) is the same asforallforallforallforall

xnotnotnotnot

P(x)

notexistx (L(x) and M(x))

forallx not(L(x) and M(x))

- 983089983091

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1418

983094983089983091983097983089

Predicates - quantifier negation

So notforallx P(x) is the same as existx notP(x)So notexistx P(x) is the same as forallx notP(x)

General rule to negate a quantifier movenegation to the right changing quantifiers as

you go

- 983089983092

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1518

983094983089983091983097983089

Predicates - quantifier negation

No large birds live on Mountain

notexistx (L(x) and M(x)) equiv forallx not(L(x) and M(x)) Negationrule

equiv forall

x (not

L(x)or not

M(x)) DeMorganrsquosequiv forallx (L(x) rarr notM(x)) Subst for rarr

Whatrsquos wrong with thisproof

- 983089983093

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1618

983094983089983091983097983089

Predicates - free and bound variables

A variable is bound if it is known or quantified

Otherwise it is free

ExamplesP(x) x is freeP(5) x is bound to 5forallx P(x) x is bound by quantifier

Reminder in a

proposition allvariables must be

bound

- 983089983094

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1718

983094983089983091983097983089

Predicates - multiple quantifiers

To bind many variables use many quantifiers

Example P(xy) = ldquox gt yrdquoforallx P(xy)forallxforall y P(xy)forallxexist y P(xy)forallx P(x3)

a) True proposition

b) False proposition

c) Not a proposition

d) No clue

c)

b)

a)

b)

- 983089983095

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1818

Predicates - the meaning of multiple

quantifiers

forallxforall y P(xy)

existxexist y P(xy)

forallxexist y P(xy)

existxforall y P(xy)

983094983089983091983097983089

P(xy) true for all x y pairs

For every value of x we can find a (possibly different)

y so that P(xy) is true

P(xy) true for at least one x y pair

There is at least one x for which P(xy)

is always true

quantification order is notcommutative

Suppose P(xy) = ldquoxrsquos favorite class is yrdquo

- 983089983096

Page 8: Discrete Mathematics Structures Slide 2

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 818

983094983089983091983097983089

Predicates - the existential quantifier

Another way of changing a predicate into a proposition

Suppose P(x) is a predicate on some universe of discourseEx C(x) = ldquox has a carrdquo x is set of DM students

The existential quantifier of P(x) is the proposition

ldquoP(x) is true for some x in the universe of discourserdquo

We write it existx P(x) and say ldquofor some x P(x)rdquo

existx P(x) is TRUE if there is an x for which P(x) is trueexistx P(x) is FALSE if P(x) is false for every single x

existx C(x)

- 983096

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 918

983094983089983091983097983089

Predicates - the existential quantifier

B(x) = ldquox is wearing sneakersrdquo

L(x) = ldquox is at least 21 years oldrdquoY(x)= ldquox is less than 24 years oldrdquo

Are either of these propositions true

a) existx B(x)b) existx (Y(x) and L(x))

A only a is true

B only b is true

C both are true

D neither is true

Universe of

discourse is peoplein this room

- 983097

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1018

983094983089983091983097983089

Predicates - more examples

Universe of discourse

is all creatures

L(x) = ldquox is a lionrdquo

F(x) = ldquox is fiercerdquoC(x) = ldquox drinks coffeerdquo

All lions are fierce

Some lions donrsquot drink coffee

Some fierce creatures donrsquot drink coffee

forallx (L(x) rarr F(x))

existx (L(x) and notC(x))

existx (F(x) and notC(x))

- 983089983088

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1118

983094983089983091983097983089

Predicates - more examples

Universe of discourseis all creatures

B(x) = ldquox is a hummingbirdrdquo

L(x) = ldquox is a large birdrdquoM(x) = ldquox lives on mountainrdquoR(x) = ldquox is richly coloredrdquo

All hummingbirds are richly colored

No large birds live on mountain

Birds that do not live on mountain are dully colored

forallx (B(x) rarr R(x))

notexistx (L(x) and M(x))

forallx (notM(x) rarr notR(x))

- 983089983089

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1218

983094983089983091983097983089

Predicates - quantifier negation

Not all large birds live on mountain

forallx P(x) means ldquoP(x) is true for every xrdquoWhat about notforallx P(x)

Not [ldquoP(x) is true for every xrdquo]

ldquoThere is an x for which P(x) is not truerdquoexistx notP(x)

Sonotforallnotforallnotforallnotforall

x P(x) is the same asexistexistexistexist

xnotnotnotnot

P(x)

notforallx (L(x) rarr M(x))

existx not(L(x) rarr M(x))

- 983089983090

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1318

983094983089983091983097983089

Predicates - quantifier negation

No large birds live on Mountain

existx P(x) means ldquoP(x) is true for some xrdquoWhat about notexistx P(x)

Not [ldquoP(x) is true for some xrdquo]

ldquoP(x) is not true for all xrdquoforallx notP(x)

Sonotexistnotexistnotexistnotexist

x P(x) is the same asforallforallforallforall

xnotnotnotnot

P(x)

notexistx (L(x) and M(x))

forallx not(L(x) and M(x))

- 983089983091

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1418

983094983089983091983097983089

Predicates - quantifier negation

So notforallx P(x) is the same as existx notP(x)So notexistx P(x) is the same as forallx notP(x)

General rule to negate a quantifier movenegation to the right changing quantifiers as

you go

- 983089983092

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1518

983094983089983091983097983089

Predicates - quantifier negation

No large birds live on Mountain

notexistx (L(x) and M(x)) equiv forallx not(L(x) and M(x)) Negationrule

equiv forall

x (not

L(x)or not

M(x)) DeMorganrsquosequiv forallx (L(x) rarr notM(x)) Subst for rarr

Whatrsquos wrong with thisproof

- 983089983093

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1618

983094983089983091983097983089

Predicates - free and bound variables

A variable is bound if it is known or quantified

Otherwise it is free

ExamplesP(x) x is freeP(5) x is bound to 5forallx P(x) x is bound by quantifier

Reminder in a

proposition allvariables must be

bound

- 983089983094

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1718

983094983089983091983097983089

Predicates - multiple quantifiers

To bind many variables use many quantifiers

Example P(xy) = ldquox gt yrdquoforallx P(xy)forallxforall y P(xy)forallxexist y P(xy)forallx P(x3)

a) True proposition

b) False proposition

c) Not a proposition

d) No clue

c)

b)

a)

b)

- 983089983095

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1818

Predicates - the meaning of multiple

quantifiers

forallxforall y P(xy)

existxexist y P(xy)

forallxexist y P(xy)

existxforall y P(xy)

983094983089983091983097983089

P(xy) true for all x y pairs

For every value of x we can find a (possibly different)

y so that P(xy) is true

P(xy) true for at least one x y pair

There is at least one x for which P(xy)

is always true

quantification order is notcommutative

Suppose P(xy) = ldquoxrsquos favorite class is yrdquo

- 983089983096

Page 9: Discrete Mathematics Structures Slide 2

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 918

983094983089983091983097983089

Predicates - the existential quantifier

B(x) = ldquox is wearing sneakersrdquo

L(x) = ldquox is at least 21 years oldrdquoY(x)= ldquox is less than 24 years oldrdquo

Are either of these propositions true

a) existx B(x)b) existx (Y(x) and L(x))

A only a is true

B only b is true

C both are true

D neither is true

Universe of

discourse is peoplein this room

- 983097

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1018

983094983089983091983097983089

Predicates - more examples

Universe of discourse

is all creatures

L(x) = ldquox is a lionrdquo

F(x) = ldquox is fiercerdquoC(x) = ldquox drinks coffeerdquo

All lions are fierce

Some lions donrsquot drink coffee

Some fierce creatures donrsquot drink coffee

forallx (L(x) rarr F(x))

existx (L(x) and notC(x))

existx (F(x) and notC(x))

- 983089983088

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1118

983094983089983091983097983089

Predicates - more examples

Universe of discourseis all creatures

B(x) = ldquox is a hummingbirdrdquo

L(x) = ldquox is a large birdrdquoM(x) = ldquox lives on mountainrdquoR(x) = ldquox is richly coloredrdquo

All hummingbirds are richly colored

No large birds live on mountain

Birds that do not live on mountain are dully colored

forallx (B(x) rarr R(x))

notexistx (L(x) and M(x))

forallx (notM(x) rarr notR(x))

- 983089983089

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1218

983094983089983091983097983089

Predicates - quantifier negation

Not all large birds live on mountain

forallx P(x) means ldquoP(x) is true for every xrdquoWhat about notforallx P(x)

Not [ldquoP(x) is true for every xrdquo]

ldquoThere is an x for which P(x) is not truerdquoexistx notP(x)

Sonotforallnotforallnotforallnotforall

x P(x) is the same asexistexistexistexist

xnotnotnotnot

P(x)

notforallx (L(x) rarr M(x))

existx not(L(x) rarr M(x))

- 983089983090

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1318

983094983089983091983097983089

Predicates - quantifier negation

No large birds live on Mountain

existx P(x) means ldquoP(x) is true for some xrdquoWhat about notexistx P(x)

Not [ldquoP(x) is true for some xrdquo]

ldquoP(x) is not true for all xrdquoforallx notP(x)

Sonotexistnotexistnotexistnotexist

x P(x) is the same asforallforallforallforall

xnotnotnotnot

P(x)

notexistx (L(x) and M(x))

forallx not(L(x) and M(x))

- 983089983091

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1418

983094983089983091983097983089

Predicates - quantifier negation

So notforallx P(x) is the same as existx notP(x)So notexistx P(x) is the same as forallx notP(x)

General rule to negate a quantifier movenegation to the right changing quantifiers as

you go

- 983089983092

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1518

983094983089983091983097983089

Predicates - quantifier negation

No large birds live on Mountain

notexistx (L(x) and M(x)) equiv forallx not(L(x) and M(x)) Negationrule

equiv forall

x (not

L(x)or not

M(x)) DeMorganrsquosequiv forallx (L(x) rarr notM(x)) Subst for rarr

Whatrsquos wrong with thisproof

- 983089983093

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1618

983094983089983091983097983089

Predicates - free and bound variables

A variable is bound if it is known or quantified

Otherwise it is free

ExamplesP(x) x is freeP(5) x is bound to 5forallx P(x) x is bound by quantifier

Reminder in a

proposition allvariables must be

bound

- 983089983094

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1718

983094983089983091983097983089

Predicates - multiple quantifiers

To bind many variables use many quantifiers

Example P(xy) = ldquox gt yrdquoforallx P(xy)forallxforall y P(xy)forallxexist y P(xy)forallx P(x3)

a) True proposition

b) False proposition

c) Not a proposition

d) No clue

c)

b)

a)

b)

- 983089983095

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1818

Predicates - the meaning of multiple

quantifiers

forallxforall y P(xy)

existxexist y P(xy)

forallxexist y P(xy)

existxforall y P(xy)

983094983089983091983097983089

P(xy) true for all x y pairs

For every value of x we can find a (possibly different)

y so that P(xy) is true

P(xy) true for at least one x y pair

There is at least one x for which P(xy)

is always true

quantification order is notcommutative

Suppose P(xy) = ldquoxrsquos favorite class is yrdquo

- 983089983096

Page 10: Discrete Mathematics Structures Slide 2

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1018

983094983089983091983097983089

Predicates - more examples

Universe of discourse

is all creatures

L(x) = ldquox is a lionrdquo

F(x) = ldquox is fiercerdquoC(x) = ldquox drinks coffeerdquo

All lions are fierce

Some lions donrsquot drink coffee

Some fierce creatures donrsquot drink coffee

forallx (L(x) rarr F(x))

existx (L(x) and notC(x))

existx (F(x) and notC(x))

- 983089983088

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1118

983094983089983091983097983089

Predicates - more examples

Universe of discourseis all creatures

B(x) = ldquox is a hummingbirdrdquo

L(x) = ldquox is a large birdrdquoM(x) = ldquox lives on mountainrdquoR(x) = ldquox is richly coloredrdquo

All hummingbirds are richly colored

No large birds live on mountain

Birds that do not live on mountain are dully colored

forallx (B(x) rarr R(x))

notexistx (L(x) and M(x))

forallx (notM(x) rarr notR(x))

- 983089983089

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1218

983094983089983091983097983089

Predicates - quantifier negation

Not all large birds live on mountain

forallx P(x) means ldquoP(x) is true for every xrdquoWhat about notforallx P(x)

Not [ldquoP(x) is true for every xrdquo]

ldquoThere is an x for which P(x) is not truerdquoexistx notP(x)

Sonotforallnotforallnotforallnotforall

x P(x) is the same asexistexistexistexist

xnotnotnotnot

P(x)

notforallx (L(x) rarr M(x))

existx not(L(x) rarr M(x))

- 983089983090

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1318

983094983089983091983097983089

Predicates - quantifier negation

No large birds live on Mountain

existx P(x) means ldquoP(x) is true for some xrdquoWhat about notexistx P(x)

Not [ldquoP(x) is true for some xrdquo]

ldquoP(x) is not true for all xrdquoforallx notP(x)

Sonotexistnotexistnotexistnotexist

x P(x) is the same asforallforallforallforall

xnotnotnotnot

P(x)

notexistx (L(x) and M(x))

forallx not(L(x) and M(x))

- 983089983091

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1418

983094983089983091983097983089

Predicates - quantifier negation

So notforallx P(x) is the same as existx notP(x)So notexistx P(x) is the same as forallx notP(x)

General rule to negate a quantifier movenegation to the right changing quantifiers as

you go

- 983089983092

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1518

983094983089983091983097983089

Predicates - quantifier negation

No large birds live on Mountain

notexistx (L(x) and M(x)) equiv forallx not(L(x) and M(x)) Negationrule

equiv forall

x (not

L(x)or not

M(x)) DeMorganrsquosequiv forallx (L(x) rarr notM(x)) Subst for rarr

Whatrsquos wrong with thisproof

- 983089983093

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1618

983094983089983091983097983089

Predicates - free and bound variables

A variable is bound if it is known or quantified

Otherwise it is free

ExamplesP(x) x is freeP(5) x is bound to 5forallx P(x) x is bound by quantifier

Reminder in a

proposition allvariables must be

bound

- 983089983094

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1718

983094983089983091983097983089

Predicates - multiple quantifiers

To bind many variables use many quantifiers

Example P(xy) = ldquox gt yrdquoforallx P(xy)forallxforall y P(xy)forallxexist y P(xy)forallx P(x3)

a) True proposition

b) False proposition

c) Not a proposition

d) No clue

c)

b)

a)

b)

- 983089983095

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1818

Predicates - the meaning of multiple

quantifiers

forallxforall y P(xy)

existxexist y P(xy)

forallxexist y P(xy)

existxforall y P(xy)

983094983089983091983097983089

P(xy) true for all x y pairs

For every value of x we can find a (possibly different)

y so that P(xy) is true

P(xy) true for at least one x y pair

There is at least one x for which P(xy)

is always true

quantification order is notcommutative

Suppose P(xy) = ldquoxrsquos favorite class is yrdquo

- 983089983096

Page 11: Discrete Mathematics Structures Slide 2

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1118

983094983089983091983097983089

Predicates - more examples

Universe of discourseis all creatures

B(x) = ldquox is a hummingbirdrdquo

L(x) = ldquox is a large birdrdquoM(x) = ldquox lives on mountainrdquoR(x) = ldquox is richly coloredrdquo

All hummingbirds are richly colored

No large birds live on mountain

Birds that do not live on mountain are dully colored

forallx (B(x) rarr R(x))

notexistx (L(x) and M(x))

forallx (notM(x) rarr notR(x))

- 983089983089

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1218

983094983089983091983097983089

Predicates - quantifier negation

Not all large birds live on mountain

forallx P(x) means ldquoP(x) is true for every xrdquoWhat about notforallx P(x)

Not [ldquoP(x) is true for every xrdquo]

ldquoThere is an x for which P(x) is not truerdquoexistx notP(x)

Sonotforallnotforallnotforallnotforall

x P(x) is the same asexistexistexistexist

xnotnotnotnot

P(x)

notforallx (L(x) rarr M(x))

existx not(L(x) rarr M(x))

- 983089983090

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1318

983094983089983091983097983089

Predicates - quantifier negation

No large birds live on Mountain

existx P(x) means ldquoP(x) is true for some xrdquoWhat about notexistx P(x)

Not [ldquoP(x) is true for some xrdquo]

ldquoP(x) is not true for all xrdquoforallx notP(x)

Sonotexistnotexistnotexistnotexist

x P(x) is the same asforallforallforallforall

xnotnotnotnot

P(x)

notexistx (L(x) and M(x))

forallx not(L(x) and M(x))

- 983089983091

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1418

983094983089983091983097983089

Predicates - quantifier negation

So notforallx P(x) is the same as existx notP(x)So notexistx P(x) is the same as forallx notP(x)

General rule to negate a quantifier movenegation to the right changing quantifiers as

you go

- 983089983092

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1518

983094983089983091983097983089

Predicates - quantifier negation

No large birds live on Mountain

notexistx (L(x) and M(x)) equiv forallx not(L(x) and M(x)) Negationrule

equiv forall

x (not

L(x)or not

M(x)) DeMorganrsquosequiv forallx (L(x) rarr notM(x)) Subst for rarr

Whatrsquos wrong with thisproof

- 983089983093

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1618

983094983089983091983097983089

Predicates - free and bound variables

A variable is bound if it is known or quantified

Otherwise it is free

ExamplesP(x) x is freeP(5) x is bound to 5forallx P(x) x is bound by quantifier

Reminder in a

proposition allvariables must be

bound

- 983089983094

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1718

983094983089983091983097983089

Predicates - multiple quantifiers

To bind many variables use many quantifiers

Example P(xy) = ldquox gt yrdquoforallx P(xy)forallxforall y P(xy)forallxexist y P(xy)forallx P(x3)

a) True proposition

b) False proposition

c) Not a proposition

d) No clue

c)

b)

a)

b)

- 983089983095

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1818

Predicates - the meaning of multiple

quantifiers

forallxforall y P(xy)

existxexist y P(xy)

forallxexist y P(xy)

existxforall y P(xy)

983094983089983091983097983089

P(xy) true for all x y pairs

For every value of x we can find a (possibly different)

y so that P(xy) is true

P(xy) true for at least one x y pair

There is at least one x for which P(xy)

is always true

quantification order is notcommutative

Suppose P(xy) = ldquoxrsquos favorite class is yrdquo

- 983089983096

Page 12: Discrete Mathematics Structures Slide 2

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1218

983094983089983091983097983089

Predicates - quantifier negation

Not all large birds live on mountain

forallx P(x) means ldquoP(x) is true for every xrdquoWhat about notforallx P(x)

Not [ldquoP(x) is true for every xrdquo]

ldquoThere is an x for which P(x) is not truerdquoexistx notP(x)

Sonotforallnotforallnotforallnotforall

x P(x) is the same asexistexistexistexist

xnotnotnotnot

P(x)

notforallx (L(x) rarr M(x))

existx not(L(x) rarr M(x))

- 983089983090

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1318

983094983089983091983097983089

Predicates - quantifier negation

No large birds live on Mountain

existx P(x) means ldquoP(x) is true for some xrdquoWhat about notexistx P(x)

Not [ldquoP(x) is true for some xrdquo]

ldquoP(x) is not true for all xrdquoforallx notP(x)

Sonotexistnotexistnotexistnotexist

x P(x) is the same asforallforallforallforall

xnotnotnotnot

P(x)

notexistx (L(x) and M(x))

forallx not(L(x) and M(x))

- 983089983091

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1418

983094983089983091983097983089

Predicates - quantifier negation

So notforallx P(x) is the same as existx notP(x)So notexistx P(x) is the same as forallx notP(x)

General rule to negate a quantifier movenegation to the right changing quantifiers as

you go

- 983089983092

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1518

983094983089983091983097983089

Predicates - quantifier negation

No large birds live on Mountain

notexistx (L(x) and M(x)) equiv forallx not(L(x) and M(x)) Negationrule

equiv forall

x (not

L(x)or not

M(x)) DeMorganrsquosequiv forallx (L(x) rarr notM(x)) Subst for rarr

Whatrsquos wrong with thisproof

- 983089983093

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1618

983094983089983091983097983089

Predicates - free and bound variables

A variable is bound if it is known or quantified

Otherwise it is free

ExamplesP(x) x is freeP(5) x is bound to 5forallx P(x) x is bound by quantifier

Reminder in a

proposition allvariables must be

bound

- 983089983094

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1718

983094983089983091983097983089

Predicates - multiple quantifiers

To bind many variables use many quantifiers

Example P(xy) = ldquox gt yrdquoforallx P(xy)forallxforall y P(xy)forallxexist y P(xy)forallx P(x3)

a) True proposition

b) False proposition

c) Not a proposition

d) No clue

c)

b)

a)

b)

- 983089983095

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1818

Predicates - the meaning of multiple

quantifiers

forallxforall y P(xy)

existxexist y P(xy)

forallxexist y P(xy)

existxforall y P(xy)

983094983089983091983097983089

P(xy) true for all x y pairs

For every value of x we can find a (possibly different)

y so that P(xy) is true

P(xy) true for at least one x y pair

There is at least one x for which P(xy)

is always true

quantification order is notcommutative

Suppose P(xy) = ldquoxrsquos favorite class is yrdquo

- 983089983096

Page 13: Discrete Mathematics Structures Slide 2

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1318

983094983089983091983097983089

Predicates - quantifier negation

No large birds live on Mountain

existx P(x) means ldquoP(x) is true for some xrdquoWhat about notexistx P(x)

Not [ldquoP(x) is true for some xrdquo]

ldquoP(x) is not true for all xrdquoforallx notP(x)

Sonotexistnotexistnotexistnotexist

x P(x) is the same asforallforallforallforall

xnotnotnotnot

P(x)

notexistx (L(x) and M(x))

forallx not(L(x) and M(x))

- 983089983091

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1418

983094983089983091983097983089

Predicates - quantifier negation

So notforallx P(x) is the same as existx notP(x)So notexistx P(x) is the same as forallx notP(x)

General rule to negate a quantifier movenegation to the right changing quantifiers as

you go

- 983089983092

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1518

983094983089983091983097983089

Predicates - quantifier negation

No large birds live on Mountain

notexistx (L(x) and M(x)) equiv forallx not(L(x) and M(x)) Negationrule

equiv forall

x (not

L(x)or not

M(x)) DeMorganrsquosequiv forallx (L(x) rarr notM(x)) Subst for rarr

Whatrsquos wrong with thisproof

- 983089983093

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1618

983094983089983091983097983089

Predicates - free and bound variables

A variable is bound if it is known or quantified

Otherwise it is free

ExamplesP(x) x is freeP(5) x is bound to 5forallx P(x) x is bound by quantifier

Reminder in a

proposition allvariables must be

bound

- 983089983094

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1718

983094983089983091983097983089

Predicates - multiple quantifiers

To bind many variables use many quantifiers

Example P(xy) = ldquox gt yrdquoforallx P(xy)forallxforall y P(xy)forallxexist y P(xy)forallx P(x3)

a) True proposition

b) False proposition

c) Not a proposition

d) No clue

c)

b)

a)

b)

- 983089983095

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1818

Predicates - the meaning of multiple

quantifiers

forallxforall y P(xy)

existxexist y P(xy)

forallxexist y P(xy)

existxforall y P(xy)

983094983089983091983097983089

P(xy) true for all x y pairs

For every value of x we can find a (possibly different)

y so that P(xy) is true

P(xy) true for at least one x y pair

There is at least one x for which P(xy)

is always true

quantification order is notcommutative

Suppose P(xy) = ldquoxrsquos favorite class is yrdquo

- 983089983096

Page 14: Discrete Mathematics Structures Slide 2

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1418

983094983089983091983097983089

Predicates - quantifier negation

So notforallx P(x) is the same as existx notP(x)So notexistx P(x) is the same as forallx notP(x)

General rule to negate a quantifier movenegation to the right changing quantifiers as

you go

- 983089983092

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1518

983094983089983091983097983089

Predicates - quantifier negation

No large birds live on Mountain

notexistx (L(x) and M(x)) equiv forallx not(L(x) and M(x)) Negationrule

equiv forall

x (not

L(x)or not

M(x)) DeMorganrsquosequiv forallx (L(x) rarr notM(x)) Subst for rarr

Whatrsquos wrong with thisproof

- 983089983093

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1618

983094983089983091983097983089

Predicates - free and bound variables

A variable is bound if it is known or quantified

Otherwise it is free

ExamplesP(x) x is freeP(5) x is bound to 5forallx P(x) x is bound by quantifier

Reminder in a

proposition allvariables must be

bound

- 983089983094

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1718

983094983089983091983097983089

Predicates - multiple quantifiers

To bind many variables use many quantifiers

Example P(xy) = ldquox gt yrdquoforallx P(xy)forallxforall y P(xy)forallxexist y P(xy)forallx P(x3)

a) True proposition

b) False proposition

c) Not a proposition

d) No clue

c)

b)

a)

b)

- 983089983095

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1818

Predicates - the meaning of multiple

quantifiers

forallxforall y P(xy)

existxexist y P(xy)

forallxexist y P(xy)

existxforall y P(xy)

983094983089983091983097983089

P(xy) true for all x y pairs

For every value of x we can find a (possibly different)

y so that P(xy) is true

P(xy) true for at least one x y pair

There is at least one x for which P(xy)

is always true

quantification order is notcommutative

Suppose P(xy) = ldquoxrsquos favorite class is yrdquo

- 983089983096

Page 15: Discrete Mathematics Structures Slide 2

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1518

983094983089983091983097983089

Predicates - quantifier negation

No large birds live on Mountain

notexistx (L(x) and M(x)) equiv forallx not(L(x) and M(x)) Negationrule

equiv forall

x (not

L(x)or not

M(x)) DeMorganrsquosequiv forallx (L(x) rarr notM(x)) Subst for rarr

Whatrsquos wrong with thisproof

- 983089983093

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1618

983094983089983091983097983089

Predicates - free and bound variables

A variable is bound if it is known or quantified

Otherwise it is free

ExamplesP(x) x is freeP(5) x is bound to 5forallx P(x) x is bound by quantifier

Reminder in a

proposition allvariables must be

bound

- 983089983094

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1718

983094983089983091983097983089

Predicates - multiple quantifiers

To bind many variables use many quantifiers

Example P(xy) = ldquox gt yrdquoforallx P(xy)forallxforall y P(xy)forallxexist y P(xy)forallx P(x3)

a) True proposition

b) False proposition

c) Not a proposition

d) No clue

c)

b)

a)

b)

- 983089983095

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1818

Predicates - the meaning of multiple

quantifiers

forallxforall y P(xy)

existxexist y P(xy)

forallxexist y P(xy)

existxforall y P(xy)

983094983089983091983097983089

P(xy) true for all x y pairs

For every value of x we can find a (possibly different)

y so that P(xy) is true

P(xy) true for at least one x y pair

There is at least one x for which P(xy)

is always true

quantification order is notcommutative

Suppose P(xy) = ldquoxrsquos favorite class is yrdquo

- 983089983096

Page 16: Discrete Mathematics Structures Slide 2

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1618

983094983089983091983097983089

Predicates - free and bound variables

A variable is bound if it is known or quantified

Otherwise it is free

ExamplesP(x) x is freeP(5) x is bound to 5forallx P(x) x is bound by quantifier

Reminder in a

proposition allvariables must be

bound

- 983089983094

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1718

983094983089983091983097983089

Predicates - multiple quantifiers

To bind many variables use many quantifiers

Example P(xy) = ldquox gt yrdquoforallx P(xy)forallxforall y P(xy)forallxexist y P(xy)forallx P(x3)

a) True proposition

b) False proposition

c) Not a proposition

d) No clue

c)

b)

a)

b)

- 983089983095

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1818

Predicates - the meaning of multiple

quantifiers

forallxforall y P(xy)

existxexist y P(xy)

forallxexist y P(xy)

existxforall y P(xy)

983094983089983091983097983089

P(xy) true for all x y pairs

For every value of x we can find a (possibly different)

y so that P(xy) is true

P(xy) true for at least one x y pair

There is at least one x for which P(xy)

is always true

quantification order is notcommutative

Suppose P(xy) = ldquoxrsquos favorite class is yrdquo

- 983089983096

Page 17: Discrete Mathematics Structures Slide 2

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1718

983094983089983091983097983089

Predicates - multiple quantifiers

To bind many variables use many quantifiers

Example P(xy) = ldquox gt yrdquoforallx P(xy)forallxforall y P(xy)forallxexist y P(xy)forallx P(x3)

a) True proposition

b) False proposition

c) Not a proposition

d) No clue

c)

b)

a)

b)

- 983089983095

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1818

Predicates - the meaning of multiple

quantifiers

forallxforall y P(xy)

existxexist y P(xy)

forallxexist y P(xy)

existxforall y P(xy)

983094983089983091983097983089

P(xy) true for all x y pairs

For every value of x we can find a (possibly different)

y so that P(xy) is true

P(xy) true for at least one x y pair

There is at least one x for which P(xy)

is always true

quantification order is notcommutative

Suppose P(xy) = ldquoxrsquos favorite class is yrdquo

- 983089983096

Page 18: Discrete Mathematics Structures Slide 2

7252019 Discrete Mathematics Structures Slide 2

httpslidepdfcomreaderfulldiscrete-mathematics-structures-slide-2 1818

Predicates - the meaning of multiple

quantifiers

forallxforall y P(xy)

existxexist y P(xy)

forallxexist y P(xy)

existxforall y P(xy)

983094983089983091983097983089

P(xy) true for all x y pairs

For every value of x we can find a (possibly different)

y so that P(xy) is true

P(xy) true for at least one x y pair

There is at least one x for which P(xy)

is always true

quantification order is notcommutative

Suppose P(xy) = ldquoxrsquos favorite class is yrdquo

- 983089983096