1、离散数学试题及答案一、填空题 1 设集合A,B,其中A1,2,3, B= 1,2, 则A - B 3 ; ?(A) - ?(B) 3,1,3,2,3,1,2,3 .2. 设有限集合A, |A| = n, 则 |?(AA)| = .3. 设集合A = a, b, B = 1, 2, 则从A到B的所有映射是?1= (a,1), (b,1), ?2= (a,2), (b,2),?3= (a,1), (b,2), ?4= (a,2), (b,1), 其中双射的是 ?3, ?4 .4. 已知命题公式G?(P?Q)R,则G的主析取范式是 (P?QR) 5.设G是完全二叉树,G有7个点,其中4个叶点,则G的
2、总度数为 12 ,分枝点数为 3 .6 设A、B为两个集合, A= 1,2,4, B = 3,4, 则从A?B 4 ; A?B1,2,3,4;AB 1,2 .7. 设R是集合A上的等价关系,则R所具有的关系的三个特性是 自反性 , 对称性 传递性 .8. 设命题公式G?(P?(Q?R),则使公式G为真的解释有 (1, 0, 0), (1, 0, 1), (1, 1, 0)9. 设集合A1,2,3,4, A上的关系R1 = (1,4),(2,3),(3,2), R2 = (2,1),(3,2),(4,3), 则 R1?R2 = (1,3),(2,2),(3,1) , R2?R1 = (2,4),
3、(3,3),(4,2) _ R12 = (2,2),(3,3).10. 设有限集A, B,|A| = m, |B| = n, 则| |?(A?B)| = .11 设A,B,R是三个集合,其中R是实数集,A = x | -1x1, x?R, B = x | 0x 2, x?R,则A-B = -1=x0 , B-A = x | 1 x 6 (D)下午有会吗?5 设I是如下一个解释:Da,b, 则在解释I下取真值为1的公式是( D ). (A)?x?yP(x,y) (B)?x?yP(x,y) (C)?xP(x,x) (D)?x?yP(x,y).6. 若供选择答案中的数值表示一个简单图中各个顶点的度,
4、能画出图的是( C ). (A)(1,2,2,3,4,5) (B)(1,2,3,4,5,5) (C)(1,1,1,2,3) (D)(2,3,3,4,5,6).7. 设G、H是一阶逻辑公式,P是一个谓词,G?xP(x), H?xP(x),则一阶逻辑公式G?H是( C ). (A)恒真的 (B)恒假的 (C)可满足的 (D)前束范式.8 设命题公式G?(P?Q),HP?(Q?P),则G与H的关系是( A )。 (A)G?H (B)H?G (C)GH (D)以上都不是.9 设A, B为集合,当( D )时ABB. (A)AB (B)A?B (C)B?A (D)AB?.10 设集合A = 1,2,3,
5、4, A上的关系R(1,1),(2,3),(2,4),(3,4), 则R具有( B )。 (A)自反性 (B)传递性 (C)对称性 (D)以上答案都不对11 下列关于集合的表示中正确的为( B )。 (A)a?a,b,c (B)a?a,b,c (C)?a,b,c (D)a,b?a,b,c12 命题?xG(x)取真值1的充分必要条件是( A ).(A) 对任意x,G(x)都取真值1. (B)有一个x0,使G(x0)取真值1. (C)有某些x,使G(x0)取真值1. (D)以上答案都不对.13. 设G是连通平面图,有5个顶点,6个面,则G的边数是( A ). (A) 9条 (B) 5条 (C) 6
6、条 (D) 11条.14. 设G是5个顶点的完全图,则从G中删去( A )条边可以得到树. (A)6 (B)5 (C)10 (D)4.15. 设图G的相邻矩阵为,则G的顶点数与边数分别为( D ). (A)4, 5 (B)5, 6 (C)4, 10 (D)5, 8.三、计算证明题1.设集合A1, 2, 3, 4, 6, 8, 9, 12,R为整除关系。(1) 画出半序集(A,R)的哈斯图;(2) 写出A的子集B = 3,6,9,12的上界,下界,最小上界,最大下界;(3) 写出A的最大元,最小元,极大元,极小元。解:(1)(2) B无上界,也无最小上界。下界1, 3; 最大下界是3(3) A无
7、最大元,最小元是1,极大元8, 12, 9; 极小元是12. 设集合A1, 2, 3, 4,A上的关系R(x,y) | x, y?A 且 x ? y, 求 (1) 画出R的关系图;(2) 写出R的关系矩阵.解:(1) (2)3. 设R是实数集合,?,?,?是R上的三个映射,?(x) = x+3, ?(x) = 2x, ?(x) x/4,试求复合映射?,?, ?, ?,?.解: (1)?(?(x)?(x)+32x+32x+3.(2)?(?(x)?(x)+3(x+3)+3x+6,(3)?(?(x)?(x)+3x/4+3, (4)?(?(x)?(x)/42x/4 = x/2,(5)?(?)?+32x
8、/4+3x/2+3.4. 设I是如下一个解释:D = 2, 3, abf (2)f (3)P(2, 2)P(2, 3)P(3, 2)P(3, 3)32320011试求 (1) P(a, f (a)P(b, f (b);(2) ?x?y P (y, x). 解: (1) P(a, f (a)P(b, f (b) = P(3, f (3)P(2, f (2) = P(3, 2)P(2, 3) = 10 = 0.(2) ?x?y P (y, x) = ?x (P (2, x)P (3, x) = (P (2, 2)P (3, 2)(P (2, 3)P (3, 3) = (01)(01) = 11 =
9、 1.5. 设集合A1, 2, 4, 6, 8, 12,R为A上整除关系。(1) 画出半序集(A,R)的哈斯图;(2) 写出A的最大元,最小元,极大元,极小元;(3) 写出A的子集B = 4, 6, 8, 12的上界,下界,最小上界,最大下界.解:(1) (2)无最大元,最小元1,极大元8, 12; 极小元是1. (3) B无上界,无最小上界。下界1, 2; 最大下界2.6. 设命题公式G = ?(PQ)(Q(?PR), 求G的主析取范式。解: G = ?(PQ)(Q(?PR) = ?(?PQ)(Q(PR) = (P?Q)(Q(PR) = (P?Q)(QP)(QR) = (P?QR)(P?Q?
10、R)(PQR)(PQ?R)(PQR)(?PQR) = (P?QR)(P?Q?R)(PQR)(PQ?R)(?PQR) = m3m4m5m6m7 = ?(3, 4, 5, 6, 7).7. (9分)设一阶逻辑公式:G = (?xP(x)?yQ(y)?xR(x),把G化成前束范式. 解: G = (?xP(x)?yQ(y)?xR(x) = ?(?xP(x)?yQ(y)?xR(x) = (?xP(x)?yQ(y)?xR(x) = (?x?P(x)?y?Q(y)?zR(z) = ?x?y?z(?P(x)?Q(y)R(z)9. 设R是集合A = a, b, c, d. R是A上的二元关系, R = (a,
11、b), (b,a), (b,c), (c,d),(1) 求出r(R), s(R), t(R);(2) 画出r(R), s(R), t(R)的关系图.解:(1) r(R)RIA(a,b), (b,a), (b,c), (c,d), (a,a), (b,b), (c,c), (d,d),s(R)RR1(a,b), (b,a), (b,c), (c,b) (c,d), (d,c),t(R)RR2R3R4(a,a), (a,b), (a,c), (a,d), (b,a), (b,b), (b,c), (b,d), (c,d); (2)关系图:11. 通过求主析取范式判断下列命题公式是否等价:(1) G
12、 = (PQ)(?PQR) (2) H = (P(QR)(Q(?PR)解:G(PQ)(?PQR)(PQ?R)(PQR)(?PQR)m6m7m3? (3, 6, 7)H = (P(QR)(Q(?PR)(PQ)(QR)(?PQR)(PQ?R)(PQR)(?PQR)(PQR)(?PQR)(PQ?R)(?PQR)(PQR)m6m3m7G,H的主析取范式相同,所以G = H.13. 设R和S是集合Aa, b, c, d上的关系,其中R(a, a),(a, c),(b, c),(c, d), S(a, b),(b, c),(b, d),(d, d).(1) 试写出R和S的关系矩阵;(2) 计算R?S, R
13、S, R1, S1?R1.解: (1) (2)R?S(a, b),(c, d),RS(a, a),(a, b),(a, c),(b, c),(b, d),(c, d),(d, d), R1(a, a),(c, a),(c, b),(d, c),S1?R1(b, a),(d, c).四、证明题1. 利用形式演绎法证明:PQ, RS, PR蕴涵QS。解:(1) PR P(2) ?RP Q(1)(3) PQ P(4) ?RQ Q(2)(3)(5) ?QR Q(4)(6) RS P(7) ?QS Q(5)(6)(8) QS Q(7)2. 设A,B为任意集合,证明:(A-B)-C = A-(BC).解:
14、 (A-B)-C =3. (本题10分)利用形式演绎法证明:?AB, ?C?B, CD蕴涵AD。解:(1) A D(附加)(2) ?AB P(3) B Q(1)(2)(4) ?C?B P(5) BC Q(4)(6) C Q(3)(5)(7) CD P(8) D Q(6)(7)(9) AD D(1)(8)所以 ?AB, ?C?B, CD蕴涵AD.4. (本题10分)A, B为两个任意集合,求证:A(AB) = (AB)B .解:4. A(AB) = A(AB)A(AB)(AA)(AB)?(AB)(AB)AB而 (AB)B= (AB)B= (AB)(BB)= (AB)?= AB所以:A(AB) =
15、 (AB)B.参考答案一、填空题 1. 3; 3,1,3,2,3,1,2,3. 2. .3. ?1= (a,1), (b,1), ?2= (a,2), (b,2),?3= (a,1), (b,2), ?4= (a,2), (b,1); ?3, ?4.4. (P?QR).5. 12, 3. 6. 4, 1, 2, 3, 4, 1, 2. 7. 自反性;对称性;传递性.8. (1, 0, 0), (1, 0, 1), (1, 1, 0).9. (1,3),(2,2),(3,1); (2,4),(3,3),(4,2); (2,2),(3,3).10. 2m?n.11. x | -1x 0, x?R;
16、 x | 1 x 2, x?R; x | 0x1, x?R.12. 12; 6.13. (2, 2),(2, 4),(2, 6),(3, 3),(3, 6),(4, 4),(5, 5),(6, 6).14. ?x(?P(x)Q(x).15. 21.16. (R(a)R(b)(S(a)S(b).17. (1, 3),(2, 2); (1, 1),(1, 2),(1, 3). 二、选择题 1. C. 2. D. 3. B. 4. B.5. D. 6. C. 7. C.8. A. 9. D. 10. B. 11. B. 13. A. 14. A. 15. D三、计算证明题1. (1)(2) B无上界
17、,也无最小上界。下界1, 3; 最大下界是3.(3) A无最大元,最小元是1,极大元8, 12, 90+; 极小元是1. = (1,1),(2,1),(2,2),(3,1),(3,2),(3,3),(4,1),(4,2),(4,3),(4,4).(1) (2)3. (1)?(?(x)?(x)+32x+32x+3.(2)?(?(x)?(x)+3(x+3)+3x+6,(3)?(?(x)?(x)+3x/4+3, (4)?(?(x)?(x)/42x/4 = x/2,(5)?(?)?+32x/4+3x/2+3.4. (1) P(a, f (a)P(b, f (b) = P(3, f (3)P(2, f
18、(2) = P(3, 2)P(2, 3) = 10 = 0. (2) ?x?y P (y, x) = ?x (P (2, x)P (3, x) = (P (2, 2)P (3, 2)(P (2, 3)P (3, 3) = (01)(01) = 11 = 1.5. (1)(2) 无最大元,最小元1,极大元8, 12; 极小元是1.(3) B无上界,无最小上界。下界1, 2; 最大下界2.6. G = ?(PQ)(Q(?PR) = ?(?PQ)(Q(PR) = (P?Q)(Q(PR) = (P?Q)(QP)(QR) = (P?QR)(P?Q?R)(PQR)(PQ?R)(PQR)(?PQR) = (
19、P?QR)(P?Q?R)(PQR)(PQ?R)(?PQR) = m3m4m5m6m7 = ?(3, 4, 5, 6, 7).7. G = (?xP(x)?yQ(y)?xR(x) = ?(?xP(x)?yQ(y)?xR(x) = (?xP(x)?yQ(y)?xR(x) = (?x?P(x)?y?Q(y)?zR(z) = ?x?y?z(?P(x)?Q(y)R(z)9. (1) r(R)RIA(a,b), (b,a), (b,c), (c,d), (a,a), (b,b), (c,c), (d,d),s(R)RR1(a,b), (b,a), (b,c), (c,b) (c,d), (d,c),t(R
20、)RR2R3R4(a,a), (a,b), (a,c), (a,d), (b,a), (b,b), (b,c), (b,d), (c,d);(2)关系图:11. G(PQ)(?PQR)(PQ?R)(PQR)(?PQR)m6m7m3? (3, 6, 7)H = (P(QR)(Q(?PR)(PQ)(QR)(?PQR)(PQ?R)(PQR)(?PQR)(PQR)(?PQR)(PQ?R)(?PQR)(PQR)m6m3m7? (3, 6, 7)G,H的主析取范式相同,所以G = H.13. (1) (2)R?S(a, b),(c, d),RS(a, a),(a, b),(a, c),(b, c),(b,
21、 d),(c, d),(d, d), R1(a, a),(c, a),(c, b),(d, c),S1?R1(b, a),(d, c).四 证明题1. 证明:PQ, RS, PR蕴涵QS(1) PR P(2) ?RP Q(1)(3) PQ P(4) ?RQ Q(2)(3)(5) ?QR Q(4)(6) RS P(7) ?QS Q(5)(6)(8) QS Q(7)2. 证明:(A-B)-C = (AB)C = A(BC) = A(BC) = A-(BC)3. 证明:?AB, ?C?B, CD蕴涵AD(1) A D(附加)(2) ?AB P(3) B Q(1)(2)(4) ?C?B P(5) BC Q(4)(6) C Q(3)(5)(7) CD P(8) D Q(6)(7)(9) AD D(1)(8)所以 ?AB, ?C?B, CD蕴涵AD.5. 证明:A(AB) = A(AB)A(AB)(AA)(AB)?(AB)(AB)AB而 (AB)B= (AB)B= (AB)(BB)= (AB)?= AB所以:A(AB) = (AB)B.
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1