第1章1.1解图如下:((AB),(),())((B),(A),())((),(BA),())(1)1-2(2)1-3(3)2-3规则顺序定义如下:(6)3-2(5)3-1(4)2-1((),(A),(B))((),(),(AB))((A),(),(B))((),(A),(B))((),(),(AB))((BA),(),())((A),(B),())((),(AB),())非法节点祖先节点祖先节点非法节点1.2h(n)=∑每个W左边B的个数;h(n)满足A*条件;h(n)满足单调限制(大家分析)。1.3h1(n)=cij,一般情况不满足A*条件,但此题满足;ACDEBA=34;h2(n)=|cij-AVG{(cij)|,不满足A*条件;ACBDEA=42;1.4此题最优步数已定,具有A*特征的启发函数对搜索无引导作用。1.5此题启发式函数见P41。1.10规定每次一个圆盘按固定方向(如逆时针)转动45°;可用盲目搜索算法构造搜索树;也可构造启发式函数如:h(n)=8个径向数字和与12的方差。1.11状态空间数:9!=362880;有用的启发信息:1)平方数为3位数的数字:10~31;2)平方的结果数字各位不能重复:13,14,16,17,18,19,23,24,25,27,28,29,31;只需校验313C=286种状态。361529784第2章2.1解图:6334221211111312221111111112.5后手只要拿走余下棋子-1的个数即可。第3章3.18以下符号中□表示¬(1)证明:待归结的命题公式为)(PQP→¬∧,求取子句集为},,{PQP¬,对子句集中的子句进行归结可得可得原公式成立。(2)证明:待归结的命题公式为())(()())PQRPQPR→→∧→→→∼(,合取范式为:()()PQRPQPR∨∨∧∨∧∧∼∼∼∼,求取子句集为{,,,}SPQRPQPR=∨∨∨∼∼∼∼,对子句集中的子句进行归结可得:1PQR∨∨∼∼2PQ∨∼3P4R∼5Q②③归结6PR∨∼①④归结7R③⑥归结8□④⑦归结由上可得原公式成立。(3)证明:待归结的命题公式为()(())QPQPQ→∧→→∼∼∼,合取范式为:()()QPQPQ∨∧∨∧∼∼∼,求取子句集为{,,}SQPQPQ=∨∨∼∼∼,对子句集中的子句进行归结可得:1QP∨∼∼2Q3QP∨∼4P∼①②归结5P②③归结6□④⑤归结由上可得原公式成立。3.19答案(1){/,/,/}mguaxbybz=(2){(())/,()/}mgugfvxfvu=(3)不可合一(4){/,/,/}mgubxbybz=3.23证明R1:所有不贫穷且聪明的人都快乐:(()()())xPoorxSmartxHappyx∀∧→∼R2:那些看书的人是聪明的:(()())xreadxSmartx∀→R3:李明能看书且不贫穷:()()readLiPoorLi∧∼R4:快乐的人过着激动人心的生活:(()())xHappyxExcitingx∀→结论李明过着激动人心的生活的否定:()ExcitingLi∼将上述谓词公式转化为子句集并进行归结如下:由R1可得子句:1()()()PoorxSmartxHappyx∨∨∼由R2可得子句:2()()readySmarty∨∼由R3可得子句:3()readLi4()PoorLi∼由R4可得子句:5()()HappyzExcitingz∨∼有结论的否定可得子句:6()ExcitingLi∼根据以上6条子句,归结如下:7()HappyLi∼⑤⑥Li/z8()()PoorLiSmartLi∨∼⑦①Li/x9()SmartLi∼⑧④10()readLi∼⑨②Li/y11□⑩③由上可得原命题成立。第4章4.9答案有毛发有奶哺乳动物有羽毛会飞会下蛋鸟吃肉肉食动物有蹄有爪有犬齿眼盯前方有蹄动物嚼反刍动物黄褐色身上有暗斑点金钱豹黑色条纹虎长脖子长腿长颈鹿斑马不会飞鸵鸟会游泳有黑白两色企鹅善飞信天翁4.11答案李强副教授计算机系某大学Is-aWork-atPart-of北京Located-at教师A-kind-of35岁Age第5章5.10答案解:12(56)max{(5),(6)}0.8(4(56))min{(4),(56)}0.5(1)max{0,(4(56))}(1,4(56))0.50.80.4()max{0,(1)}(,1)0.40.90.36()max{0,(2)}(,2CFEECFECFECFEEECFECFEECFECFEEECFEEEECFHCFECFHECFHCFECFHE∨==∧∨=∨==∧∨×∧∨=×==×=×==×3121212123)0.80.60.48()max{0,(3)}(,3)0.60.50.3()()()()()0.360.480.360.480.6672()()()0.66720.30.3672CFHCFECFHECFHCFHCFHCFHCFHCFHCFHCFH=×==×=×−=−=+−=+−×==+=−=5246.0}3.0,6672.0min{13.06672.0|})(||,)(min{|1)()()(312312123=−−=−+=HCFHCFHCFHCFHCF5.15已知:1.0)|(1.0)|(9.0)|(8.0)|(1)|(9.0)|(5.0)(0)|(95.0)|(=¬=¬¬==¬=¬=¬===FSpSLEpFSpLSEpFLpSLEpFpFLpLSEp求:)|(EFp1)求)|(FEp73.001.072.0)|(01.01.011.0)|()|()|()()(72.09.018.0)|()|()|()()(0)()()|()|()|()()(0)|()|()|()()()|()|()()()|()()()()()()()()()()()|()|()|()|()|(=+==××=¬¬¬¬=¬¬=××=¬¬=¬=¬¬=¬====¬¬+¬+¬+=¬¬+¬+¬+=FEpFSpFLpSLEpFpSFLEpFSpFLpLSEpFpLSFEpFpFpFSpFLpSLEpFpSFELpFSpFLpLSEpFpFpFLSpLSFEpFpLSFpLSFEpFpELSFpFpSFLEpFpLSFEpFpSFELpFpELSFpFSLEpFLSEpFSELpFELSpFEp2)同理可求:)|(FEp¬905.081.0095.0)|(0)|()|()|()()(0)|()|()|()()(81.09.019.0)|()|()|()()()|()|()|()()(095.01.0195.0)|()|()|()()()|()|()()()|()()()()()()()()()()()|()|()|()|()|(=+=¬=¬¬¬¬¬¬=¬¬¬¬=¬¬¬¬=¬¬¬=××=¬¬¬¬=¬¬¬¬¬¬=¬¬¬=××=¬¬=¬¬¬¬=¬¬¬=¬¬¬¬¬¬+¬¬¬+¬¬¬+¬¬=¬¬¬+¬¬+¬¬+¬=¬FEpFSpFLpSLEpFpFSLEpFSpFLpLSEpFpFLSEpFSpFLpSLEpFpFpFSpFLpSLEpFpFSELpFSpFLpLSEpFpFpFLSpFLSEpFpFLSpFLSEpFpFELSpFpFSLEpFpFLSEpFpFSELpFpFELSpFSLEpFLSEpFSELpFELSpFEp3)利用Bayes公式和逆事件概率公式求出)|(EFp由Bayes公式:)(4525.0)(5.0905.0)()()|()|()(365.0)(5.073.0)()()|()|(EpEpEpFpFEpEFpEpEpEpFpFEpEFp=×=¬¬=¬=×==由逆事件概率公式:8175.0)(1)(4525.0)(365.01)|()|(=⎯→⎯=+⎯→⎯=¬+EpEpEpEFpEFp最终:4465.08175.0365.0)(365.0)|(≈==EpEFp