離散數(shù)學英文講義:1-3 Predicates and Quantifiers_第1頁
離散數(shù)學英文講義:1-3 Predicates and Quantifiers_第2頁
離散數(shù)學英文講義:1-3 Predicates and Quantifiers_第3頁
離散數(shù)學英文講義:1-3 Predicates and Quantifiers_第4頁
離散數(shù)學英文講義:1-3 Predicates and Quantifiers_第5頁
已閱讀5頁,還剩48頁未讀 繼續(xù)免費閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領

文檔簡介

1、L o g oL o g o1Discrete MathematicsDr. Han HuangSouth China University of TechnologyL o g oL o g o2Section 1.3Chapter 1. Logic and Proof, Sets, and FunctionL o g oL o g oContentsIntroduction of Predicates1Quantifiers2 Binding Variable3Translation4 Application Example5L o g oL o g oIntroduction of Pr

2、edicatesL o g oL o g oPredicate LogicvWe can use propositional logic to prove that certain real-life inferences are valid. If its cold then it snows. If it snows there are accidents There are no accidents. Therefore: Its not coldvIn propositional logic:(cs sa a) c) is a tautologyL o g oL o g oPredic

3、atevStatement involving variables, such asv“x3,” “x=y+3,” and “x+y=z”vThese statement are neither true nor false when the values of the variables are not specified.L o g oL o g oPropositional FunctionvLets denote “greater than 3” by P(x), where the predicate is “greater than 3” and x is the variable

4、.vP(x) is said to be the value of the propositional function at x.vExample 1: Let P(x) denote “x3”. What is the truth values of P(4) and P(2)?vP(4): 43, TruevP(2): 23, FalseL o g oL o g oExample 2vLet Q(x,y) denote the statement “x=y+3.” What are the truth values of the propositions Q(1,2) and Q(3,0

5、)?vQ(1,2): “1=2+3” is falsevQ(3,0): “3=0+3” is TrueL o g oL o g oExample 3vWhat are the truth values of the propositions R(1,2,3) and R(0,0,1), where R(x,y,z) denotes “x+y=z”?vR(1,2,3): “1+2=3” is True.R(0,0,1): “0+0=1” is False.vExample 4v P(x): If x0 then x=x+1.L o g oL o g oPropositional Function

6、vIn general, a statement involving the n variables x1, x2, xn can be denoted by P(x1, x2, xn ).vA statement of the form P(x1, x2, xn ) is the value of the propositional function P at the n-tuple (x1, x2, xn ), and P is also called a predicate.L o g oL o g oQuantifiersL o g oL o g oQuantifier Express

7、ionsvQuantifiers provide a notation that allows us to quantify (count) how many objects in the u.d. satisfy a given predicate.v“” is the FOR ALL or universal quantifier. “” is the EXISTS or existential quantifier.vFor example, x P(x) and x P(x) are propositionsL o g oL o g oUniversal Quantification

8、vDefinition 1: The universal quantification of P(x) is the proposition “P(x) is true for all values of x in the universe or discourse”.vuniversal quantification of x is denoted as x .vThe proposition x P(x) is read asv“for all x P(x) ” or “for every x P(x) ”vUniverse of Discourse or DomainL o g oL o

9、 g oExample: Let the u.d. be parking spaces at UF.Let P(x) be the prop. form “x is occupied”Then the universal quantification of P(x), x P(x), is the proposition: “All parking spaces at UF are occupied.” “For each parking space at UF, that space is full.”vBefore proceeding, we need to distinguish be

10、tween two kinds of variablesL o g oL o g oExample 4vLet P(x) be the statement “x +1 x.” What is the truth value of the quantifications x P(x), where the universe of dicourse consists of all real numbers?vSolution: Since P(x) is true for all real numbers x, the quantification x P(x) is trueL o g oL o

11、 g oCounterexamplevTo show that a statement of the form x P(x) is a propositional function, we need only find one value of x in the universe of discourse for P(x) is false.vSuch value of x is called a counterexample to the statement x P(x).L o g oL o g oExample 5vLet Q(x) be the statement “x=x) if t

12、he universe of discourse consists of all real numbers and what is its truth value if the universe of discourse consists of all integers?vSolution: x (x2=x) is false if the universe of discourse consists of all real numbers (since it is false for 0 x=x) is true if the universe of discourse consists o

13、f all real integers.L o g oL o g oExistential QuantifiervWith existential quantification, we form a proposition that is true if and if only for P(x) is true for at least one value of x in the universe of discourse.vDefinition 2:v“There exists an element x in the universe of discourse such that P(x)

14、is true.”v is called existential quantifier.L o g oL o g oMeaning of Quantified Expressionsv x P(x) means there exist x in the u.d. (that is, 1 or more) such that P(x) is true.v x P(x) is read asv“There is an x such that P(x),”v“There is at least x such that P(x),”vorv“For some x P(x) ”L o g oL o g

15、oExample: Let the u.d. be the parking spaces at UF.Let P(x) mean “x is full.”Then the existential quantification of P(x), x P(x), is the proposition saying that “Some parking space(s) at UF is/are full.” “There is a parking space at UF that is full.” “At least one parking space at UF is full.”L o g

16、oL o g oExample 8vLet P(x) denote the statement “x 3.” What is the truth value x P(x), where x is real number.vSolution: Since “x 3” is true, for instance, when x=4. Thus, x P(x) is true.L o g oL o g oExample 9vLet Q(x) denote the statement “x = x + 1.” What is the truth value x Q(x), where x is rea

17、l number.vSolution: Since Q(x) is false for every real number, x Q (x) is false.L o g oL o g ov x P(x) vWhen Ture? P(x) is true for every x.vWhen False? There is an x for which P(x) is false.v x P(x)vWhen Ture? There is an x for which P(x) is true.vWhen False? P(x) is false for every x.L o g oL o g

18、oQuantifierv x P(x)vP(x) is true for every x.vThere is an x for which P(x) is false.vP(x1) P(x2) P(xn) is true if and only if P(x1),P(x2),P(xn) are all true.v x P(x)vThere is an x for which P(x) is false. vP(x) is false for every x.vP(x1) P(x2) P(xn) is true if and only if at least one of P(x1),P(x2

19、),P(xn) is true.L o g oL o g oBinding VariableL o g oL o g ovWhen a quantifier is used on the variable, we say that this occurrence of the variable is bound.vAn occurrence of a variable that is not bound by quantifier or set equal to a particular value is said to be free.L o g oL o g oFree and Bound

20、 VariablesvAn expression like P(x) is said to have a free variable x (i.e., x is not “defined”).vA quantifier (either or ) operates on an expression having one or more free variables, and binds one or more of those variables, to produce an expression having one or more bound variables.L o g oL o g o

21、Example of BindingvP(x,y) has 2 free variables, x and y.vx P(x,y) has 1 free variable, and one bound variable. Which is which?vFree because it is not bound by a quantifier and no value is assigned to this variable.L o g oL o g ovOccurrences of variables that are not free are bound.vTest your underst

22、anding: Which (if any) variables are free in x P(x)x P(x) yQ(x) xP(b) (NB, b is a constant) x( y R(x,y)L o g oL o g ovOccurrences of variables that are not free are bound.vCheck your understanding: Which (if any) variables are free in x P(x) no free variablesx P(x) no free variables yQ(x) x is free

23、xP(b) (NB, b is a constant) no free var. x( y R(x,y) no free variablesL o g oL o g oNegationsvx P(x) is the statement “Every student in the class has taken a course in calculus.”vx P(x) x P(x) vIt is the statement “There is a student in the class has not taken a course in calculus.”L o g oL o g oNeg

24、ationsv x P(x) is the statement “There is a student in the class has taken a course in calculus.”v x P(x) x P(x) vIt is the statement “Every student in the class has not taken a course in calculus.”L o g oL o g oNegating Quantifiersv x P(x) x P(x)vWhen is Negation Ture? For every x, P(x) is false.vW

25、hen False? There is an x for which P(x) is true.vx P(x) x P(x)vWhen is Negation Ture? There is an x for which P(x) is false.vWhen False? P(x) is true for every x.L o g oL o g oDe Morgans lawsv (p(x1) p(x2 ) p(xn)v= p(x1 ) p(x2 ) p(xn)v (p(x1) p(x2 ) p(xn)v= p(x1 ) p(x2 ) p(xn)L o g oL o g oExample 1

26、0vWhat are the negations of the statements “There is an honest politician” and “All Americans eats cheeseburgers?”vSolution: Let H(x) denote “x is honest.”v“There is an honest politician.” v x H(x) x H(x) x H(x) vLet C(x) denote “x eats cheeseburgers.”v“All Americans eats cheeseburgers?”v x C(x) x C

27、(x) x C(x) L o g oL o g oExample 11vNegations of the statements x ( x2 x) and x ( x2 = 2 ) x ( x2 x) x ( x2 x) x ( x2 = x) x ( x2 = 2 ) x ( x2 = 2 ) x ( x2 != 2 ) L o g oL o g oTranslationL o g oL o g oExample 12vExpress the statement “Every student in this class has studied calculus” using predicat

28、es and quantifier.v“x is in this class ” denoted as S(x)v“x has studied calculus” denoted as C(x)vThe statement can be expressed as:v x (S(x) C(x) vbut not x (S(x) C(x) L o g oL o g ov“x has studied subject y” denoted as Q(x,y)v“Every student in this class has studied calculus”v x (S(x) Q(x , calcul

29、us)L o g oL o g oExample 13vExpress the statement “Some student in this class has visited Mexico” and “Every student in this class has visited either Canada or Mexico” using predicates and quantifier.v“x is a student in this class” is denoted as S(x)v“x has visited Mexico” is denoted as M(x) v“x has

30、 visited Canada” is denoted as C(x)v x (S(x) C(x) but not x (S(x) C(x) v x (S(x) (C(x) M(x) ?L o g oL o g ov“For every person x, if x is a student in this class, then x has visited Mexico or x has visited Canada”v x (S(x) (C(x) M(x)v“x has visited country y” is represented as V(x,y)v x (S(x) (V (x ,

31、 Mexico) V (x , Canada)L o g oL o g oApplication ExampleL o g oL o g oExamples from Lewis CarrolvLewis Carrol (really C.L. Dodgson writing under a pseudonym), the author of Alice in Wonderland, is also the author of several works on symbolic logic.vThe given examples illustrate how quantifiers are u

32、sed to express various type of statement.L o g oL o g oExample 13v“All lions are fierce”v“Some lions do not drink coffee”v“Some fierce creatures do not drink coffee”v “x is lions” P(x) “x is fierce” Q(x) v “x drink coffee” R(x)v x (P(x) Q(x) x (P(x) R(x)v x (Q(x) R(x) v but not x (Q(x) R(x) L o g oL o g oExample 14v“All humming birds are richly colored.”v“No large birds live on honey.”v“Birds that do not live on honey are dull

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
  • 6. 下載文件中如有侵權(quán)或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論