A simple problem, but a problem ...
From: Andr? I. (ia_at_bluemail.ch)
Date: 12/06/04
- Next message: Markus Triska: "Re: A simple problem, but a problem ..."
- Previous message: Jan Wielemaker: "Re: XPCE recognisers"
- Next in thread: Markus Triska: "Re: A simple problem, but a problem ..."
- Reply: Markus Triska: "Re: A simple problem, but a problem ..."
- Reply: Bill Spight: "Re: A simple problem, but a problem ..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 5 Dec 2004 15:04:48 -0800
Hello,
can anyone solve the following problem ?
It looks quite simple to me, but I can't get it right.
The advice suggests the following:
mr(yes).
mr(no).
mrs(yes).
mrs(no).
marcel(yes).
marcel(no).
jacqu(yes).
jacqu(no).
grandpa(yes).
grandpa(no).
but how can I use this to solve the problem ?
thanx a lot
Maxx
Problem:
If Mr. Johnson goes, his wife goes too.
At least one of the children, Marcel or Jacqueline, goes too.
If Marcel goes, grandpa goes too.
If Mrs. Johnson goes, grandpa stays at home.
If Jacqueline goes, Mr. Johnson and Marcel go too.
Write a prolog program, which determines, which members of the
family Johnson, given the mentioned restrictions, will go to the party.
Advice: Create a variable for each member of the family, which can have
the constant values 'yes' or 'no'.
- Next message: Markus Triska: "Re: A simple problem, but a problem ..."
- Previous message: Jan Wielemaker: "Re: XPCE recognisers"
- Next in thread: Markus Triska: "Re: A simple problem, but a problem ..."
- Reply: Markus Triska: "Re: A simple problem, but a problem ..."
- Reply: Bill Spight: "Re: A simple problem, but a problem ..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|