*     It is Result
*
*  (Norwegian   Yellow Dunhill   Cat   Water )
*  (Dane        Blue   Marlboro  Horse Tea   )
*  (Englishman  Red    PallMall  Bird  Milk  )
*  (German      Green  Rothmans  Fish  Coffee)
*  (Swede       White  Winfield  Dog   Beer  )

*$STRATEGY Applicative;

$ENTRY Go {
 e.1 = <F
         <F1 (German   Englishman Swede    Dane     Norwegian )
         <F2 (Red      Green      White    Yellow   Blue      )
         <F3 (PallMall Marlboro   Winfield Rothmans Dunhill   )
         <F4 (Dog      Fish       Bird     Cat      Horse     )
         <F5 (Tea      Coffee     Milk     Water    Beer      )
           <Z15 <Z14 <Z13 <Z12 <Z11
           <Z10 <Z9  <Z8  <Z7  <Z6
           <Z5  <Z4  <Z3  <Z2  <Z1 e.1 >>>>> >>>>> >>>>>
         >>>>>
       >;
 }


F {
 (s.1 s.2 s.3 Fish s.5) e.b = s.1 ;
 (s.1 s.2 s.3 s.4  s.5) e.b = <F e.b>;
 }

*====================================================

* 1. The Englishman lives in the red house.
Z1 {
 (Englishman Red s.3 s.4 s.5) e.b =
 (Englishman Red s.3 s.4 s.5) e.b;

 t.1 e.b = t.1 <Z1 e.b>;
 }

* 2. The swede holds a dog.
Z2 {
 (Swede s.2 s.3 Dog s.5) e.b =
 (Swede s.2 s.3 Dog s.5) e.b;

 t.1 e.b = t.1 <Z2 e.b>;
 }

* 3. The Dane drinks tea.
Z3 {
 (Dane s.2 s.3 s.4 Tea) e.b =
 (Dane s.2 s.3 s.4 Tea) e.b;

 t.1 e.b = t.1 <Z3 e.b>;
 }

* 4. The green house stands to the left of white.
Z4 {
 (s.1 Green s.3 s.4 s.5) (s.11 White s.31 s.41 s.51) e.b =
 (s.1 Green s.3 s.4 s.5) (s.11 White s.31 s.41 s.51) e.b;

 t.1 e.b = t.1 <Z4 e.b>;
 }

* 5. The tenant of a green house drinks coffee.
Z5 {
 (s.1 Green s.3 s.4 Coffee) e.b =
 (s.1 Green s.3 s.4 Coffee) e.b;

 t.1 e.b = t.1 <Z5 e.b>;
 }

* 6. The man, which smokes PallMall, holds a bird.
Z6 {
 (s.1 s.2 PallMall Bird s.5) e.b =
 (s.1 s.2 PallMall Bird s.5) e.b;

 t.1 e.b = t.1 <Z6 e.b>;
 }

* 7. The tenant from an average house drinks milk.
Z7 {
 t.a t.b (s.1 s.2 s.3 s.4 Milk) t.c t.d =
 t.a t.b (s.1 s.2 s.3 s.4 Milk) t.c t.d;
 }

* 8. The tenant from a yellow house smokes Dunhill.
Z8 {
 (s.1 Yellow Dunhill s.4 s.5) e.b =
 (s.1 Yellow Dunhill s.4 s.5) e.b;

 t.1 e.b = t.1 <Z8 e.b>;
 }

* 9. The Norwegian lives in the first house.
Z9 {
 (Norwegian s.2 s.3 s.4 s.5) e.b = (Norwegian s.2 s.3 s.4 s.5) e.b;
 }

* 10. Smoker Marlboro Lives about the one who holds the cat.
Z10 {
 (s.1 s.2 Marlboro s.4 s.5) (s.11 s.21 s.31 Cat s.51) e.b =
 (s.1 s.2 Marlboro s.4 s.5) (s.11 s.21 s.31 Cat s.51) e.b;

 (s.1 s.2 s.3 Cat s.5) (s.11 s.21 Marlboro s.41 s.51) e.b =
 (s.1 s.2 s.3 Cat s.5) (s.11 s.21 Marlboro s.41 s.51) e.b;
 
 t.1 e.b = t.1 <Z10 e.b>;
 }

* 11. The man, which holds the horse, lives about the one who smokes Dunhill.
Z11 {
 (s.1 s.2 Dunhill s.4 s.5) (s.11 s.21 s.31 Horse s.51) e.b =
 (s.1 s.2 Dunhill s.4 s.5) (s.11 s.21 s.31 Horse s.51) e.b;

 (s.1 s.2 s.3 Horse s.5) (s.11 s.21 Dunhill s.41 s.51) e.b =
 (s.1 s.2 s.3 Horse s.5) (s.11 s.21 Dunhill s.41 s.51) e.b;
    
 t.1 e.b = t.1 <Z11 e.b>;

 }

* 12. Smoker of cigarettes Winfield Drinks beer.
Z12 {
 (s.1 s.2 Winfield s.4 Beer) e.b =
 (s.1 s.2 Winfield s.4 Beer) e.b;

 t.1 e.b = t.1 <Z12 e.b>;
 }

* 13. The Norwegian lives about a blue house.
Z13 {
 (Norwegian s.2 s.3 s.4 s.5) (s.11 Blue s.31 s.41 s.51) e.b =
 (Norwegian s.2 s.3 s.4 s.5) (s.11 Blue s.31 s.41 s.51) e.b;

 (s.1 Blue s.3 s.4 s.5) (Norwegian s.21 s.31 s.41 s.51) e.b =
 (s.1 Blue s.3 s.4 s.5) (Norwegian s.21 s.31 s.41 s.51) e.b;
    
 t.1 e.b = t.1 <Z13 e.b>;
 }

* 14. German smokes Rothmans.
Z14 {
 (German s.2 Rothmans s.4 s.5) e.b =
 (German s.2 Rothmans s.4 s.5) e.b;

 t.1 e.b = t.1 <Z14 e.b>;
 }

* 15. Smoker Marlboro Lives on a neighbourhood with the man, which drinks water.
Z15 {
 (s.1 s.2 Marlboro s.4 s.5) (s.11 s.21 s.31 s.41 Water) e.b =
 (s.1 s.2 Marlboro s.4 s.5) (s.11 s.21 s.31 s.41 Water) e.b;

 (s.1 s.2 s.3 s.4 Water) (s.11 s.21 Marlboro s.41 s.51) e.b =
 (s.1 s.2 s.3 s.4 Water) (s.11 s.21 Marlboro s.41 s.51) e.b;
    
 t.1 e.b = t.1 <Z15 e.b>;
 }

*=========================================================

F5 {
  ( ) e.3 = e.3;
  (s.1 e.2) e.3 = <F5 (e.2) <F51 s.1 e.3>>;
 }

F51 {
 s.a (s.1 s.2 s.3 s.4 s.a) e.b = (s.1 s.2 s.3 s.4 s.a) e.b;
 s.a t.1 e.b = t.1 <F51 s.a e.b>;
 }

F4 {
  ( ) e.3 = e.3;
  (s.1 e.2) e.3 = <F4 (e.2) <F41 s.1 e.3>>;
 }

F41 {
 s.a (s.1 s.2 s.3 s.a s.5) e.b = (s.1 s.2 s.3 s.a s.5) e.b;
 s.a t.1 e.b = t.1 <F41 s.a e.b>;
 }

F3 {
  ( ) e.3 = e.3;
  (s.1 e.2) e.3 = <F3 (e.2) <F31 s.1 e.3>>;
 }

F31 {
 s.a (s.1 s.2 s.a s.4 s.5) e.b = (s.1 s.2 s.a s.4 s.5) e.b;
 s.a t.1 e.b = t.1 <F31 s.a e.b>;
 }

F2 {
  ( ) e.3 = e.3;
  (s.1 e.2) e.3 = <F2 (e.2) <F21 s.1 e.3>>;
 }

F21 {
 s.a (s.1 s.a s.3 s.4 s.5) e.b = (s.1 s.a s.3 s.4 s.5) e.b;
 s.a t.1 e.b = t.1 <F21 s.a e.b>;
 }

F1 {
  ( ) e.3 = e.3;
  (s.1 e.2) e.3 = <F1 (e.2) <F11 s.1 e.3>>;
 }

F11 {
 s.a (s.a s.2 s.3 s.4 s.5) e.b = (s.a s.2 s.3 s.4 s.5) e.b;
 s.a t.1 e.b = t.1 <F11 s.a e.b>;
 }

*==== End ======= End =========== End =========