9-11 May 2003
CELEBRITY
At a party, a personis a celibrity if
is a person whom everyone knows and who knows no one. For instance, in the figure below, it is represented a party with celebrity Ivo (an arrow from
to
represents that A knows B).
Given that parties without celebrities are not interesting, they are not even considered as such.
Example:
people([ana,ze,to,rui,ivo]).
knows(ana,to).
knows(ana,ivo).
knows(ze,ivo).
...
The invocation of the program should be done through the predicate celebrity/1,
which parameter should become unified with the celebrity of the party.