SlideShare a Scribd company logo
Nepal College of Informaiton Technology Balkumari, Lalitpur May 18, 2010 ॐ NEPAL COLLEGE OF INFORMATION TECHNOLOGY  _ _ _ _ _ _ _ _ _ _ _ _ 2001
make statements about individual subjects predicate P(x) has two parts: variable ‘x’ is the subject of statement propositional function P is the property that the subject can have property of an inference May 18, 2010
property of description of subject in “domain or universe of discourse” P(x) predicate two condition: all values of ‘x’ true some values of ‘x’ true May 18, 2010 ‘ n’ objects ‘ x’ values
dynamic  in nature logic operator are used so called predicate logic quantifiers & variables are used & variables bound the quantifier (universal or existential or both) i.e. symbolic logic May 18, 2010
P(x) : “x is man” For all values of ‘x’, if P(x) is true then   x   P(x) exists For some values of ‘x’, if P(x) is true then   x P(x) exists “ All students in this class love discrete structure.”  x love(x, discrete structure) “ All student love some subject.”  x   y love(x, y) May 18, 2010
Two quantifiers are  nested if one is within the scope of the other, such as ∀ x ∃y (x + y = 0)  Everything within the scope of a quantifier can be thought of as a propositional function. Define the propositional functions Q(x) : ∃y P(x, y) P(x, y) : x + y = 0 Then, we have ∀ x ∃y (x + y = 0) ≡ ∀x ∃y P(x, y) ≡ ∀x Q(x) . May 18, 2010
Translation of  nested quantifiers  can be done by: write out what the quantifiers and predicates in the expression means convert this meaning into a simpler sentence without using any of the variables Statements involving nested quantifiers can be negated by  applying the rules for negating statements involving a single quantifier Table : Negating Quantifiers  May 18, 2010 Negation Equivalent Statement When Is Negation True? When False?    x   P ( x )  x P ( x )  x   P ( x )    x    P ( x ) For every  x ,  P ( x ) is false. There is an  x  for which  P ( x ) is false. There is an  x  for which  P ( x ) is true. P ( x ) is true for every  x .
For example, to evaluate   x    y P(x, y) we loop through all the values of  x , and for each x we loop through all the values of y. Table : Quantifications of Two Variables May 18, 2010 Statement When True? When False?  x   y P(x, y)  y   x P(x, y) P(x, y) is true for every pair x, y. There is a pair x, y for which P(x, y) is false.  x   y P(x, y) For every x there is a  y  for which P(x, y) is true. There is an x such that P(x, y) is false for all y.  x   y P(x, y) There is an  x  for which P(x, y) is true for all y. For every x there is a  y  for which P(x, y) is false.  x   y P(x, y)  y   x P(x, y) There is a pair x, y for which P(x, y) is true. P(x, y) is false for every pair x, y.
Example:  Translate the statement “The sum of two positive integers is always positive” into a logical expression. Solution: May 18, 2010
K. Rosen, “ Discrete Mathematical Structures with Applications to Computer Science, WCB/ Mcgraw Hill ”, edition 6 2006 http://www.slideshare.net/../predicate-logic www.cs.odu.edu/~toida/nerzic/conten .. www.earlham.edu/../terms3.htm May 18, 2010
If you have any suggestion then let me know. May 18, 2010
Ad

Recommended

Per3 logika
Per3 logika
Evert Sandye Taasiringan
 
Truth, deduction, computation lecture c
Truth, deduction, computation lecture c
Vlad Patryshev
 
Introduction to Stochastic calculus
Introduction to Stochastic calculus
Ashwin Rao
 
Stochastic calculus
Stochastic calculus
Praveen Kumar Gangarapu
 
Lecture2 xing
Lecture2 xing
Tianlu Wang
 
Lesson 4.5
Lesson 4.5
carnesc
 
Formal methods 6 - elements of algebra
Formal methods 6 - elements of algebra
Vlad Patryshev
 
Formal methods 7 - category theory
Formal methods 7 - category theory
Vlad Patryshev
 
Quantification
Quantification
Abdur Rehman
 
1997 AFTA Commendation
1997 AFTA Commendation
SUSANNE OLSEN
 
Chapter 5.0
Chapter 5.0
sotlsoc
 
Assignement code
Assignement code
Syed Umair
 
Chapter 5.3
Chapter 5.3
sotlsoc
 
Nested quantifiers
Nested quantifiers
Ali Saleem
 
Graphs
Graphs
Ali Saleem
 
Lecture 2 predicates quantifiers and rules of inference
Lecture 2 predicates quantifiers and rules of inference
asimnawaz54
 
Vb.net (loop structure)
Vb.net (loop structure)
Abhishek Pachisia
 
Introduction to VB.NET - UP SITF
Introduction to VB.NET - UP SITF
John Patrick Oliveros
 
Chapter 1.4.pptx Chapter 1.4.pptx DISCREATE MATH
Chapter 1.4.pptx Chapter 1.4.pptx DISCREATE MATH
JessylyneSophia
 
CMSC 56 | Lecture 3: Predicates & Quantifiers
CMSC 56 | Lecture 3: Predicates & Quantifiers
allyn joy calcaben
 
Quantifiers and its Types
Quantifiers and its Types
HumayunNaseer4
 
Chapter1p2.pptx
Chapter1p2.pptx
sneha510051
 
Discrete Structure Lecture #5 & 6.pdf
Discrete Structure Lecture #5 & 6.pdf
MuhammadUmerIhtisham
 
Predicate Logic and Propositional Logic in Discrete Structure
Predicate Logic and Propositional Logic in Discrete Structure
raazdoss
 
Math
Math
Hafiz Safwan
 
Formal Logic - Lesson 8 - Predicates and Quantifiers
Formal Logic - Lesson 8 - Predicates and Quantifiers
Laguna State Polytechnic University
 
SESSION-11 PPT.pptx
SESSION-11 PPT.pptx
NaniSarath
 
Chapter 01 - p2.pdf
Chapter 01 - p2.pdf
smarwaneid
 
#4 formal methods – predicate logic
#4 formal methods – predicate logic
Sharif Omar Salem
 
Predicate_Logic.pdf
Predicate_Logic.pdf
KiranNats
 

More Related Content

Viewers also liked (10)

Quantification
Quantification
Abdur Rehman
 
1997 AFTA Commendation
1997 AFTA Commendation
SUSANNE OLSEN
 
Chapter 5.0
Chapter 5.0
sotlsoc
 
Assignement code
Assignement code
Syed Umair
 
Chapter 5.3
Chapter 5.3
sotlsoc
 
Nested quantifiers
Nested quantifiers
Ali Saleem
 
Graphs
Graphs
Ali Saleem
 
Lecture 2 predicates quantifiers and rules of inference
Lecture 2 predicates quantifiers and rules of inference
asimnawaz54
 
Vb.net (loop structure)
Vb.net (loop structure)
Abhishek Pachisia
 
Introduction to VB.NET - UP SITF
Introduction to VB.NET - UP SITF
John Patrick Oliveros
 
1997 AFTA Commendation
1997 AFTA Commendation
SUSANNE OLSEN
 
Chapter 5.0
Chapter 5.0
sotlsoc
 
Assignement code
Assignement code
Syed Umair
 
Chapter 5.3
Chapter 5.3
sotlsoc
 
Nested quantifiers
Nested quantifiers
Ali Saleem
 
Lecture 2 predicates quantifiers and rules of inference
Lecture 2 predicates quantifiers and rules of inference
asimnawaz54
 

Similar to Nested loop (20)

Chapter 1.4.pptx Chapter 1.4.pptx DISCREATE MATH
Chapter 1.4.pptx Chapter 1.4.pptx DISCREATE MATH
JessylyneSophia
 
CMSC 56 | Lecture 3: Predicates & Quantifiers
CMSC 56 | Lecture 3: Predicates & Quantifiers
allyn joy calcaben
 
Quantifiers and its Types
Quantifiers and its Types
HumayunNaseer4
 
Chapter1p2.pptx
Chapter1p2.pptx
sneha510051
 
Discrete Structure Lecture #5 & 6.pdf
Discrete Structure Lecture #5 & 6.pdf
MuhammadUmerIhtisham
 
Predicate Logic and Propositional Logic in Discrete Structure
Predicate Logic and Propositional Logic in Discrete Structure
raazdoss
 
Math
Math
Hafiz Safwan
 
Formal Logic - Lesson 8 - Predicates and Quantifiers
Formal Logic - Lesson 8 - Predicates and Quantifiers
Laguna State Polytechnic University
 
SESSION-11 PPT.pptx
SESSION-11 PPT.pptx
NaniSarath
 
Chapter 01 - p2.pdf
Chapter 01 - p2.pdf
smarwaneid
 
#4 formal methods – predicate logic
#4 formal methods – predicate logic
Sharif Omar Salem
 
Predicate_Logic.pdf
Predicate_Logic.pdf
KiranNats
 
Discrete Mathematics: Lecture 2 - Predicate Logic
Discrete Mathematics: Lecture 2 - Predicate Logic
saharsoussa
 
Predicates and Quantifiers
Predicates and Quantifiers
Istiak Ahmed
 
Predicates and quantifiers
Predicates and quantifiers
Istiak Ahmed
 
Disc.Math-ppt.pptx it is very informative presentation for bachelor students ...
Disc.Math-ppt.pptx it is very informative presentation for bachelor students ...
aligohark35
 
m.a.t.h.e.m.a.t.i.c.s.d.i.s.c.r.e.t.e.pptx
m.a.t.h.e.m.a.t.i.c.s.d.i.s.c.r.e.t.e.pptx
ImeeCabactulan2
 
Predicate Logic
Predicate Logic
giki67
 
CPSC 125 Ch 1 sec 3
CPSC 125 Ch 1 sec 3
David Wood
 
Ex 1.5 Nested Quantifiers.pptxd dnsnsnndj
Ex 1.5 Nested Quantifiers.pptxd dnsnsnndj
f20242661202
 
Chapter 1.4.pptx Chapter 1.4.pptx DISCREATE MATH
Chapter 1.4.pptx Chapter 1.4.pptx DISCREATE MATH
JessylyneSophia
 
CMSC 56 | Lecture 3: Predicates & Quantifiers
CMSC 56 | Lecture 3: Predicates & Quantifiers
allyn joy calcaben
 
Quantifiers and its Types
Quantifiers and its Types
HumayunNaseer4
 
Discrete Structure Lecture #5 & 6.pdf
Discrete Structure Lecture #5 & 6.pdf
MuhammadUmerIhtisham
 
Predicate Logic and Propositional Logic in Discrete Structure
Predicate Logic and Propositional Logic in Discrete Structure
raazdoss
 
SESSION-11 PPT.pptx
SESSION-11 PPT.pptx
NaniSarath
 
Chapter 01 - p2.pdf
Chapter 01 - p2.pdf
smarwaneid
 
#4 formal methods – predicate logic
#4 formal methods – predicate logic
Sharif Omar Salem
 
Predicate_Logic.pdf
Predicate_Logic.pdf
KiranNats
 
Discrete Mathematics: Lecture 2 - Predicate Logic
Discrete Mathematics: Lecture 2 - Predicate Logic
saharsoussa
 
Predicates and Quantifiers
Predicates and Quantifiers
Istiak Ahmed
 
Predicates and quantifiers
Predicates and quantifiers
Istiak Ahmed
 
Disc.Math-ppt.pptx it is very informative presentation for bachelor students ...
Disc.Math-ppt.pptx it is very informative presentation for bachelor students ...
aligohark35
 
m.a.t.h.e.m.a.t.i.c.s.d.i.s.c.r.e.t.e.pptx
m.a.t.h.e.m.a.t.i.c.s.d.i.s.c.r.e.t.e.pptx
ImeeCabactulan2
 
Predicate Logic
Predicate Logic
giki67
 
CPSC 125 Ch 1 sec 3
CPSC 125 Ch 1 sec 3
David Wood
 
Ex 1.5 Nested Quantifiers.pptxd dnsnsnndj
Ex 1.5 Nested Quantifiers.pptxd dnsnsnndj
f20242661202
 
Ad

Recently uploaded (20)

Q1_TLE 8_Week 1- Day 1 tools and equipment
Q1_TLE 8_Week 1- Day 1 tools and equipment
clairenotado3
 
Photo chemistry Power Point Presentation
Photo chemistry Power Point Presentation
mprpgcwa2024
 
F-BLOCK ELEMENTS POWER POINT PRESENTATIONS
F-BLOCK ELEMENTS POWER POINT PRESENTATIONS
mprpgcwa2024
 
IIT KGP Quiz Week 2024 Sports Quiz (Prelims + Finals)
IIT KGP Quiz Week 2024 Sports Quiz (Prelims + Finals)
IIT Kharagpur Quiz Club
 
GREAT QUIZ EXCHANGE 2025 - GENERAL QUIZ.pptx
GREAT QUIZ EXCHANGE 2025 - GENERAL QUIZ.pptx
Ronisha Das
 
2025 Completing the Pre-SET Plan Form.pptx
2025 Completing the Pre-SET Plan Form.pptx
mansk2
 
INDUCTIVE EFFECT slide for first prof pharamacy students
INDUCTIVE EFFECT slide for first prof pharamacy students
SHABNAM FAIZ
 
Gladiolous Cultivation practices by AKL.pdf
Gladiolous Cultivation practices by AKL.pdf
kushallamichhame
 
Birnagar High School Platinum Jubilee Quiz.pptx
Birnagar High School Platinum Jubilee Quiz.pptx
Sourav Kr Podder
 
OBSESSIVE COMPULSIVE DISORDER.pptx IN 5TH SEMESTER B.SC NURSING, 2ND YEAR GNM...
OBSESSIVE COMPULSIVE DISORDER.pptx IN 5TH SEMESTER B.SC NURSING, 2ND YEAR GNM...
parmarjuli1412
 
How to use _name_search() method in Odoo 18
How to use _name_search() method in Odoo 18
Celine George
 
YSPH VMOC Special Report - Measles Outbreak Southwest US 6-14-2025.pptx
YSPH VMOC Special Report - Measles Outbreak Southwest US 6-14-2025.pptx
Yale School of Public Health - The Virtual Medical Operations Center (VMOC)
 
Hurricane Helene Application Documents Checklists
Hurricane Helene Application Documents Checklists
Mebane Rash
 
How to use search fetch method in Odoo 18
How to use search fetch method in Odoo 18
Celine George
 
How to Customize Quotation Layouts in Odoo 18
How to Customize Quotation Layouts in Odoo 18
Celine George
 
How to Manage Different Customer Addresses in Odoo 18 Accounting
How to Manage Different Customer Addresses in Odoo 18 Accounting
Celine George
 
Romanticism in Love and Sacrifice An Analysis of Oscar Wilde’s The Nightingal...
Romanticism in Love and Sacrifice An Analysis of Oscar Wilde’s The Nightingal...
KaryanaTantri21
 
English 3 Quarter 1_LEwithLAS_Week 1.pdf
English 3 Quarter 1_LEwithLAS_Week 1.pdf
DeAsisAlyanajaneH
 
A Visual Introduction to the Prophet Jeremiah
A Visual Introduction to the Prophet Jeremiah
Steve Thomason
 
Pests of Maize: An comprehensive overview.pptx
Pests of Maize: An comprehensive overview.pptx
Arshad Shaikh
 
Q1_TLE 8_Week 1- Day 1 tools and equipment
Q1_TLE 8_Week 1- Day 1 tools and equipment
clairenotado3
 
Photo chemistry Power Point Presentation
Photo chemistry Power Point Presentation
mprpgcwa2024
 
F-BLOCK ELEMENTS POWER POINT PRESENTATIONS
F-BLOCK ELEMENTS POWER POINT PRESENTATIONS
mprpgcwa2024
 
IIT KGP Quiz Week 2024 Sports Quiz (Prelims + Finals)
IIT KGP Quiz Week 2024 Sports Quiz (Prelims + Finals)
IIT Kharagpur Quiz Club
 
GREAT QUIZ EXCHANGE 2025 - GENERAL QUIZ.pptx
GREAT QUIZ EXCHANGE 2025 - GENERAL QUIZ.pptx
Ronisha Das
 
2025 Completing the Pre-SET Plan Form.pptx
2025 Completing the Pre-SET Plan Form.pptx
mansk2
 
INDUCTIVE EFFECT slide for first prof pharamacy students
INDUCTIVE EFFECT slide for first prof pharamacy students
SHABNAM FAIZ
 
Gladiolous Cultivation practices by AKL.pdf
Gladiolous Cultivation practices by AKL.pdf
kushallamichhame
 
Birnagar High School Platinum Jubilee Quiz.pptx
Birnagar High School Platinum Jubilee Quiz.pptx
Sourav Kr Podder
 
OBSESSIVE COMPULSIVE DISORDER.pptx IN 5TH SEMESTER B.SC NURSING, 2ND YEAR GNM...
OBSESSIVE COMPULSIVE DISORDER.pptx IN 5TH SEMESTER B.SC NURSING, 2ND YEAR GNM...
parmarjuli1412
 
How to use _name_search() method in Odoo 18
How to use _name_search() method in Odoo 18
Celine George
 
Hurricane Helene Application Documents Checklists
Hurricane Helene Application Documents Checklists
Mebane Rash
 
How to use search fetch method in Odoo 18
How to use search fetch method in Odoo 18
Celine George
 
How to Customize Quotation Layouts in Odoo 18
How to Customize Quotation Layouts in Odoo 18
Celine George
 
How to Manage Different Customer Addresses in Odoo 18 Accounting
How to Manage Different Customer Addresses in Odoo 18 Accounting
Celine George
 
Romanticism in Love and Sacrifice An Analysis of Oscar Wilde’s The Nightingal...
Romanticism in Love and Sacrifice An Analysis of Oscar Wilde’s The Nightingal...
KaryanaTantri21
 
English 3 Quarter 1_LEwithLAS_Week 1.pdf
English 3 Quarter 1_LEwithLAS_Week 1.pdf
DeAsisAlyanajaneH
 
A Visual Introduction to the Prophet Jeremiah
A Visual Introduction to the Prophet Jeremiah
Steve Thomason
 
Pests of Maize: An comprehensive overview.pptx
Pests of Maize: An comprehensive overview.pptx
Arshad Shaikh
 
Ad

Nested loop

  • 1. Nepal College of Informaiton Technology Balkumari, Lalitpur May 18, 2010 ॐ NEPAL COLLEGE OF INFORMATION TECHNOLOGY  _ _ _ _ _ _ _ _ _ _ _ _ 2001
  • 2. make statements about individual subjects predicate P(x) has two parts: variable ‘x’ is the subject of statement propositional function P is the property that the subject can have property of an inference May 18, 2010
  • 3. property of description of subject in “domain or universe of discourse” P(x) predicate two condition: all values of ‘x’ true some values of ‘x’ true May 18, 2010 ‘ n’ objects ‘ x’ values
  • 4. dynamic in nature logic operator are used so called predicate logic quantifiers & variables are used & variables bound the quantifier (universal or existential or both) i.e. symbolic logic May 18, 2010
  • 5. P(x) : “x is man” For all values of ‘x’, if P(x) is true then  x P(x) exists For some values of ‘x’, if P(x) is true then  x P(x) exists “ All students in this class love discrete structure.”  x love(x, discrete structure) “ All student love some subject.”  x  y love(x, y) May 18, 2010
  • 6. Two quantifiers are nested if one is within the scope of the other, such as ∀ x ∃y (x + y = 0) Everything within the scope of a quantifier can be thought of as a propositional function. Define the propositional functions Q(x) : ∃y P(x, y) P(x, y) : x + y = 0 Then, we have ∀ x ∃y (x + y = 0) ≡ ∀x ∃y P(x, y) ≡ ∀x Q(x) . May 18, 2010
  • 7. Translation of nested quantifiers can be done by: write out what the quantifiers and predicates in the expression means convert this meaning into a simpler sentence without using any of the variables Statements involving nested quantifiers can be negated by applying the rules for negating statements involving a single quantifier Table : Negating Quantifiers May 18, 2010 Negation Equivalent Statement When Is Negation True? When False?  x P ( x )  x P ( x )  x  P ( x )  x  P ( x ) For every x , P ( x ) is false. There is an x for which P ( x ) is false. There is an x for which P ( x ) is true. P ( x ) is true for every x .
  • 8. For example, to evaluate  x  y P(x, y) we loop through all the values of x , and for each x we loop through all the values of y. Table : Quantifications of Two Variables May 18, 2010 Statement When True? When False?  x  y P(x, y)  y  x P(x, y) P(x, y) is true for every pair x, y. There is a pair x, y for which P(x, y) is false.  x  y P(x, y) For every x there is a y for which P(x, y) is true. There is an x such that P(x, y) is false for all y.  x  y P(x, y) There is an x for which P(x, y) is true for all y. For every x there is a y for which P(x, y) is false.  x  y P(x, y)  y  x P(x, y) There is a pair x, y for which P(x, y) is true. P(x, y) is false for every pair x, y.
  • 9. Example: Translate the statement “The sum of two positive integers is always positive” into a logical expression. Solution: May 18, 2010
  • 10. K. Rosen, “ Discrete Mathematical Structures with Applications to Computer Science, WCB/ Mcgraw Hill ”, edition 6 2006 http://www.slideshare.net/../predicate-logic www.cs.odu.edu/~toida/nerzic/conten .. www.earlham.edu/../terms3.htm May 18, 2010
  • 11. If you have any suggestion then let me know. May 18, 2010