Re: 請問兩個logic問題(in English)

看板logic作者 (puffs)時間21年前 (2004/10/31 23:46), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串2/5 (看更多)
※ 引述《mckey (相信台灣堅持改革￾  )》之銘言: : 第一題就是說謊和誠實的地藏王菩薩題目 : 到 inference 版... 很久之前...有一連串討論... : 基本上...不可能只用一個問題就可以問出來.. : 除非先界定什麼叫做 "one question" : 例如"if... then..." 算是"one question"嗎?? : 如果可以.. 那此題就有解了... 其實可以不必在字面上打轉 第一 "if... then...?" 就是一個問題 為什麼那是一個問題呢? 因為它只期待一個答案 (村民只會回答你yes or no) 第二 事實上你不要用if then也可以問到你想要問的 回原PO 你可以問 "如果我問一個永遠說謊的村民 他會指這條路嗎?" 或 "永遠說謊的村民會指這條路給我嗎?" : 第二題題目 : If Fred 不是最高薪 --> Janice 是最高薪 : If Janice 不是最低薪 --> Maggie 是最高薪 : 由此可見.. Fred 是最高薪.. 否則這兩項fact 互相矛盾 : 再來 如果 J 不是最低薪.. 則M和F會互相矛盾 : 所以..J 是最低薪 : 答案 F > M > J 以 F J M 代表三人, 1 2 3 代表排序 原提目改寫成 if ( F = 2 or 3) {J = 1}; if ( J = 1 or 2) {M = 1}; 推理 case 1: 假設 J = 1, 則根據第二條規則, M = 1, 和假設相悖. case 2: 假設 M = 1, 則 F = 2 or 3, 根據第一條規則, J = 1, 和假設相悖. case 3: 假設 F = 1, (事實上其他兩者已被排除 這個假設一定正確) 再假設 J = 2, 根據第二條規則, M = 2, 和假設相悖. 故得知 F = 1, M = 2, J = 3. : ※ 引述《l314 (紅虫)》之銘言: : : 兩題皆來自<<Discrete Mathematics and its applications) : : 請高手們指導...orz : : 1.Each inhabitant of a remote village always tells the truth or always lies. : : A villager will only give a "yes" or a "no" response to a question a tourist : : asks. Suppose you are a tourist visiting this area and come to a fork in : : the road. One branch leads to the ruins you want to visit; the other branch : : leads deep into the jungle. A villager is standing at the fork in the road. : : What one question can you ask th villager to determine which branch to take? : : 2.Steve would like to determine the relative salaries of three coworkers : : using two facts. First, he knows that if Fred is not the highest paid of : : the three, then Janice is. Second, he knows that if Janice is not the lowest : : paid, then Maggie is paid the most. Is it possible to determine the relative : : salaried of Fred,Maggie, and Janice from what Steve knows? If so,who is paid : : the most and who the least? Explain your reasoning. -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 218.166.97.148
文章代碼(AID): #11XGZT6P (logic)
討論串 (同標題文章)
文章代碼(AID): #11XGZT6P (logic)