nested quantifiers
Download
Skip this Video
Download Presentation
Nested Quantifiers

Loading in 2 Seconds...

play fullscreen
1 / 12

Nested Quantifiers - PowerPoint PPT Presentation


  • 347 Views
  • Uploaded on

Nested Quantifiers. CS/APMA 202, Spring 2005 Rosen, section 1.4 Aaron Bloomfield. Multiple quantifiers. You can have multiple quantifiers on a statement xy P(x, y) “For all x, there exists a y such that P(x,y)” Example: xy (x+y == 0) xy P(x,y)

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Nested Quantifiers' - charla


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
nested quantifiers

Nested Quantifiers

CS/APMA 202, Spring 2005

Rosen, section 1.4

Aaron Bloomfield

multiple quantifiers
Multiple quantifiers
  • You can have multiple quantifiers on a statement
  • xy P(x, y)
    • “For all x, there exists a y such that P(x,y)”
    • Example: xy (x+y == 0)
  • xy P(x,y)
    • There exists an x such that for all y P(x,y) is true”
    • xy (x*y == 0)
order of quantifiers
Order of quantifiers
  • xy and xy are not equivalent!
  • xy P(x,y)
    • P(x,y) = (x+y == 0) is false
  • xy P(x,y)
    • P(x,y) = (x+y == 0) is true
negating multiple quantifiers
Negating multiple quantifiers
  • Recall negation rules for single quantifiers:
    • ¬x P(x) = x ¬P(x)
    • ¬x P(x) = x ¬P(x)
    • Essentially, you change the quantifier(s), and negate what it’s quantifying
  • Examples:
    • ¬(xy P(x,y))
      • = x ¬y P(x,y)
      • = xy ¬P(x,y)
    • ¬(xyz P(x,y,z))
      • = x¬yz P(x,y,z)
      • = x¬yz P(x,y,z)
      • = xyz ¬P(x,y,z)
negating multiple quantifiers 2
Negating multiple quantifiers 2
  • Consider ¬(xy P(x,y)) = xy ¬P(x,y)
    • The left side is saying “for all x, there exists a y such that P is true”
    • To disprove it (negate it), you need to show that “there exists an x such that for all y, P is false”
  • Consider ¬(xy P(x,y)) = xy ¬P(x,y)
    • The left side is saying “there exists an x such that for all y, P is true”
    • To disprove it (negate it), you need to show that “for all x, there exists a y such that P is false”
translating between english and quantifiers
Translating between English and quantifiers
  • Rosen, section 1.4, question 20
  • The product of two negative integers is positive
    • xy ((x<0)  (y<0) → (xy > 0))
    • Why conditional instead of and?
  • The average of two positive integers is positive
    • xy ((x>0)  (y>0) → ((x+y)/2 > 0))
  • The difference of two negative integers is not necessarily negative
    • xy ((x<0)  (y<0)  (x-y≥0))
    • Why and instead of conditional?
  • The absolute value of the sum of two integers does not exceed the sum of the absolute values of these integers
    • xy (|x+y| ≤ |x| + |y|)
translating between english and quantifiers1
Translating between English and quantifiers
  • Rosen, section 1.4, question 24
  • xy (x+y = y)
    • There exists an additive identity for all real numbers
  • xy (((x≥0)  (y<0)) → (x-y > 0))
    • A non-negative number minus a negative number is greater than zero
  • xy (((x≤0)  (y≤0))  (x-y > 0))
    • The difference between two non-positive numbers is not necessarily non-positive (i.e. can be positive)
  • xy (((x≠0)  (y≠0)) ↔ (xy ≠ 0))
    • The product of two non-zero numbers is non-zero if and only if both factors are non-zero
rosen section 1 4 question 30
Rosen, section 1.4 question 30
  • Rewrite these statements so that the negations only appear within the predicates
  • yx P(x,y)
    • yx P(x,y)
    • yx P(x,y)
  • xy P(x,y)
    • xy P(x,y)
    • xy P(x,y)
  • y (Q(y)  x R(x,y))
    • y (Q(y)  x R(x,y))
    • y (Q(y)  (x R(x,y)))
    • y (Q(y)  x R(x,y))
rosen section 1 4 question 31
Rosen, section 1.4 question 31
  • Express the negations of each of these statements so that all negation symbols immediately precede predicates.
  • xyz T(x,y,z)
    • (xyz T(x,y,z))
    • xyz T(x,y,z)
    • xyz T(x,y,z)
    • xyz T(x,y,z)
    • xyz T(x,y,z)
  • xy P(x,y)  xy Q(x,y)
    • (xy P(x,y)  xy Q(x,y))
    • xy P(x,y)  xy Q(x,y)
    • xy P(x,y)  xy Q(x,y)
    • xy P(x,y)  xy Q(x,y)
quick survey
Quick survey
  • I felt I understood the material in this slide set…
  • Very well
  • With some review, I’ll be good
  • Not really
  • Not at all
quick survey1
Quick survey
  • The pace of the lecture for this slide set was…
  • Fast
  • About right
  • A little slow
  • Too slow
quick survey2
Quick survey
  • How interesting was the material in this slide set? Be honest!
  • Wow! That was SOOOOOO cool!
  • Somewhat interesting
  • Rather borting
  • Zzzzzzzzzzz
ad