作者catso (catso)
站内logic
标题Re: [请益] 有个逻辑宝箱问题
时间Tue Oct 4 12:37:31 2005
首先假设黄金必然在箱子里,且只可能在甲乙中的一个箱子里。用FOL形式化系统:
isT(x) :x说真话
isG(x) :黄金在x中
常量(constant):A为甲,B为乙
根据题意可得如下规则(rule):
(1) isT(A) -> isT(B) ^ isG(A)
(2) isT(B) -> not isT(A) ^ isG(A)
(3) not isT(A) -> not isT(B) v not isG(A)
(4) not isT(B) -> isT(A) v not isG(A)
(5) not isG(A) -> isG(B)
分四种情况讨论
(a) 甲乙都说真话:
即有事实:isT(A), isT(B)
根据(1),(2)此时系统认知为以下合取式(conjunction):
isT(A) ^ isT(B) ^ isG(A) ^ not isT(A)
此式显然永假,故命题(proposition)(a)不成立。
(b) 甲说假话并且乙说真话:
即有事实:not isT(A), isT(B)
根据(3),(2)此时系统认知为:
not isT(A) ^ (not isT(B) v not isG(A)) ^ isT(B) ^ isG(A)
根据De Morgan法则,此式等价于:
not isT(A) ^ not (isT(B) ^ isG(A)) ^ (isT(B) ^ isG(A))
此时显然永假,故命题(b)不成立。
(c) 甲说真话并且乙说假话:
即有事实:isT(A), not isT(B)
根据(1),(4)此时系统认知为:
isT(A) ^ isT(B) ^ not isT(B) ^ isG(A) ^ (isT(A) v not isG(A))
此式显然永假,故命题(c)不成立。
(d) 甲乙都说假话:
即有事实:not isT(A), not isT(B)
根据(3),(4)此时系统认知为:
not isT(A) ^ not isT(B) ^ (not isT(B) v not isG(A)) ^ (isT(A) v not isG(A))
此式等价于:
not isT(A) ^ not isT(B) ^ not isG(A)
此时当且仅当(iff)not isG(A)成立(根据(5),即isG(B)成立)时,命题(d)成立。
综上所述,根据已知条件,可得甲乙说的都是假话,且黄金在乙箱中。
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 220.240.209.192
※ 编辑: catso 来自: 220.240.209.192 (10/04 16:38)