逻辑等价的判定(p-→q)和p>-是否逻辑等价?(p-→>q) =一(pvq)=(p) q=pv-qpaq→vq是否永真?pq→pq =-(pq) (pvq)=(-pV-) V(pV)=-pvp-qvq=T6
逻辑等价的判定 ⚫ ¬(p→q)和p¬q是否逻辑等价? ¬(p→q) ¬(¬pq) ¬(¬p) ¬q p ¬q ⚫ pq → pq是否永真? pq → pq ¬(pq) (pq) (¬p ¬q) (pq) ¬pp ¬q q T 6
(续)通过逻辑等价进行推理We know that Bill, Jim and Sam are from Boston, Chicagoand Detroit, respectively. Each of following sentence ishalf right and half wrong:Bill is from Boston, and Jim is from ChicagoSam is from Boston, and Bill is from ChicagoJim is from Boston, and Bill is from Detroit.Tell the truth about their home town7
通过逻辑等价进行推理(续) We know that Bill, Jim and Sam are from Boston, Chicago and Detroit, respectively. Each of following sentence is half right and half wrong: Bill is from Boston, and Jim is from Chicago. Sam is from Boston, and Bill is from Chicago. Jim is from Boston, and Bill is from Detroit. Tell the truth about their home town. 7
(续)通过逻辑等价进行推理We set :P1 = Billis from BostonPiAP, is FalseP2 = Jim is from Chicago.Piapyis FalseP3 = Sam is from BostonP2AP4isFalseP2^Ps is FalseP4 =Billis from ChicagoP5=Jimis fromBostonP6 = Billis from Detroit.So, We have:((p1^~p2) v(~p1p2) ^ ((p3^~p4) v(~p3^p4)) ^((p5~p6) v(~p5^p6)) is true8
通过逻辑等价进行推理(续) ⚫ We set : ⚫ P1 = Bill is from Boston ⚫ P2 = Jim is from Chicago. ⚫ P3 = Sam is from Boston ⚫ P4 = Bill is from Chicago. ⚫ P5 = Jim is from Boston ⚫ P6 = Bill is from Detroit. ⚫ So, We have: ⚫ ((p1~ p2) (~p1p2)) ((p3~ p4) (~p3p4)) ((p5~ p6) (~p5p6)) is true p1 p3 is False p1 p4 is False p2 p4 is False p2 p5 is False . 8
(续)通过逻辑等价进行推理We have:((p1A~P2)(~P1P2))((p3A~P4)(~P3P4))(ps~P)(~PsP)Note: (pi△~P2)v(~P1NP2) ^ (p3^~ p4) v(~P3△p4)So,(~p1^p2^p3^~p4)[注意前述条件]And (~P1△P2P3△~p4)^(Ps△~P6)v(~Ps△P6))So, (~p1^p2^p3^~p4^~p5^p6) is TrueSo, Jim is from Chicago, Sam is from Boston, and Bill is fromDetroit.9
通过逻辑等价进行推理(续) We have: ((p1~p2 )(~p1p2 ))((p3~p4 )(~p3p4 ))((p5~p6 )(~p5p6 )) Note: ((p1~ p2 )(~p1p2 )) ((p3~ p4 ) (~p3p4 )) So, (~p1p2p3~ p4) [注意前述条件] And (~p1p2p3~ p4 )((p5~p6 )(~p5p6 )) So, (~p1p2p3~ p4~p5p6) is True So, Jim is from Chicago, Sam is from Boston, and Bill is from Detroit. 9
Sudoku谜题(九宫格数独游戏)32×32的网格,32个3×3的子网格。每行、每列及每宫填入数字1-9且不能重复。4294→51442467535791610
Sudoku谜题(九宫格数独游戏) ⚫ 3 23 2的网格,3 2个33的子网格。 ⚫ 每行、每列及每宫填入数字1-9且不能重复。 4 9 4 5 4 1 2 6 5 7 1 7 3 5 9 6 2 4 → 4 10