Tuesday, July 18, 2006

Einstein's Problem

There are a number of variations of this problem, But basically all fall on the same constraint-solving domain. Here is the original version.

Facts:

  1. There are 5 houses (along the street) in 5 different colors:
    blue, green, red, white and yellow.
  2. In each house lives a person of a different nationality:
    Brit, Dane, German, Norwegian and Swede.
  3. These 5 owners drink a certain beverage:
    beer, coffee, milk, tea and water,
  4. smoke a certain brand of cigar:
    Blue Master, Dunhill, Pall Mall, Prince and blend,
  5. and keep a certain pet:
    cat, bird, dog, fish and horse.
  6. No owners have the same pet, smoke the same brand of cigar, or drink the same beverage.

Hints:

  1. The Brit lives in a red house.
  2. The Swede keeps dogs as pets.
  3. The Dane drinks tea.
  4. The green house is on the left of the white house (next to it).
  5. The green house owner drinks coffee.
  6. The person who smokes Pall Mall rears birds.
  7. The owner of the yellow house smokes Dunhill.
  8. The man living in the house right in the center drinks milk.
  9. The Norwegian lives in the first house.
  10. The man who smokes blend lives next to the one who keeps cats.
  11. The man who keeps horses lives next to the man who smokes Dunhill.
  12. The owner who smokes Blue Master drinks beer.
  13. The German smokes Prince.
  14. The Norwegian lives next to the blue house.
  15. The man who smokes blend has a neighbor who drinks water.

The question is:

Who keeps fish?

Thursday, July 06, 2006

閒聊

世界盃轉眼又打到決賽,之前看好的阿根廷,可惜一早已經出局。跟老細由四強開始打賭,注碼一個午餐,目前己經穩吃兩頓"白"飯,只差決賽,施丹加油呀!

旅行的相正以十分緩慢的進度處理中,新機未熟手影得差無辨法。另外有幾十張save係陳基部機,要等佢番黎先攞到....

部腦又唔生性,有得聽歌就冇得上網,一係就hang機,唉,打亂哂我原定的升級計劃,拜託頂多半年,至少都要等conroe大賣先,唔該...