Attribution Non-Commercial (BY-NC)

18 views

Lecture 07

Attribution Non-Commercial (BY-NC)

- Traffic Light 2 way
- Logic 2
- Promotion Policy 2018.doc
- Logical Connective s
- document.pdf
- Adams, Truth Values & the Value of Truth [16 pgs]
- CMSC 56 Handout 1 - Syntax and Semantics of Propositional Logic
- 2006 _soluation
- COMP 232 lecture notes
- 21 Greedy
- LAB MANUAL Updated(1).pdf
- CS2351 - Artificial Intelligence-2 Marks
- Shansho 2EXP
- A Dynamic Epistemic Logic
- List of Mathematical Symbols
- DS Ch1a Propositonal Logic Handout
- Adg Siamjc
- Prob 002
- WriteUp IDSECCONF 2017
- Slides Algo-Inversions2 Typed

You are on page 1of 7

Other Quantifiers Universal and existential quantifiers are the most important quantifiers. However many other quantifiers can be defined such as the uniqueness quantifier, quantifiers with restricted domains. Actually using two essential quantifiers and propositional logic we can express the other quantifiers. Precedence of Quantifiers The quantifiers and have higher precedence than all logical operators of logical calculus. Binding Variables When a quantifier is used on the variable x, we say that this occurrence of the variables is bound. An occurrence of a variable that is not bound to particular value is said to be free. To turn a propositional function into a proposition, all variables in a proposition must be bound or a particular value must be assigned to them. This can be done using a combination of quantifiers (universal, existential) and value assignments. The part of a logical expression to which a quantifier is applied is called the scope of this quantifier. Thus a variable is free if it is outside the scope of all quantifiers. Example: In x(x+y=1), the variable x is bound by existential quantification, but y is free, because it is not bound by a quantifier and no value is assigned. Logical Equivalences Involving Quantifiers We have seen the notion of logical equivalences of compound propositions. We can extend this notion to expressions involving predicate and quantifiers. Definition 3 Statements involving predicates and quantifiers are logically equivalent if and only if they have the same truth value independent of predicates and the domain. Example19. Show that x(P(x)Q(x)) and x P(x) x Q(x) are logically equivalent.

1 PDF created with pdfFactory Pro trial version www.pdffactory.com

10/4/06

Solution: If x(P(x)Q(x)) is true, then for every a in the domain P(a)Q(a) is true. Then of course P(a) is true and Q(a) is true. Since P(a) is true and Q(a) is true for every element in the domain, x P(x) and x Q(x) are both true. This means x P(x) x Q(x) is true. If x P(x) x Q(x) is true, then x P(x) is true and x Q(x) is true. So if a is in the domain, then P(a) is true and Q(a) is true. This means then P(a)Q(a) is true for all a in the domain. This is x(P(x)Q(x)) is true. So x(P(x)Q(x)) x P(x)x Q(x). Negating Quantified Expressions Some times we need to negate a quantified expression. Negation of universal quantifier: Every student in your class has taken a course in calculus. Let P(x) be x has taken a course in calculus and the domain be all students in the class. So the statement is x P(x). Negation: Not every student in your class has taken a course in calculus. This means There is at least one student in the class who has not taken a class in calculus. This is simply the existential quantification of the negation of the original propositional function: x P(x). Therefore x P(x) x P(x). Verification: x P(x) is true if and only if x P(x) is false. This can happen if and only if there is an x in the domain for which P(x) is false. This happens if and only if there is an x in the domain for which P(x) is true. Therefore there is an x in the domain for which P(x) is true if and only if x P(x) is true. Thus x P(x) and x P(x) are logically equivalent. Negation of existential quantifier: There is a student in the class who has taken a course in calculus.

Math 1019 B, Lecture 06, Last printed on 10/4/06

The statement is the existential quantification x Q(x), where Q(x) is the statement x has taken a course in calculus. So negation is It is not the case that there is a student in the class who has taken a course in calculus.

2 PDF created with pdfFactory Pro trial version www.pdffactory.com

10/4/06

This is equivalent to Every student in this class has not taken a course in calculus. This is just the universal quantification of the negation of the original propositional function: x Q(x) x Q(x). Proof: Let Q(x)=T(x). Since x T(x) x T(x) we get x T(x) x T(x) and so x T(x) x T(x). Thus x Q(x) x Q(x). Example 20 What are the negations of the statements There is an honest politician And All Americans eat cheeseburgers? Solution: Let H(x) be x is honest. So the statement There is an honest politician is represented by x H(x), where the domain consists of all politicians. The negations is x H(x) x H(x) and expressed as Every politician is dishonest. Let C(x) be x eats cheeseburgers. Then All Americans eat cheeseburgers is represented by x C(x), where the domain consists of all Americans. The negation is x C(x) x C(x) and means There is an American who does not eat cheeseburgers. Example 21 What are the negations of the statements x (x 2 >x) and x(x 2 =2) ? Solution: x (x 2 >x)= x(x 2 >x)= x(x 2 =<x), x(x 2 =2)= x (x 2 =2)= x (x 2 2). Example 22 Show that x (P(x) Q(x)) x(P(x) Q(x)). Solution: By De Morgans Law for quantifiers, x (P(x) Q(x))= x(P(x) Q(x))= x(P(x)Q(x))= x(P(x)Q(x)).

Translating from English into logical expressions Translating sentences in English into logical expressions is a crucial task in: Mathematics, Logic programming, Artificial intelligence, Software engineering, Many other disciplines.

3 PDF created with pdfFactory Pro trial version www.pdffactory.com

We used propositions and logical operators to translate English sentences to logical expressions. With quantifiers involving, translation is more complex and there might be many ways of translating a particular sentence. Example 23 Express Every student in this class has studied calculus using predicates and quantifiers. Solution: Every: ; student in this class: x; x has studied calculus: C(x). So the statement is x C(x). If we change the domain to consist of all people, then the statement is expressed as For every person x, if person x is student in this class, then x has studied calculus. Denoting person x is student in this class with S(x), the statement is then x (S(x)C(x)). Simplest way is the best way! Example 24 Express Some student in this class has studied calculus and Every student in this class has studied calculus or music using predicates and quantifiers. Solution: (I) Some student: there is/exists a student -- x; students in this class: domain; x has studied calculusC(x). So the statement is x C(x). (II) Students in this class: domain; every student: x; x studied calculus: C(x); x studied music: M(x). So x(C(x) or M(x))= x(C(x) M(x)). If we are also interested in people who is not student, then (III) All person: domain; person x is student in this class: S(x); every person: x; x has studied calculus: C(x); x has studied music: M(x). So the statement is x(S(x) (C(x) M(x)), in words For every x, if x is in this class, x has studied calculus or x has studied music. Using Quantifiers in System Specifications To represent system specifications not only propositions are used, but also predicates and quantifications can be used.

4 PDF created with pdfFactory Pro trial version www.pdffactory.com

Example 25. Use predicates and quantifiers to express the system specifications Every mail message larger than one megabyte will be compressed and If a user is active, at least one network link will be available. Solution: Let S(m, y) be Mail message m is larger than y megabyte, where the variable m has the domain of all mail messages and the variable y is a positive real number, and let C(m) denote Mail message m will be compressed. So the first message can be expressed as x(S(m,1) C(m)). Let A(u) represent User u is active, where the variable u has the domain of all users, let N(n, s) be Network link n is in state s, where the variable n has the domain of all network links and s has the domain of all possible states for a network link. Then the expression is: x A(u) n N(n, available). Examples by Lewis Carroll Example 26 Consider these statements. The first two are premises and the third is the conclusion. All lions are fierce. Some lions do not drink coffee. Some fierce creatures do not drink coffee. Solution: Let P(x),Q(x) and R(x) be the statements x is a lion, x is fierce and x drinks coffee. respectively. Let the domain consists of all creatures. Now the statements are: x (P(x)Q(x)). x (P(x)R(x)). x (Q(x) R(x)). Not okay: x (P(x) R(x)). x (Q(x) R(x)). Not exact -- both are true even if P(x) and Q(x) both are not true! Example 27 Consider these statements. The first three are premises and the fourth is a valid conclusion. All hummingbirds are richly colored. No large birds live on honey.

5 PDF created with pdfFactory Pro trial version www.pdffactory.com

Birds that do not live on honey are dull in color. Hummingbirds are small. Solution: Let P(x): x is a hummingbird , Q(x): x is large, R(x): x lives on honey, S(x) : x is richly colored. Let the domain consists of all birds. So the statements are: x (P(x)S(x)). x (Q(x)R(x)). x (R(x) S(x)). x (P(x) Q(x)). Logic Programming An important type of programming language is designed to reason using the rules of predicate logic. Prolog. Prolog programs include a set of declarations consisting of two types of statements, Prolog facts and Prolog rules. Prolog facts define predicates by specifying the elements that satisfy these predicates. Prolog rules are used to define new predicates using those already defined by Prolog facts. Example 28 Consider a Prolog program given facts telling it the instructor of each class and in which classes students are enrolled. The program uses these facts to answer queries concerning the professors who teach particular students. Such a programs could use the predicates instructor(p, c) and enrolled(s, c) to represent that professor p is the instructor of course c and that the student s is enrolled in course c , respectively. For example, the Prolog facts in such a program might include:

instructor(chan, math273) instructor(patel, ee222) instructor(grossman, cs301) enrolled(kevin, math273) enrolled(juana, ee222) enrolled(juana, cs301) enrolled(kiko, math273) enrolled(kiko, cs301)

A new predicate teaches(p, s), representing that professor p teaches student s, can be defined using the prolog rule

teaches (P, S): - instructor(P, C), enrolled(S, C)

which means that teaches(p, s) is true if there exists a class c such that professor p is the instructor of class c and student s is enrolled in class c. Remark: , is and; ; is or, ? is query. The query Is Kevin enrolled in math273 ?, ? enrolled(kevin, math273) the answer: yes. The query who is enrolled in math273 ?, ? enrolled(X, math273) the answer: kevin kiko The query who are the instructors of classes taken Juana ?, ? teaches(X, juana) the answer: patel grossman

- Traffic Light 2 wayUploaded byMychon Kan
- Logic 2Uploaded byAmber Habib
- Promotion Policy 2018.docUploaded byibrahim khan
- Logical Connective sUploaded byAisha Khatoon
- document.pdfUploaded byIskandar Agung Agung
- Adams, Truth Values & the Value of Truth [16 pgs]Uploaded bygzalzalkovia
- CMSC 56 Handout 1 - Syntax and Semantics of Propositional LogicUploaded byCK Luna
- 2006 _soluationUploaded bySurajit Dutta
- COMP 232 lecture notesUploaded byHugo Cornellier
- 21 GreedyUploaded byTemam Abba Magal
- LAB MANUAL Updated(1).pdfUploaded byTiff Nguyen
- CS2351 - Artificial Intelligence-2 MarksUploaded byVignesh Vicky
- Shansho 2EXPUploaded byimasri
- A Dynamic Epistemic LogicUploaded byfrankynevin1
- List of Mathematical SymbolsUploaded byAntonio C. Keith
- DS Ch1a Propositonal Logic HandoutUploaded byHoàng Nguyễn Nhật Minh
- Adg SiamjcUploaded byKevin Mondragon
- Prob 002Uploaded byCik Wardah
- WriteUp IDSECCONF 2017Uploaded byFallCrescent
- Slides Algo-Inversions2 TypedUploaded byigoysingh
- LU Decomposition Assignment MarksUploaded bywhoare rho
- Chapter 4Uploaded byTuan Vinh Tran
- nossdav98Uploaded byMekki Ichkern
- 3. (Digital System) K-map (MZMI).pptUploaded bySyafiq Mazlan
- Ass2 Solution 14Uploaded byHassni Croni
- IJETTCS-2018-05-01-1Uploaded byAnonymous vQrJlEN
- poly syUploaded byJomar Rabajante
- Lab01Uploaded byAnasBinFaisal
- QAM AssignmentUploaded bySahil Saini
- lec09Uploaded byvickyc1593

- Part 1 Ed ProjectUploaded byKhairah A Karim
- In Class ExcercisesUploaded byKhairah A Karim
- Discrete mathUploaded byKhairah A Karim
- ProjectUploaded byKhairah A Karim
- intrduction ArticleUploaded byKhairah A Karim
- DefinitionsUploaded byKhairah A Karim
- Process writing assignmentUploaded byKhairah A Karim
- Article Review SEM A132Uploaded byKhairah A Karim
- 09regresionUploaded byKhairah A Karim
- Homework o LapUploaded byKhairah A Karim
- Comicstrip OptUploaded byKhairah A Karim
- Medication ModelUploaded byKhairah A Karim
- Calorie LossUploaded byKhairah A Karim
- QUALITY CONTROLUploaded byKhairah A Karim
- Mind Map-unemploymentUploaded byKhairah A Karim
- Technical ReportUploaded byKhairah A Karim
- Problem StatementUploaded byKhairah A Karim
- kpUploaded byKhairah A Karim
- Entry 4 PrintUploaded byKhairah A Karim
- INPUT MSCRIPT.docxUploaded byKhairah A Karim
- O.R History July2011 Pg4Uploaded byKhairah A Karim
- O.R History July2011 Pg3Uploaded byKhairah A Karim
- O.R History July2011 Pg1Uploaded byKhairah A Karim
- Chap 007Uploaded byKhairah A Karim
- 2 Correlation & RegressionUploaded bySujit Kumar Naik

- Gospel of Buddha 008430 MbpUploaded byRyan Burton
- 2.Lockbox ApproachUploaded byNaveen Uttarkar
- Kashmiri - ProverbsUploaded byapi-3720996
- St Paul. the Foundation of Universal IsmUploaded byMichael Thorn
- Manual TD 200Uploaded byEduardo_77
- 3 - Lexmark C520 522 524 530 532 534 Service and Parts ManualUploaded byИвайло Колев
- Berlin Normand - Rosencrantz and Guildenstern Are Dead - Theater of CriticismUploaded byFelipe Renam Camargo Mello
- Pega 7 Designer StudioUploaded bySivanand Pattabhi
- assignment 2 pdfUploaded byapi-267407006
- j Clegg Metacognition an Ovwerview of Its Uses in Language-learningUploaded bygaaraujo123
- ControlLogix.pdfUploaded byAnonymous BO7w7T9
- Learning Experience CriteriaUploaded bypaulina_matheus
- IBM_Message_Broker_Practical_Examples_for_SOA.pdfUploaded byvijay_thatte
- Hisham Ibn Abd AlUploaded byBobanMarjanovic
- Machzor for the Ne'Ilah PrayerUploaded byDavidbenYosef
- MySQL Connector Arduino Reference Manual-1.0.4gaUploaded byPrust Rozza
- David Penfield ResumeUploaded byRyan Hill
- ell classroom observationUploaded byapi-270952790
- VisioUploaded byolivewil
- PrototypeUploaded byprak_sophy4252
- english 106 - research poster assignment sheetUploaded byapi-404819199
- 07_OTA105210 OptiX NG-SDH Alarm and Performance Event ISSUE 1.02Uploaded by0983579057
- Essential Windows Command Line Kung-Fu for InfoSec ProsUploaded byapi-3726247
- Rational and Irrational NumbersUploaded byRoberta Gonzales
- NSlookupUploaded byrahul_2554
- reflective essay eportfolioUploaded byapi-257505467
- Nvr Vacron Vdh-nk200Uploaded byAzunahiClementeFlores
- A Semi DetailedUploaded byShane Thea
- C++ InterviewUploaded byVishnuvardhan Vishnu
- A New Aproach to Logiken Latreian in Rom 12Uploaded bySergio Candia