Hello Josh, I would be glad you share your code :)

Piotr


2013/6/18 David Nolen <dnolen.li...@gmail.com>

> This is a variant of the Zebra/Einstein Puzzle. You can probably Google
> for "miniKanren core.logic zebra" and find a solution if you get stuck ;)
>
> David
>
>
> On Tue, Jun 18, 2013 at 7:57 AM, Josh Kamau <joshnet2...@gmail.com> wrote:
>
>> Hi ;
>>
>> I am trying to learn clojure core.logic. I have gone through some
>> documentation on github by David Nolen.  I am now trying to solve this
>> problem:  Anyone willing to do some practice can try and share the
>> solution.
>>
>>  *SOLVE THIS PROBLEM.*
>>
>> *The Diplomats at Muthaiga Estate*
>>
>> The facts essential to solving the problem - which can indeed be solved
>> by combining deduction, analysis, and sheer persistence - are as follows.
>> Givens
>>
>>    1.
>>
>>    There are five houses, each of a different colour and inhabited by
>>    people of different nationalities, with different pets, drinks, and
>>    pastimes.
>>    2.
>>
>>    The English live in the Red house.
>>    3.
>>
>>    The Spaniards own the Dog.
>>    4.
>>
>>    Coffee is drunk in the Green house.
>>    5.
>>
>>    The Ukrainians drink Tea.
>>    6.
>>
>>    The Green house is immediately to the right (your right) of the Ivory
>>    house.
>>    7.
>>
>>    The Chess players own Snails.
>>    8.
>>
>>    Scrabble is played in the Yellow house.
>>    9.
>>
>>    Milk is drunk in the Middle house.
>>    10.
>>
>>    The Norwegians live in the First house on the Left.
>>    11.
>>
>>    People who play Cribbage live in the house next to the people who own
>>    a pet Fox.
>>    12.
>>
>>    Scrabble is played in the house next to the house where the Horse is
>>    kept.
>>    13.
>>
>>    The Bridge players drink Orange Juice.
>>    14.
>>
>>    The Japanese play Monopoly.
>>    15.
>>
>>    The Norwegians live next to the Blue house.
>>
>>
>>
>>
>>
>>  *ANSWER THE FOLLOWING QUESTIONS*.
>>
>> Who drinks water? And who owns the Zebra?
>>
>> 1. The WATER drinkers are:
>>
>>    1.
>>
>>    *English <http://www.brocku.ca/sdc/leadership/water_answer_page_2.php>
>>    *
>>    2.
>>
>>    *Spaniards<http://www.brocku.ca/sdc/leadership/water_answer_page_2.php>
>>    *
>>    3.
>>
>>    *Norwegians<http://www.brocku.ca/sdc/leadership/water_answer_page_1.php>
>>    *
>>    4.
>>
>>    *Japanese<http://www.brocku.ca/sdc/leadership/water_answer_page_2.php>
>>    *
>>    5.
>>
>>    I Give UP!! *Tell Me Who Drinks The 
>> Water<http://www.brocku.ca/sdc/leadership/water_answer_page_1.php>
>>    *
>>
>>  2. Who owns the Zebra?
>>
>>    1.
>>
>>    *English <http://www.brocku.ca/sdc/leadership/water_answer_page_2.php>
>>    *
>>    2.
>>
>>    *Spaniards<http://www.brocku.ca/sdc/leadership/water_answer_page_2.php>
>>    *
>>    3.
>>
>>    *Norwegians<http://www.brocku.ca/sdc/leadership/water_answer_page_1.php>
>>    *
>>    4.
>>
>>    *Japanese<http://www.brocku.ca/sdc/leadership/water_answer_page_2.php>
>>    *
>>    5.
>>
>>    I Give UP!!! *Tell Me Who Drinks The Water And Who Owns The 
>> Zebra<http://www.brocku.ca/sdc/leadership/both_answers.php>
>>    *
>>
>>  --
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Clojure" group.
>> To post to this group, send email to clojure@googlegroups.com
>> Note that posts from new members are moderated - please be patient with
>> your first post.
>> To unsubscribe from this group, send email to
>> clojure+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "Clojure" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to clojure+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>
>  --
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to