离散数学英文讲义:1-3 Predicates and Quantifiers_第1页
离散数学英文讲义:1-3 Predicates and Quantifiers_第2页
离散数学英文讲义:1-3 Predicates and Quantifiers_第3页
离散数学英文讲义:1-3 Predicates and Quantifiers_第4页
离散数学英文讲义:1-3 Predicates and Quantifiers_第5页
已阅读5页,还剩48页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

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. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论