Nested Quantifiers Goals: Explain how to work with nested quantifiers

Slides:



Advertisements
Similar presentations
Nested Quantifiers Section 1.4.
Advertisements

1.3 Predicates and Quantifiers
Tutorial 2: First Order Logic and Methods of Proofs
Nested Quantifiers Needed to express statements with multiple variables Example 1: “x+y = y+x for all real numbers”  x  y(x+y = y+x) where the domains.
The Logic of Quantified Statements
22C:19 Discrete Structures Logic and Proof Spring 2014 Sukumar Ghosh.
A Quick Look at Quantified Statements. Why are Quantified Statements Important? The logical structure of quantified statements provides a basis for the.
CSE 311 Foundations of Computing I Lecture 6 Predicate Logic Autumn 2011 CSE 3111.
CSE115/ENGR160 Discrete Mathematics 01/25/11 Ming-Hsuan Yang UC Merced 1.
Sets. Copyright © Peter Cappello Definition Visualize a dictionary as a directed graph. Nodes represent words If word w is defined in terms of word.
Discrete Structures Chapter 3: The Logic of Quantified Statements
Discrete Structures Chapter 3: The Logic of Quantified Statements
Propositional Equivalence Goal: Show how propositional equivalences are established & introduce the most important such equivalences.
Predicates and Quantifiers
Predicates & Quantifiers Goal: Introduce predicate logic, including existential & universal quantification Introduce translation between English sentences.
CS 2210 (22C:019) Discrete Structures Logic and Proof Spring 2015 Sukumar Ghosh.
Chapter 1: The Foundations: Logic and Proofs
CSci 2011 Discrete Mathematics Lecture 3 CSci 2011.
Algebra 1 Chapter 1 Section Properties of Real Numbers The commutative and associate properties of addition and multiplication allow you to rearrange.
CSCI 3328 Object Oriented Programming in C# Chapter 5: C# Control Statement – Part II UTPA – Fall
Computer Science 210 Computer Organization Introduction to Boolean Algebra.
Nested Quantifiers. 2 Nested Iteration Let the domain be {1, 2, …, 10}. Let P(x, y) denote x > y.  x,  y, P(x, y) means  x, (  y, P(x, y) ) Is the.
Chapter 1, Part II: Predicate Logic With Question/Answer Animations.
ㅎㅎ logical operator if if else switch while do while for Third step for Learning C++ Programming Repetition Control Structures.
Chapter 1, Part II: Predicate Logic With Question/Answer Animations.
Chapter 1: The Foundations: Logic and Proofs 1.1 Propositional Logic 1.2 Propositional Equivalences 1.3 Predicates and Quantifiers 1.4 Nested Quantifiers.
Nesting Quantifiers And Their Manipulation Copyright © Curt Hill.
Statements with Multiple Quantifiers. When a statement contains more than one quantifier, we imagine the actions suggested by the quantifiers as being.
Math 51/COEN 19 Day 3, 1.4 Quantifiers 1. 3 Predicates A lot like functions that return booleans Let P(x) denote x
Nested Quantifiers Section 1.5.
Sets Goal: Introduce the basic terminology of set theory.
1 Sections 1.3 and 1.4 Predicates & Quantifiers. 2 Propositional Functions In a mathematical assertion, such as x < 3, there are two parts: –the subject,
1 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Lecture 02: QUANTIFIERS Sections 1.3 and 1.4 Jarek Rossignac CS1050:
Lecture Predicates and Quantifiers 1.4 Nested Quantifiers.
Lecture 7 – Jan 28, Chapter 2 The Logic of Quantified Statements.
Discrete Structures – CNS 2300
Predicates and Quantifiers Dr. Yasir Ali. 1.Predicates 2.Quantifiers a.Universal Quantifiers b.Existential Quantifiers 3.Negation of Quantifiers 4.Universal.
22C:19 Discrete Structures Logic and Proof Fall 2014 Sukumar Ghosh.
Copyright © Peter Cappello 2011 Predicates & Quantifiers.
PREDICATES AND QUANTIFIERS COSC-1321 Discrete Structures 1.
While ( number
Section 1.4. Propositional Functions Propositional functions become propositions (and have truth values) when their variables are each replaced by a value.
Section 1.5. Section Summary Nested Quantifiers Order of Quantifiers Translating from Nested Quantifiers into English Translating Mathematical Statements.
Conditional Statements A conditional statement lets us choose which statement will be executed next Conditional statements give us the power to make basic.
رياضيات متقطعة لعلوم الحاسب MATH 226. Chapter 1 Predicates and Quantifiers 1.4.
CSE15 Discrete Mathematics 01/25/17
Sets.
CS 2210:0001 Discrete Structures Logic and Proof
3. The Logic of Quantified Statements Summary
Computer Science 210 Computer Organization
Propositional Equivalence
Chapter 3 The Logic of Quantified Statements
Predicates & Quantifiers
Rules of inference for quantifiers
Nested Quantifiers Goals: Explain how to work with nested quantifiers
Negations of Quantified Statements
Chapter 1 The Foundations: Logic and Proofs
1.4 Predicates and Quantifiers
Computer Science 210 Computer Organization
Mathematics for Computer Science MIT 6.042J/18.062J
Nested Quantifiers Nested quantifiers are often necessary to express the meaning of sentences in English as well as important concepts in computer science.
Statements Containing Multiple Quantifiers
Introduction to Predicates and Quantified Statements I
Discrete Mathematics Lecture 4 & 5: Predicate and Quantifier
Discrete Mathematics Lecture 4 & 5: Predicate and Quantifier
ICS 253: Discrete Structures I
Thinking Mathematically
Predicates and Quantifiers
Discrete Mathematics Lecture 4 Logic of Quantified Statements
Presentation transcript:

Nested Quantifiers Goals: Explain how to work with nested quantifiers Show that the order of quantification matters. Work with logical expressions involving multiple quantifiers.

Copyright © Peter Cappello Nested Iteration Let the domain be { 1, 2, …, 10 }. Let P( x, y ) denote x > y. x y P( x, y ) means x ( y P( x, y ) ) Is the above statement true? Copyright © Peter Cappello

Copyright © Peter Cappello boolean axEyP() // x y P( x, y ) { for ( int x = 1; x <= 10; x++ ) boolean b = false; for ( int y = 1; y <= 10; y++ ) if ( x > y ) b = true; break; // finding 1 y value is enough } if ( ! b ) return false; return true; Computational Interpretation Copyright © Peter Cappello

Copyright © Peter Cappello Multiple Quantifiers Legend: A B is valid x  y P(x, y) y  x P(x, y) y x P(x, y) x y P(x, y) x y P(x, y) y x P(x, y) y x P(x, y)  x y P(x, y) Copyright © Peter Cappello

Copyright © Peter Cappello Translate to English Let the domain be the real numbers. x y ( ( x ≥ 0  y < 0 )  x – y > 0 ) Is there something wrong with x ( ( x ≥ 0  y ( y < 0 ) )  x – y > 0 ) Copyright © Peter Cappello

Translate to a Logical Expression Let Q( s, q ) denote “s has been a contestant on quiz show q” I( s1, s2 ) denote “student s1 is student s2” The domain for s, s1, s2 is students at UCSB. The domain for q is quiz shows on TV. Give a logical expression for: Every TV quiz show has had a student from UCSB as a contestant. At least 2 students from UCSB have been contestants on Jeopardy. Copyright © Peter Cappello

Copyright © Peter Cappello Translations 1. q s Q( s, q ) Copyright © Peter Cappello

Copyright © Peter Cappello 2. s1 s2 ( I( s1, s2 )  Q( s1, Jeopardy )  Q( s2 , Jeopardy ) ) Copyright © Peter Cappello

Negating Nested Quantifiers Negate x y ( P( x, y )  Q( x, y ) ) so that no quantifiers are negated. x y ( P( x, y )  Q( x, y ) ). Copyright © Peter Cappello 9

Negating Nested Quantifiers Negate x y ( P( x, y )  Q( x, y ) ) so that no quantifiers are negated. x y ( P( x, y )  Q( x, y ) ). x y ( P( x, y )  Q( x, y ) ). Copyright © Peter Cappello

Negating Nested Quantifiers Negate x y ( P( x, y )  Q( x, y ) ) so that no quantifiers are negated. x y ( P( x, y )  Q( x, y ) ). x y ( P( x, y )  Q( x, y ) ). x y  ( P( x, y )  Q( x, y ) ). Copyright © Peter Cappello 11

Negating Nested Quantifiers Negate x y ( P( x, y )  Q( x, y ) ) so that no quantifiers are negated. x y ( P( x, y )  Q( x, y ) ). x y ( P( x, y )  Q( x, y ) ). x y  ( P( x, y )  Q( x, y ) ). x y (  P( x, y )   Q( x, y ) ). Copyright © Peter Cappello 12 12