您好,欢迎访问三七文档
当前位置:首页 > 商业/管理/HR > 企业文档 > “确定性推理”作业题推理题----答案
1.判断一下公式是否可合一,如可合一,求出其最一般合一。1)P(a,b),P(x,y)2)P(a,x,f(g(y))),P(z,f(z),f(u))3)P(f(y),y,x),P(x,f(a),f(b))4)P(x,f(x)),P(y,y)2.将以下谓词公式化为相应的子句集。(可任选其中3道小题)1)(∀x)(∀y)(P(x,y)∧Q(x,y))2)(∀x)(∀y)((∃z)(P(x,y)→Q(x,y)∨R(x,z))3)(∀x)(∃y)((P(x)∧(Q(x)∨R(y)))→(∀z)(P(f(z))→Q(g(x))))4)(∀x)(P(x))→(∃x)((∀z)Q(x,z)∨(∀z)R(x,y,z))5)(∃x)(∃y)(∀z)(∃u)(∀v)(∃w)(P(x,y,z,u,v,w)∧Q(x,y,z,u,v,w)∨¬R(x,z,w))(3-7题中可任选3道大题)3.已知:每个去临潼游览的人,或者参观秦始皇兵马俑,或者参观华清池,或者洗温泉澡;凡去临潼游览的人,如果爬骊山就不能参观秦始皇兵马俑;有的游览者既不参观华清池,也不洗温泉澡。求证:有的游览者不爬骊山。解:1)谓词公式定义:Go(x,y):x(人)去y(地点)①Go(x,Q)∨Go(x,H)∨Go(x,W)②Go(x,L)→¬Go(x,Q)③(∃x)(¬Go(x,H)∧¬Go(x,W))④(∃x)¬Go(x,L)2)化简为子句集C1:Go(x,Q)∨Go(x,H)∨Go(x,W)C2:¬Go(x,L)∨¬Go(x,Q)C3:¬Go(a,H)C4:¬Go(a,W)T1:Go(x,L)3)归结演绎证明T2:(C2,T1)¬Go(x,Q)T3:(C1,T2)Go(x,H)∨Go(x,W)T4:(C3,T3)Go(a,W){a/x}T5:(C4,T4)NIL结论得证。4.已知下列事实:任何通过历史考试并中了彩票的人是快乐的;任何肯学习或幸运的人可以通过所有考试;John不学习但很幸运;任何人只要幸运就能中彩。求证:John是快乐的。解:1)谓词公式定义:Pass(x,y):x(人)通过y(考试)Lottery(x):x(人)中彩票Happy(x):x(人)快乐Study(x):x(人)肯学习Lucky(x):x(人)是幸运的①(∀x)((Pass(x,History)∧Lottery(x))→Happy(x))②(∀x)((Study(x)∨Lucky(x))→(∀y)Pass(x,y))③¬Study(John)∧Lucky(John)④(∀x)Lucky(x)→Lottery(x)⑤Happy(John)2)化简为子句集C1:¬Pass(a,History)∨¬Lottery(a)∨Happy(a)C2:¬Study(a)∨Pass(a,b)C3:¬Lucky(a)∨Pass(a,b)C4:¬Study(John)C5:Lucky(John)C6:¬Lucky(a)∨Lottery(a)T1:¬Happy(John)3)归结演绎证明T2:(C1,T1)¬Pass(John,History)∨¬Lottery(John){John/a}T3:(C3,T2)¬Lucky(John)∨¬Lottery(John){History/b}T4:(C6,T3)¬Lucky(John){John/a}T5:(C4,C5)NIL结论得证。5.已知下列事实:John是贼;Paul喜欢酒;Paul也喜欢奶酪;如果Paul喜欢某物,则John也喜欢;如果某人是贼,而且喜欢某物,则他就可能偷窃该物。求解:John可能偷窃什么?解:1)谓词公式定义:Thief(x):x(人)是贼Like(x,y):x(人)喜欢y(东西)Steal(x,y):x(人)偷y(东西)①Thief(John)②Like(Paul,wine)③Like(Paul,cheese)④Like(Paul,y)→Like(John,y)⑤(Thief(x)∧Like(x,y))→Steal(x,y)⑥Steal(John,y)∨ANSWER(y)2)化简为子句集C1:Thief(John)C2:Like(Paul,wine)C3:Like(Paul,cheese)C4:¬Like(Paul,y)∨Like(John,y)C5:¬Thief(x)∨¬Like(x,y))∨Steal(x,y)T1:¬Steal(John,y)∨ANSWER(y)3)归结演绎求解T2:(C1,C5)¬Like(John,y))∨Steal(John,y){John/x}T3:(C4,T2)¬Like(Paul,y)∨Steal(John,y)T4:(T1,T3)¬Like(Paul,y)∨ANSWER(y)T5:(C2,T4)ANSWER(wine){wine/y}T6:(C3,T4)ANSWER(cheese){cheese/y}可知结果为John可能偷wine或cheese。6.某人被盗,公安局派出所派出5个侦查员去调查。研究案情时,侦查员A说:“赵与钱中至少有一人作案”;侦查员B说:“钱与孙中至少有一人作案”;侦查员C说:“孙与李中至少有一人作案”;侦查员D说:“赵与孙中至少有一人与此案无关”;侦查员E说:“钱与李中至少有一人与此案无关”。如果这5个侦查员的话都是可信的,试问谁是盗窃犯呢?解:1)谓词公式定义:Thief(x):x(人)是贼①Thief(Zhao)∨Thief(Qian)②Thief(Qian)∨Thief(Sun)③Thief(Sun)∨Thief(Li)④¬Thief(Zhao)∨¬Thief(Sun)⑤¬Thief(Qian)∨¬Thief(Li)⑥Thief(x)∨ANSWER(x)2)化简为子句集C1:Thief(Zhao)∨Thief(Qian)C2:Thief(Qian)∨Thief(Sun)C3:Thief(Sun)∨Thief(Li)C4:¬Thief(Zhao)∨¬Thief(Sun)C5:¬Thief(Qian)∨¬Thief(Li)T1:¬Thief(x)∨ANSWER(x)3)归结演绎求解T2:(C1,C4)Thief(Qian)∨¬Thief(Sun)T3:(C2,T5)Thief(Sun)∨¬Thief(Li)T4:(C2,T2)Thief(Qian)T5:(C3,T3)Thief(Sun)T6:(T1,T4)ANSWER(Qian){Qian/x}T6:(T1,T5)ANSWER(Sun){Sun/x}可知结果为钱和孙都是盗窃犯。7.已知下列事实:小李喜欢容易的课程;小李不喜欢难的课程;工程类的课程都是难的;物理类的课程都是容易的;小吴喜欢所有小李不喜欢的课程;Phy200是物理类课程;Eng300是工程类课程。试求:小李喜欢什么课程?小吴喜欢Eng300课程吗?解:1)谓词公式定义:Like(x,y):x(人)喜欢y(课程)Easy(x):x是简单的课程Eng(x):x是工程类课程Phy(x):x是物理类课程①Easy(x)→Like(Li,x)②¬Easy(x)→¬Like(Li,x)③Eng(x)→¬Easy(x)④Phy(x)→Easy(x)⑤¬Like(Li,x)→Like(Wu,x)⑥Phy(Phy200)⑦Eng(Eng300)⑧Like(Li,x)⑨Like(Wu,Eng300)2)化简为子句集C1:¬Easy(x)∨Like(Li,x)C2:Easy(x)∨¬Like(Li,x)C3:¬Eng(x)∨¬Easy(x)C4:¬Phy(x)∨Easy(x)C5:Like(Li,x)∨Like(Wu,x)C6:Phy(Phy200)C7:Eng(Eng300)T1:¬Like(Li,x)∨ANSWER(x)T2:¬Like(Wu,Eng300)3)归结演绎求解T3:(C1,T1)¬Easy(x)∨ANSWER(x)T4:(C4,T3)¬Phy(x)∨ANSWER(x)T5:(C6,T4)ANSWER(Phy200){Phy200/x}可知结果为小李喜欢Phy200这门课程。T6:(C2,C5)Easy(x)∨Like(Wu,x)T7:(C3,T6)¬Eng(x)∨Like(Wu,x)T8:(C7,T7)Like(Wu,Eng300)T8:(C7,T2)NIL结论得证,小吴喜欢Eng300这门课程。
本文标题:“确定性推理”作业题推理题----答案
链接地址:https://www.777doc.com/doc-5614678 .html