离散数学Exercises

合集下载

离散数学概论习题答案第3章

离散数学概论习题答案第3章

第二部分集合、矩阵、关系和函数集合论是处理集合,函数和关系的数学理论。

集合包括最基本的数学概念,例如集合,元素和成员关系。

在大多数现代数学公式中,集合论提供了一种描述数学对象的语言。

集合可用来表示数及其运算,还可表示和处理非数值计算,如数据间关系的描述等。

集合论,逻辑和一阶逻辑构成了数学公理化的基础。

同时,函数和关系是基于集合的映射,它们是满足某些属性的特殊集合。

接下来,我们将在两个单独的章节中介绍它们。

集和矩阵将在第3章中介绍,而关系和函数将在第4章中介绍。

第三章集合和矩阵3.1 集合3.1.1 集合概念集合没有确定的概念。

一般地,我们把研究的对象统称为元素;把一些元素组成的总体叫做集合,也简称集。

通常用大写英文字母表示集合。

例如,N代表是自然数集合,Z代表是整数集合,R代表是实数集合。

用小写英文字母表示集合内元素。

若元素a是集合A的一个元素,则表示为a A∈,读作元素a属于集合A;若元素a不是集合A的一个元素,则表示为a A∉,读作a不属于集合A。

集合分为有限集合和无限集合两种,下面给出定义。

表示集合方法有列举法和描述法两种方式,下面分别介绍。

1. 列举法当集合是有限集合时,可以列出集合的所有元素,用逗号隔开各元素,并用花括号把所有元素括起来。

这种表述方式为列举法。

例如:S1={a, b, c, d, e, f},S2={a, b, b, c, d, e, f},S3={ d, e, a, b, c, f}上述三个集合S1、S2和S3是相同集合,尽管有重复元素。

且集合元素之间没有次序关系。

一个集合可以作为另个集合的元素。

例如,S1={a, b,{ c, d, e, f }}集合S1包含元素a, b和{ c, d, e, f }。

因为{ c, d, e, f }是集合S1中的元素,故可记为:{}∈。

,,,c d e f A以上给出的集合实例都是有限集合。

当集合是无限集合时,无法列出集合的所有元素,可先列出一部分元素,若剩余元素与已给出元素存在一定规律,那剩余元素的一般形式很明显可用省略号表示。

离散数学(第二版)课后习题答案详解(完整版)

离散数学(第二版)课后习题答案详解(完整版)

离散数学(第⼆版)课后习题答案详解(完整版)习题⼀1.下列句⼦中,哪些是命题?在是命题的句⼦中,哪些是简单命题?哪些是真命题?哪些命题的真值现在还不知道?(1)中国有四⼤发明.答:此命题是简单命题,其真值为 1.(2)5 是⽆理数.答:此命题是简单命题,其真值为 1.(3)3 是素数或 4 是素数.答:是命题,但不是简单命题,其真值为1.(4)2x+ <3 5 答:不是命题.(5)你去图书馆吗?答:不是命题.(6)2 与3 是偶数.答:是命题,但不是简单命题,其真值为0.(7)刘红与魏新是同学.答:此命题是简单命题,其真值还不知道.(8)这朵玫瑰花多美丽呀!答:不是命题.(9)吸烟请到吸烟室去!答:不是命题.(10)圆的⾯积等于半径的平⽅乘以π.答:此命题是简单命题,其真值为 1.(11)只有6 是偶数,3 才能是2 的倍数.答:是命题,但不是简单命题,其真值为0.(12)8 是偶数的充分必要条件是8 能被3 整除.答:是命题,但不是简单命题,其真值为0.(13)2008 年元旦下⼤雪.答:此命题是简单命题,其真值还不知道.2.将上题中是简单命题的命题符号化.解:(1)p:中国有四⼤发明.(2)p: 是⽆理数.(7)p:刘红与魏新是同学.(10)p:圆的⾯积等于半径的平⽅乘以π.(13)p:2008 年元旦下⼤雪.3.写出下列各命题的否定式,并将原命题及其否定式都符号化,最后指出各否定式的真值.(1)5 是有理数.答:否定式:5 是⽆理数. p:5 是有理数.q:5 是⽆理数.其否定式q 的真值为1.(2)25 不是⽆理数.答:否定式:25 是有理数. p:25 不是⽆理数. q:25 是有理数. 其否定式q 的真值为1.(3)2.5 是⾃然数.答:否定式:2.5 不是⾃然数. p:2.5 是⾃然数. q:2.5 不是⾃然数. 其否定式q 的真值为1.(4)ln1 是整数.答:否定式:ln1 不是整数. p:ln1 是整数. q:ln1 不是整数. 其否定式q 的真值为1.4.将下列命题符号化,并指出真值.(1)2 与5 都是素数答:p:2 是素数,q:5 是素数,符号化为p q∧,其真值为 1.(2)不但π是⽆理数,⽽且⾃然对数的底e 也是⽆理数.答:p:π是⽆理数,q:⾃然对数的底e 是⽆理数,符号化为p q∧,其真值为1.(3)虽然2 是最⼩的素数,但2 不是最⼩的⾃然数.答:p:2 是最⼩的素数,q:2 是最⼩的⾃然数,符号化为p q∧? ,其真值为1.(4)3 是偶素数.答:p:3 是素数,q:3 是偶数,符号化为p q∧,其真值为0.(5)4 既不是素数,也不是偶数.答:p:4 是素数,q:4 是偶数,符号化为? ∧?p q,其真值为0.5.将下列命题符号化,并指出真值.(1)2 或3 是偶数.(2)2 或4 是偶数.(3)3 或5 是偶数.(4)3 不是偶数或4 不是偶数.(5)3 不是素数或4 不是偶数.答: p:2 是偶数,q:3 是偶数,r:3 是素数,s:4 是偶数, t:5 是偶数(1)符号化: p q∨,其真值为1.(2)符号化:p r∨,其真值为1.(3)符号化:r t∨,其真值为0.(4)符号化:? ∨?q s,其真值为1.(5)符号化:? ∨?r s,其真值为0.6.将下列命题符号化.(1)⼩丽只能从筐⾥拿⼀个苹果或⼀个梨.答:p:⼩丽从筐⾥拿⼀个苹果,q:⼩丽从筐⾥拿⼀个梨,符号化为: p q∨ .(2)这学期,刘晓⽉只能选学英语或⽇语中的⼀门外语课.答:p:刘晓⽉选学英语,q:刘晓⽉选学⽇语,符号化为: (? ∧∨∧?p q)(p q) .7.设p:王冬⽣于1971 年,q:王冬⽣于1972 年,说明命题“王冬⽣于1971 年或1972年”既可以化答:列出两种符号化的真值表:合命题可以发现,p 与q 不可能同时为真,故上述命题有两种符号化⽅式.8.将下列命题符号化,并指出真值., 就有;(1)只要, 则;, 才有;(3)只有, 才有;(4)除⾮, 否则;(5)除⾮(6)仅当.答:设p: , 则: ; 设q: , 则: .(1);(2);;(3);(4);(5);(6);(7).答:根据题意,p 为假命题,q 为真命题.(1);(2);(3);(4).答:根据题意,p 为真命题,q 为假命题.(1)若2+2=4,则地球是静⽌不动的;(2)若2+2=4,则地球是运动不⽌的;(3)若地球上没有树⽊,则⼈类不能⽣存;(4)若地球上没有⽔,则是⽆理数.12.将下列命题符号化,并给出各命题的真值:(1)2+2=4 当且仅当3+3=6;(2)2+2=4 的充要条件是3+3 6;(3)2+2 4 与3+3=6 互为充要条件;(4)若2+2 4,则3+3 6,反之亦然.答:设p:2+2=4,q:3+3=6.(1)若今天是星期⼀,则明天是星期⼆;(2)只有今天是星期⼀,明天才是星期⼆;(3)今天是星期⼀当且仅当明天是星期⼆;(4)若今天是星期⼀,则明天是星期三.答:设p:今天是星期⼀,q:明天是星期⼆,r:明天是星期三.(1)刘晓⽉跑得快,跳得⾼;(2)⽼王是⼭东⼈或者河北⼈;(3)因为天⽓冷,所以我穿了⽻绒服;(4)王欢与李乐组成⼀个⼩组;(5)李欣与李末是兄弟;(6)王强与刘威都学过法语;(7)他⼀⾯吃饭,⼀⾯听⾳乐;(8)如果天下⼤⾬,他就乘班车上班;(9)只有天下⼤⾬,他才乘班车上班;(10)除⾮天下⼤⾬,否则他不乘班车上班;(11)下雪路滑,他迟到了;(12)2 与4 都是素数,这是不对的;(13)“2 或 4 是素数,这是不对的”是不对的.答:q:⼤熊猫产在中国.r:太阳从西⽅升起. 求下列符合命题的真值:(1)(2)(3)(4)解:p真值为1,q 真值为1,r 真值为0.(1)0,(2)0,(3)0,(4)116.当p,q 的真值为0,r,s 的真值为1 时,求下列各命题公式的真值:(1)(2)(3)(4)解:(1)0,(2)0,(3)0,(4)117.判断下⾯⼀段论述是否为真:“ 是⽆理数.并且,如果3 是⽆理数,则也是⽆理数.另外,只有6 能被2 整除,6 才能被4 整除.”解:p: 是⽆理数q: 3 是⽆理数r:是⽆理数s: 6 能被2 整除t:6 能被 4 整除符号化为: ,该式为重⾔式,所以论述为真。

离散数学第2版课后习题答案

离散数学第2版课后习题答案

离散数学第2版课后习题答案离散数学是计算机科学和数学领域中一门重要的学科,它研究离散对象及其关系、结构和运算方法。

离散数学的应用非常广泛,包括计算机科学、信息科学、密码学、人工智能等领域。

而离散数学第2版是一本经典的教材,它系统地介绍了离散数学的基本概念、原理和方法。

本文将为读者提供离散数学第2版课后习题的答案,帮助读者更好地理解和掌握离散数学的知识。

第一章:基本概念和原理1.1 命题逻辑习题1:命题逻辑的基本符号有哪些?它们的含义是什么?答:命题逻辑的基本符号包括命题变量、命题联结词和括号。

命题变量用字母表示,代表一个命题。

命题联结词包括否定、合取、析取、条件和双条件等,分别表示“非”、“与”、“或”、“如果...则...”和“当且仅当”。

括号用于改变命题联结词的优先级。

习题2:列举命题逻辑的基本定律。

答:命题逻辑的基本定律包括德摩根定律、分配律、结合律、交换律、吸收律和否定律等。

1.2 集合论习题1:什么是集合?集合的基本运算有哪些?答:集合是由一些确定的对象组成的整体,这些对象称为集合的元素。

集合的基本运算包括并、交、差和补等。

习题2:列举集合的基本定律。

答:集合的基本定律包括幂等律、交换律、结合律、分配律、吸收律和德摩根定律等。

第二章:数理逻辑2.1 命题逻辑的推理习题1:什么是命题逻辑的推理规则?列举几个常用的推理规则。

答:命题逻辑的推理规则是用来推导命题的逻辑规则。

常用的推理规则包括假言推理、拒取推理、假言三段论和析取三段论等。

习题2:使用推理规则证明以下命题:如果A成立,则B成立;B不成立,则A不成立。

答:假言推理规则可以用来证明该命题。

根据假言推理规则,如果A成立,则B成立。

又根据假言推理规则,如果B不成立,则A不成立。

2.2 谓词逻辑习题1:什么是谓词逻辑?它与命题逻辑有何区别?答:谓词逻辑是一种扩展了命题逻辑的逻辑系统,它引入了谓词和量词。

与命题逻辑不同,谓词逻辑可以对个体进行量化和描述。

离散数学自考第一章(课后习题和答案)

离散数学自考第一章(课后习题和答案)
P F F T T Q F T F T P↔Q T F F T
每当P和Q的真值相同时,则(P↔Q)的真值 为“T”,否则(P↔Q)的真值为“F”。
(3)举例:
▪ 春天来了当且仅当燕子飞回来了。 ▪平面上二直线平行,当且仅当这二直线不相交。 ▪2+2=4当且仅当雪是白色的。 (两者没有关系,但是确实命题)
举例: (a)P:王华的成绩很好 Q:王华的品德很好。 则PΛQ:王华的成绩很好并且品德很好。 (b P:我们去种树 Q:房间里有一台电视机 则PΛQ:我们去种树与房间里有一台电视机。 (c) P:今天下大雨 Q:3+3=6 则PΛQ:今天下大雨和3+3=6
3.析取词(或运算) (1)符号“∨” 设P、Q为二个命题,则 (P∨Q)称作P与Q的“析取”,读作: “P或Q”。
(a)P:我拿起一本书 Q:我一口气读完了这本书 P→Q:如果我拿起一本书,则我一口气读完了这本书。 (b)P:月亮出来了 Q:3×3=9 P→Q:如果月亮出来了,则 3×3=9。(善意推定)
5.双条件联结词(“等价”词、“同”联结词、 “等同”词) (1)符号“↔”设P、Q为二个命题,则P↔ Q读作:“P当且仅当Q”,“P等价 Q”,“P是Q的充分必要条件”。 (2)定义(见真值表):
(4)P,Q中,P、Q的地位是平等的,P、Q 交换位置不会改变真值表中的值。
6.命题联结词在使用中的优先级 (1)先括号内,后括号外 (2)运算时联结词的优先次序为: ¬ Λ → ↔ (由高到低) (3)联结词按从左到右的次序进行运算

¬P∨(Q∨R)可省去括号,因为“V”运算是可结合的。 ( ¬P∨Q)∨R可省去括号,因为符合上述规定 而P→(Q→R)中的括号不能省去,因为“→”不满足结合律。

离散数学复习要点

离散数学复习要点

离散数学复习要点离散数学是数学的一个分支领域,主要研究离散的结构和离散情形下的数学对象及其相关性质。

它与连续数学不同,离散数学的对象是离散的,如集合、图、布尔代数等。

在计算机科学、信息科学、通信工程等领域中,离散数学的理论和方法被广泛应用。

以下是离散数学的一些重要的复习要点:1.集合论:集合是离散数学的基础,集合的基本运算如交、并、差等,以及集合的基本性质如并集和交集的结合律、分配律等,都是需要复习的内容。

此外,还需要了解集合的基数和幂集等概念。

2.命题逻辑:命题是一个可以判断真假的陈述句,命题逻辑是研究命题及其逻辑关系的数学体系。

需要复习的内容包括命题的逻辑运算,如非、与、或、异或等,以及逻辑等价、逻辑推理等。

3.谓词逻辑:谓词逻辑是对自然语言中的谓词进行形式化表示和推理的系统。

复习重点包括一阶谓词逻辑的基本概念,如谓词、量词、域、项等,以及谓词的合取、析取、全称量词和存在量词等逻辑联结词的语义。

4.图论:图论是研究图及其性质的数学分支。

需要复习的内容包括图的基本概念,如顶点、边、路径、圈等,以及图的表示方法、图的遍历算法、连通图、树等。

5. 网络流模型:网络流模型是研究流动网络的数学方法,主要包括最大流、最小割等问题。

需要复习的内容包括网络的基本概念,如容量、割、流等,以及Ford-Fulkerson算法等解决网络流问题的方法。

6.布尔代数:布尔代数是一种关于逻辑运算的代数系统,常用于电路设计和逻辑推理。

需要复习的内容包括布尔代数的基本运算,如与、或、非等,以及布尔函数的最小项与最大项表示、卡诺图等。

7.组合数学:组合数学是研究离散中的计数问题的数学分支。

需要复习的内容包括排列、组合、多元排列组合等的计数方法,如乘法原理、加法原理、排列组合的顺序问题等。

8.代数系统:代数系统是研究代数结构及其性质的数学分支,包括群、环、域等。

需要复习的内容包括群的基本概念和性质,如封闭性、结合律、单位元、逆元等。

(完整版)《离散数学》同步练习答案

(完整版)《离散数学》同步练习答案

华南理工大学网络教育学院《离散数学》练习题参考答案第一章命题逻辑一填空题(1)设:p:派小王去开会。

q:派小李去开会.则命题:“派小王或小李中的一人去开会" 可符号化为:(p q) (p q)。

(2)设A,B都是命题公式,A B,则A B的真值是T。

(3)设:p:刘平聪明。

q:刘平用功。

在命题逻辑中,命题:“刘平不但不聪明,而且不用功”可符号化为:p q .(4)设A , B 代表任意的命题公式,则蕴涵等值式为A B A B。

(5)设,p:径一事;q:长一智。

在命题逻辑中,命题:“不径一事,不长一智。

" 可符号化为: p q 。

(6)设A , B 代表任意的命题公式,则德摩根律为(A B)Û A B)。

(7)设,p:选小王当班长;q:选小李当班长.则命题:“选小王或小李中的一人当班长。

”可符号化为: (p q)(p q) .(8)设,P:他聪明;Q:他用功。

在命题逻辑中,命题:“他既聪明又用功。

" 可符号化为:P Q .(9)对于命题公式A,B,当且仅当 A B 是重言式时,称“A蕴含B”,并记为A B。

(10)设:P:我们划船.Q:我们跑步.在命题逻辑中,命题:“我们不能既划船又跑步.”可符号化为:(P Q) 。

(11)设P,Q是命题公式,德·摩根律为:(P Q)P Q) 。

(12)设P:你努力.Q:你失败。

在命题逻辑中,命题:“除非你努力,否则你将失败。

”可符号化为:P Q .(13)设p:小王是100米赛跑冠军。

q:小王是400米赛跑冠军。

在命题逻辑中,命题:“小王是100米或400米赛跑冠军.”可符号化为:p q。

(14)设A,C为两个命题公式,当且仅当A C为一重言式时,称C可由A逻辑地推出。

二.判断题1.设A,B是命题公式,则蕴涵等值式为A B A B。

()2.命题公式p q r是析取范式。

( √ )3.陈述句“x + y > 5”是命题。

离散数学模拟题及部分答案(英文)

离散数学模拟题及部分答案(英文)

离散数学模拟题及部分答案(英⽂)Discrete Mathematic TestEditor: Jin PengDate: 2008.5.6Discrete Mathematic Test (Unit 1) (2)Discrete Mathematic Test (Unit 2) (8)Discrete Mathematic Test (Unit 3) (13)Discrete Mathematic Test 1 (17)Discrete Mathematic Test 2 (22)Appendix1 Answer to Discrete Mathematic Test(Unit 1) (26)Appendix2 Answer to Discrete Mathematic Test 2 (31)Discrete Mathematic Test (Unit 1)In this part, you will have 15 statements. Make your own judgment, and then put T (True) or F (False) after each statement.1. Let A, B, and C be sets such that A∪B=A∪C, then B=C. ( )2. Let A and B be subsets of a set U, and A B, then A△B=A Band A∩B’=. ( ) 3. Let p a nd q and r be three statements. If ~pú~q ≡ ~pú~r, then q and r have the same value. ( )4. Let A, B be sets such that both AíB and A?B is possible. ( )5. Let p and q be two statements, then (p?~q) ?((~pú~q)(p?~q)) is a tautology.( ) 6.Let A, B be sets, P(A) is the power set of A, then P(A B)=P(A)P(B). ( )7. Let A, B, and C be sets, then if A?B,BíC,then AíC. ( )8. Let A, B be sets, if A={?}, B=P(P(A)), then {?}?B and{?}íB. ( )9. Let x be real number, then x?{x}{{x}} and {x}í{x}{{x}}. ( )10. Let A, B, and C be sets, then A(B∪C) = (A B) ∪(A C). ( )11. If A={x}∪x, then x?A and xíA. ( )12. (x)(P(x)∧Q(x))and (x)P(x) ∧(x)Q(x) are equivalent. ( )13. Let A and B be sets, then A×(B C)=(A×B) (A×C). ( )14. The argument formula (púq)? (r s), (sút)?w╞ p?w is valid. ( )15. (x)(P(x) ?Q(x))and (x)P(x) ? (x)Q(x) are equivalent. ( )Part II (1 Foundations: Sets Logic, and Algorithms , 85 Scores)1. (8 points)What sets so each of the Venn diagrams in following Figure represent?2. (8 points)Let U={1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}. Let A={1,5,6,9,10,15} and B={5,6,8,9,12,13}. Determine the following: Find a. SA b. SA’ c. SB d. SA∩B .3. (8 points) A class of 45 students has 3 minors for options, respectively A, B and C. A is the set of students taking algebra, B is the set of students who play basketball, C is the set of students taking the computer programming course. Among the 45 students, 12 choose subject A, 8 choose B and another 6 choose C. Additionally, 9 students choose all of the three subjects.What is the at least number of students do not taking the algebra course and the computer programming course and playing basketball?4. (8 points)Find a formula A that uses the variables p and q such that A is true only when exactly one of p and q is true.5. (8 points)Prove the validity of the logical consequences.Anne plays golf or Anne plays basketball. Therefore, Anne plays golf.6. (9 points)Prove the validity of the logical consequences.If the budget is not cut then prices remain stable if and only if taxes will be raised. If the budget is not cut, then taxes will be raised. If price remain stable, then taxes will not be raised. Therefore, taxes will not be raised.7. (8 points) (1) What is the universal quantification of the sentence: x2 +x is an even integer, where x is an even integer? Is the universal quantification a true statement?(2) What is the existential quantification of the sentence: x is a prime integer, where x is an odd integer? Is the existential quantification a true statement?8. (12 points)Symbolize the following sentences by using predicates, quantifiers, and logical connectives.(1) Any nature number has only one successor number.(2) For all x,y N, x+y=x if and only if y=0.(3) Not all nature number x N, it exist a nature number y N, such that x≤y.9. (8 points)Show that x(~F(x)∨A(x)),x(A(x) →B(x)),x F(x)|= x B(x)10. (8 points)In the bubble sort algorithm, if successive elements L[j] and L[j+1] are such that L[j]>L[j+1], then they are interchanged, that is, swapped. Therefore, the bubble sort algorithm may require elements to be swapped. Show how bubble sort sorts the elements 7 5 6 3 1 4 2 in increasing order. Draw figures.Discrete Mathematic Test (Unit 2)Part I (T/F questions, 15 Scores)In this part, you will have 15 statements. Make your own judgment, and then put T (True) or F (False) after each statement.1.Let A and B be sets such that any subsets of A B is a relation from A to B. ( )2. Let R={(1,1),(1,2),,(3,3) ,(3,1) ,(1,3)} be relations on the set A={1,2,3}then R is transitive. ( )3. Let R={(1,1),(2,2),(2,3),(3,3)} be relations on the set A={1,2,3}then R is symmetric.( ) 4. Let R be a symmetric relation. then Rn is symmetric for all positive integers n.( ) 5. Let R and S are reflexive relations on a set A then maybe not reflexive.( ) 6. Let R={(a,a),(b,b),(c,c) ,(a,b) ,(b,c)} be relations on the set A={a,b,c}then R is equivalence relation. ( )7. If R is equivalence relation,then the transitive closure of R is R. ( )8. Let R be relations on a set A,then R maybe symmetric and antisymmetic. ( )9. If and are partition of a given set A,then ∪ is also a partition of A.( )10.Let R and S are equivalence relations on a set A, Let ψ be the set of all equivalence class of R,and ? be the set of all equivalence class of S, if R≠S, then ψ∩? =Φ. ( ) 11. Let (S,) be a poset such that S is a finite nonempty set,then S has ninimal element,and the elements is unique. ( )12. Let R and S are relations on a set A,then MR∩S MR∧MS. ( )13. If a relation R is symmetric .then there is loop at every vertex of its directed graph.( ) 14. A directed graph of a partial order relation R cannot contain a closed directed path other than loops. ( ) 15. The poset,where P(S) is the power set of a set S is not a chain. ( )Part II (1 Foundations: Sets Logic, and Algorithms , 85 Scores)1. (8 points) Let R be the relation {(1, 2), (1, 3), (2, 3), (2, 4), (3, 1)}, and let S be relation {(2, 1), (3, 1), (3, 2), (4, 2)}. Find S R.and R3.2. (8 points)Determine whether the relations represented by the following zero-one matrices are partial orders.3. (8 points)Determine the number of different equivalence relations on a set with three elements by listing them.4. (8 points)Let R ={ (a , b)∈A| a divides b }, where A={1,2,3,4}. Find the matrix MR of R. Then determine whether R is reflexive, symmetric, or transitive.5. (8 points)Determine whether the relation R on the set of all people is reflexive, symmetric, antisymmetric, and/or transitive, where (a, b) R if and only ifa) a is taller than b.b) a and b were born on the same day.c) a has the same first name as b.6. (8 points) Define a equivalence relations on the set of students in your discrete mathematics class .Determine the equivalence classes for these equivalence relations.7. (10 points) Let R be the relation on the set of ordered pairs of positive integers such that if and only if . Show that R is an equivalence relation.8. (8 points) Answer the following questions for the partial order represented by the following Hasse diagram.9. (9 points) Let R be the relation on the set A={a,b,c,d} such that the matrix of R isfind(1) reflexive closure of R.(2) symmetric closure of R.(3) transitive closure of R.10. (10 points)(1)Show that there is exactly one greatest element of a poset, if such an element exists.(2) Show that the least upper bound of a set in poset is unique if it exists.Discrete Mathematic Test (Unit 3)Part I (T/F questions, 15 Scores)In this part, you will have 15 statements. Make your own judgment, and then put T (True) or F (False) after each statement.1. There exist a simple graph with four edges and degree sequence 1,2,3,4. ( )2. There are at least two people whith exactly the same number of friends in any gathering of n>1 people.. ( )3. The number of edges in a complete graph with n vertices is n(n-1). ( )4. The complement of graph G is not possible a subgraph of G. ( )5. Tthat any cycle-free graph contains a vertex of degree 0 or 1.( )6. The graph G, either G or its complement G’, is a connected graph. ( )7. Any graph G and its complement G’ can not be isomorphic ( )8. An Eulerian is a Hamiltonian graph,but a Hamiltonian graph is not An Eulerian .( ) 9. If every member of a party of six people knows at least three people ,prove that they can sit around a table in such a way that each of them knows both his neighbors. ( )10. A circuit either is a cycle or can be reduced to a cycle. ( )11. A graph G with n vertices .G is connected if and only if G is a tree. ( )12. A connected graph is a circuit if the degree of each vertex is 2. ( )13.A circuit either is a cycle or can be reduced to a cycle. ( )14.For any simple connected planar gragh G that X (G) 6. ( )15. .The sum of the odd degrees of all vertices of a graph is even. ( )Part II (1 Foundations: Sets Logic, and Algorithms , 85 Scores)1. (10 points) Does there exist a simple graph with degree sequence 1,2,3,5? Justify you answer.2. (10 points) Suppose there are 90 small towns in a country. From each town there is a direct bus route to a least 50 towns. Is it possible to go from one town to ant other town by bus possibly changing from one bus and then taking another bus to another town?3. 10 points) Find the number of distinct paths of length 2 in graphs K5.4. (5 points Draw all different graphs with two vertices and two edges.5. (10 points) Determine where the graphs in Figure 1 have Euler trails.If the graph has an Euler trail, exhibit one.6.(10 points) Use a K-map to find the minimized sum-of-product Boolean expressions of the expressions.xyzw+xyzw’+xyx’w’+xy’zw’+x’yzw+x’yzw’+x’y’z’w’+x’y’z’w7. (10 points) Insert 5, 10, and 20, in this order, in the binary search tree of following Figure. Draw the binary search tree after each insertion.8.(8 points) Does there exist a simple connected planar graph with 35 vertices and 100 edges?9. (10 points) Let G be a simple connected graph with n vertices. Suppose the degree of each vertex is at lease n 1. Does it imply the existence of a Hamiltonian cycle in G?Discrete Mathematic Test 1Part I (T/F questions)Directions: in this part, you will have 15 statements. Make your own judgment, and then put T (True) or F (False) after each statement.1. Let A and B be nonempty sets .Then A?B if and only if A-B=?. ( )2. Let A and B be nonempty sets. If B≠Φ,then A-B? A. ( )3. “Is Hangzhou a beautiful city?” This sentence is a statement. ( )4. Let P and Q and R be three statements.if P∧Q≡P∧R,then Q and R have the same value.( ) 5. Let P and Q be two statements.then (~p∨~q)→(p→~q) is not a tautology.( )6. (x)(P(x)∧Q(x))and (x)P(x) ∧(x)Q(x) are equivalent. ( )7. Let A and B be sets.any subset of A×B is a relation. ( )8.Let A={ 1,2,3}and R=={<1, 1>, <2, 2>, <1, 3>, <3, 1>, <2, 3>},so R is an equivalence Relation on A. ( ) 9.Let R be a relationon set A.then R is an equivalence Relation on A if and only ifR??R. ( ) R10. R is an equivalence Relation on A.R- equivalence class is not a partition of A .( )11.If a mathematical system has an identity,so the cayley table has no equalLines. ( ) 12. Let A be a nonempty set.then Φis identity of (ρ(A),∩). ( ) 13.The sum of the odd degrees of all vertices of a graph is even. ( )14. Any graph G and its complement G’can not be isomorphic.( )15. A graph G with n vertices .G is connected if and only if G is a tree. ( )Part Ⅱ ( set questions)Directions: in this part,you need to provide solutions for question 16~17 based on the16.Let A,B,and C be sets.Prove A∩(B-C)=(A∩B)-(A∩C).17. A class of 40 students has 3 minors for options, respectively A, B and C. Among the 40 students, 15 choose subject A, 10 choose B and another 6 choose C. Additionally, 5 students choose all of the three subjects. Our question is at least how many students do not choose any subject.Part Ⅲ ( LOGIC questions)Directions: in this part, you need to provide solutions for question 17~19 based on the theory of knowledge logic .18.Show that ~(P∧~Q),~Q∨R ,~R |= ~PPart Ⅳ ( Relations and Posets questions)Directions: in this part,you need to provide solutions for question 20-22 based on the theory of knowledge relations and posets.20.Let A={1,2,3,4},R={(1,2),(2,3),(3,1) }, L={(1,4),(2,2),(3,3),(4,3)},find the transitiv closures of the relations LR .21.Let {A1, A2, A3………An}be a partition of a given set X.Difine a relation R on S asfollows:For all a,b∈X,(a,b) ∈R if and only if there exists Ai such that a,b∈Ai.Prove R is an equivalence relation on X.。

离散数学练习题(含答案)

离散数学练习题(含答案)

离散数学练习题(含答案)题目1. 对于集合 $A={1,2,3,...,10}$ 和 $B={n|n是偶数,2<n<8}$,求 $A \cap B$ 的元素。

2. 存在三个可识别的状态A,B,C。

置换群 $S_3$ 作用在状态集上。

定义四个动作:$α: A → C, β: A → B, γ: C→ A, δ: B→ C$。

确定式子,描述 $\{α,β,γ,δ\}$ 的乘法表。

3. 证明 $\forall n \in \mathbb{N}$,合数的个数不小于$n$。

4. 给定一个无向带权图,图中每个节点编号分别是$1,2,...,n$,证明下列结论:a. 如果从节点$i$到$j$只有一条权值最小的路径,则这条路径的任意子路径都是最短路径。

b. 如果从节点$i$到$j$有两条或两条以上权值相等的路径,则从$i$到$j$的最短路径可能不唯一。

答案1. $A \cap B = \{2,4,6\}$。

2. 乘法表:3. 对于任意$n$,我们可以选择$n+1$个连续的自然数$k+1,k+2,...,k+n,k+n+1$中的$n$个数,其中$k \in \mathbb{Z}$。

这$n$个数构成的$n$个正整数均为合数,因为它们都至少有一个小于它自身的因子,所以不是质数。

所以合数的个数不小于任意$n$。

4.a. 根据题意,从$i$到$j$只有一条权值最小的路径,即这条最短路径已被确定。

如果从这条路径中任意取出一段子路径,假设这段子路径不是这个节点到$j$的最短路径,那么存在其他从$i$到$j$的路径比这段子路径更优,又因为这条路径是最短路径,所以这段子路径也一定不优于最短路径,矛盾。

所以从这条路径中任意取出的子路径都是最短路径。

b. 如果从节点$i$到$j$有多条权值相等的路径,则这些路径权值都是最短路径的权值。

因为所有最短路径的权值相等,所以这些路径的权值就是最短路径的权值。

所以从$i$到$j$的最短路径可能不唯一。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

1.List all subsets of {JA V A, PASCAL, C++}
2.Prove that if A ⊆ B and C ⊆D, then A ∩ C ⊆B ∩ D
3.A, B and C are sets, prove or disprove the following statements.
(1) If A – B = A – C, then B = C
(2) If A⨯ B = A⨯ C, A ≠∅, then B = C
4.Write each of the following statements in terms of propositional variables, predicates,
quantifiers and logical connectives. You can choose any propositional variables and predicates freely.
(1) If I like the course or the teacher, I will attend the class. (Statement and its negation)
(2) For all students of our school, someone studies hard and has good score; someone
studies hard and has not good score.
5.Prove that the following is a tautology using truth table
(1) ~()
p p q
⇒⇒(2) (()())()
p q q r p r
⇒∧⇒⇒⇒
6.Let A and B are square matrices. Show that if AB=BA, then (AB)n=A n B n
1. Let A={a,b,c,d,e}, a relation R on A is {(a,b), (b,b), (b,c), (b,d), (c,d), (d,d), (d,e), (e,d)}.
(1) Give the digraph and matrix of relation R;
(2) Compute R2, reflexive closure r(R) and symmetric closure s(R).
2. Let A= {a1, a2, a3, a4, a5}, and the diagram of a relation R on A is shown in Fig.1.
Fig. 1
(1)Give the in-degree and the out-degree of each vertex
(2)Find R∞ for the relation R using Warshall’s algorithm.
3. Let S Z+ and A=S×S. Define the following relation R on A
(a,b) R (a′,b′) if and only if ab′ = a′b
(1) Show that R is an equivalent relation;
(2) Let S={1,2,3,4,5,6,7,8,9}, compute the equivalent class [(2,4)].
1. Let f(n)= 3n 3-5n 2+8 and g(n)=n 3 be defined for positive integer n. Show that f and g have the same order.
2. Let A={1, 2, 3, 4, 5, 6} , and let
121 2 3 4 5 6 1 2 3 4 5 6,3 4 1 2 6 5 2 3 1 5 4 6p p ⎛⎫⎛⎫== ⎪ ⎪⎝⎭⎝⎭
Compute
(1)11
p -
(2) 212()p p p 3. Let function f(x, y)=( x+3y, 2x+y), (x, y) in R×R, prove that f is bijection.
1. Determine the Hasse diagram of the relation on A = {1, 2, 3, 4, 5} whose matrix is shown below.
1 0 1 1 10 1 1 1 10 0 1 1 10 0 0 1 00 0 0 0 1⎛⎫ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪⎝⎭
2. Find two different topological sorting of the poset whose Hasse diagram is shown in Fig. 2.
Fig. 2
3. Let A be a finite nonempty poset with partial order ≤.
(1) Show that A has at least one maximal element;
(2) Is there a greatest element for all possible A? If not, show a counterexample.
4. Let A={2, 4, 5, 6, 8, 10, 12, 20, 120}, R is the relation of divisibility on A.
(1) Draw the Hasse diagram of the poset <A, R>;
(2) Find all the minimal elements, the maximal elements, the least element and the greatest element of the poset <A, R> if they exist;
(3) Let B = {2, 4, 6}, find the upper bound, the lower bound, the least upper bound and the greatest lower bound of B if they exist.
Chapter 7 & 8
1.Construct the tree of the algebraic expression
( 7 + (6 - 2) ) – ( x- (y - 4) )
e Fleury’s algorithm to produce an Euler circuit for the graph in Fig. 3
Fig. 3
e the labeling algorithm (Ford-Fulkerson’s) to find a maximum flow for the following
transport network in Fig. 1. Use of figures is required to show the variety of flows during the procedure.
Fig.1 transport network
e Kruskal’s algorithm to find a minimal spanning tree of graph in Fig. 2. The sequence of
edges-selecting is ordered to be shown up.
C D。

相关文档
最新文档