0
$\begingroup$

I'm studing computer science at university, in specific Artificial Intelligence. We are using Otter as Theorem prover.

I'm having some problems formalizing this:

"John, Mary and Derek are three people. They work as cook, waiter or manager, but the order is unknown. John, a friend of Mary's brother, is younger than Mary. John's eyes are black. The waiter's eyes are blue. The manager has no brother or sister and he's the oldest. Use Otter to find the correct work of each one."

In particular, formalizing the younger-older relationship, I tried to write it like this:

Formula

But when I write it in otter, the solver starts to loop and never find the solution. Example:

set(auto).

formula_list(usable).
all x y (younger(x, y) & x != y <-> -younger(y, x)).
younger(A, B).

end_of_list.
$\endgroup$
1
$\begingroup$

Try implementing something like: $$ \forall x ~ [isOldest(x) \iff \forall y ~ [\neg isYounger(x,y)]] $$


From the information, we are given that $isYounger(John, Mary)$. Now consider $x = John$. Observe that we have found some $y$ (namely $y = Mary$) such that $isYounger(x,y)$. Hence, by the above rule, it follows that $\neg isOldest(John)$. But since the oldest person is male and the only other male is Derek, we must have that $isOldest(Derek)$ so that Derek is the manager.

$\endgroup$
0
$\begingroup$

Shouldn't it be

all x y (younger(x, y) & x != y <-> -younger(y, x) & x!= y)

?

$\endgroup$
  • $\begingroup$ I obtain the same result: otter loops and can't find any solution. $\endgroup$ – ProGM Dec 2 '13 at 9:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.