Einstein’s Riddle
本篇無解答,請放心食用。
本篇只是一些 note,我本來想寫在 wiki 的,後來想想,還是寫在 blog 好了 :Q
背景說明:
為什麼會說這是 “Einstein’s Riddle” 呢 ? 因為據說這是愛因斯坦在 19 世紀末、他年輕的時候想出來的題目,他認為全世界 98% 的人解不出這個問題。
題目是這樣的 (不同版本可能略有出入):
英文版:
There are five houses in five different colours starting from left to right. In each house lives a person of a different nationality. These owners all drink a certain type of beverage, smoke a certain brand of cigarette and keep a certain type of pet. No two owners have the same pet, smoke the same brand or drink the same beverage. The question is: WHO OWNS THE FISH??? Hints:
- The Brit lives in the red house.
- The Swede has a dog.
- The Dane drinks tea.
- The green house is on the left of the white house.
- The owner of the green house drinks coffee.
- The person who smokes Pall Mall has birds.
- In the yellow house, they smoke Dunhill.
- The man living in the middle house drinks milk.
- The Norwegian lives in the first house.
- The man who smokes Blend lives next to the house with cats.
- The horseman lives next to the man who smokes Dunhill.
- The man who smokes Blue Master drinks beer.
- The German smokes Prince.
- The Norwegian lives next door to the blue house.
- The man who smokes Blend has a neighbor who drinks water.
中文版:
原則:
- 有 5 棟 5 種顏色的房子,從左至右
- 每一位房子的主人國籍都不同
- 這 5 個人每人只喝一個牌子的飲料、只抽一個牌子的香煙、只養一種寵物
- 沒有人有相同的寵物、抽相同牌子的香煙、喝相同的飲料
- 請找出誰養魚 ?
已知條件:
- 英國人住在紅房子裡
- 瑞典人養了一條狗
- 丹麥人喝茶
- 綠房子在白房子左邊
- 綠房子主人喝咖啡
- 抽 Pall Mall 菸的人養了一隻鳥
- 黃房子主人抽 Dunhill 菸
- 住在中間那間房子的人喝牛奶
- 挪威人住在第一間房子
- 抽 Blend 菸的人住在養貓人的旁邊
- 養馬人住在 Dunhill 菸的人旁邊
- 抽 Blue Master 菸的人喝啤酒
- 德國人抽 Pricne 菸
- 挪威人住在藍房子旁邊
- 抽 Blend 菸人的鄰居喝礦泉水
研究:
其實這問題出現在 Programming 版已經不知道幾次了,不過我每次都懶得去看 :p 今天又勾起興趣,是因為看到了一篇用 Common Lisp 寫的解法,其實這很自然,這種邏輯問題本來就是 Lisp 或是 Prolog 的強項;不過我又去拜請了 Google 大神一下,發現了很多有趣的解法,有人用易經八卦來解,有人用 Spreadsheet Optimization (這好像是某種管理學的方法 ?) 來解,也有人用 C++ 來解 (程式看起來真是又臭又長 :Q)…
另,有人做了點考證工作證明不可能是愛因斯坦發明的問題,因為題目裡面的煙品牌的出產年代露了馬腳;另外有人做了說明,說此愛因斯坦非彼愛因斯坦,是 “Al Einstein”、不是 “Albert Einstein”,不過我找不到有關這位 “Al Einstein” 的資訊,我懷疑是他唬我 :/
事實上,我認為這題目根本就跟 Einstein 沒有關係;至於為什麼要扯上 Einstein、還要說什麼全世界 98% 的人解不出來的這種鬼話,我覺得這心態就跟以前常常有很多人寫偽書一樣,隨便找個有名的人湊上去,讓自己的著作能夠流傳下去 :Q
PS. 或許還是 wiki 比較好 ? //think

Write a comment