NTU-Exam 板


LINE

课程名称︰离散数学 课程性质︰必修 课程教师︰颜嗣钧 开课学院:电资学院 开课系所︰电机系 考试日期(年月日)︰2008/04/21 考试时限(分钟):120分钟 是否需发放奖励金:是 (如未明确表示,则不予发放) 试题: (以下逻辑语句,以'V'表示'or'、'^'表示'and'、'~'表示'negation',与这门课使用 的符号略有不同,此外,以下以A代表for any,以E代表there exist。) 1. (15 pts) True or false? No explanations needed. Score= {Right-1/2Wrong}; so do not make uninformed guesses. (Please mark O for 'true' and X for 'false'.) (a) ExAyP(x,y)→AyExP(x,y) is a valid formula. (b) The sentence 'Today is Thursday.' is a proposition. (c) P(d)^(~Ex(R(x)^~Q(x)))‧(~Ex(Q(x)^P(x)))├ ~R(d). (d) (p_1→q_1)^(p_2→q_2)├ (p_1 V p_2→q_1 V q_2) can be proven using Natural Deduction of propositional logic. (e) (~q^(~p→q))→~p is a tautology. (f) AxP(x) V AyQ(y) and Ax(P(x) V Q(x)) are logically equivalent. (g) ExEyP(x,y) and EyExP(x,y) are logically equivalent. (h) ExAyEzP(x,y,z) and EzAyExP(x,y,z) are logically equivalent. (i) A formula ψ in propositional logic is satisfiable if ψ always evaluates to True for every truth assignment. (j) There exists a set A such that A is a subset of 2^A. (Note: 2^A, the power set of A, ={B| B is a subset of A}) (k) If A is countably infinite, so is 2^A (l) Every infinite set contains a countably infinite subset. (m) {ψ, {{a}}} is the power set of some set. (n) If A is countably infinite and B is an arbitrary set, then A∩B is either finite of countably infinite. (o) The union of infinitely many countably infinite sets is countably infinite. 2. (10 pts) Use the following predicates D(x): x is a dog C(x): x is a dog catcher T(x): x is a town L(x,y), x lives in y B(x,y), x has bitten y to obtain a first-order formula corresponding to the following: At least one town has a dog catcher who has been bitten by none of the dogs in town. 3. (10 pts) Write a propositional formula to express the following statement: If Clifton does not live in France, then he does not speak French. Clifton does not drive a Datsun. If Clifton lives in France, then he rides a bicycle. Either Clifton speaks French, or he drives a Datsun. Hence, Clifton rides a bicycle. (Note: you need to identify the propositions first.) 4. (10 pts) Prove that for an arbitrary infinite set A, there is no one-to-one correspondence between A and 2^A. (Hint: proof by contradiction. Assuming f to be such a one-to-one correspondence, define S={x| x belongs to A ^x does not belong to f(x)}…) 5. (10 pts) Prove formally that if for any i≧1, A_i is countably infinite, then ∪A_i=A_1∪A_2∪…∪A_i∪... i≧1 is also countably infinite. 6. (15 pts) Prove that the following program is totally correct. (Do not forget to show that the program always terminates.) (Hint: For partial correctness, use loop invariant { z=x(y-n+1)‧n≧1 }.) {y>0} z:=x; n:=y; while n>1 do begin z:=z+x; n:=n-1; end {z=x*y} 7. (15 pts) Calculate (in detail) the following weakest preconditions (WPs): (Recall that WP(S,{Q}) represents the "weakest condition" P such that P{S}Q.) (a) WP(if x<0 then x:=x+2 else y:=x+3, {x>0^y<0}). (b) WP(if odd(x) then x:=x+1, {x=10}). (odd(x) means x is an odd number.) (c) WP(if y<0 then x:=y-v, {x=y-v^y>0}) 8. (15 pts) Answer the following two questions: (a) (7 pts) Use the truth table method to prove ((p→r)^(q→r))╞ ((p V q)→ r) (b) (8 pts) Use natural deduction (see the following table) to prove ((p→r)^(q→r))├ ((p V q)→r). --



※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 220.133.169.66 ※ 编辑: boggart0803 来自: 220.133.169.66 (06/18 10:44) ※ 编辑: boggart0803 来自: 220.133.169.66 (06/18 10:45)







like.gif 您可能会有兴趣的文章
icon.png[问题/行为] 猫晚上进房间会不会有憋尿问题
icon.pngRe: [闲聊] 选了错误的女孩成为魔法少女 XDDDDDDDDDD
icon.png[正妹] 瑞典 一张
icon.png[心得] EMS高领长版毛衣.墨小楼MC1002
icon.png[分享] 丹龙隔热纸GE55+33+22
icon.png[问题] 清洗洗衣机
icon.png[寻物] 窗台下的空间
icon.png[闲聊] 双极の女神1 木魔爵
icon.png[售车] 新竹 1997 march 1297cc 白色 四门
icon.png[讨论] 能从照片感受到摄影者心情吗
icon.png[狂贺] 贺贺贺贺 贺!岛村卯月!总选举NO.1
icon.png[难过] 羡慕白皮肤的女生
icon.png阅读文章
icon.png[黑特]
icon.png[问题] SBK S1安装於安全帽位置
icon.png[分享] 旧woo100绝版开箱!!
icon.pngRe: [无言] 关於小包卫生纸
icon.png[开箱] E5-2683V3 RX480Strix 快睿C1 简单测试
icon.png[心得] 苍の海贼龙 地狱 执行者16PT
icon.png[售车] 1999年Virage iO 1.8EXi
icon.png[心得] 挑战33 LV10 狮子座pt solo
icon.png[闲聊] 手把手教你不被桶之新手主购教学
icon.png[分享] Civic Type R 量产版官方照无预警流出
icon.png[售车] Golf 4 2.0 银色 自排
icon.png[出售] Graco提篮汽座(有底座)2000元诚可议
icon.png[问题] 请问补牙材质掉了还能再补吗?(台中半年内
icon.png[问题] 44th 单曲 生写竟然都给重复的啊啊!
icon.png[心得] 华南红卡/icash 核卡
icon.png[问题] 拔牙矫正这样正常吗
icon.png[赠送] 老莫高业 初业 102年版
icon.png[情报] 三大行动支付 本季掀战火
icon.png[宝宝] 博客来Amos水蜡笔5/1特价五折
icon.pngRe: [心得] 新鲜人一些面试分享
icon.png[心得] 苍の海贼龙 地狱 麒麟25PT
icon.pngRe: [闲聊] (君の名は。雷慎入) 君名二创漫画翻译
icon.pngRe: [闲聊] OGN中场影片:失踪人口局 (英文字幕)
icon.png[问题] 台湾大哥大4G讯号差
icon.png[出售] [全国]全新千寻侘草LED灯, 水草

请输入看板名称,例如:BabyMother站内搜寻

TOP