hw2


Tim Finin (finin@cs.umbc.edu)
Wed, 05 Mar 2003 14:28:43 -0500


I'm resending this since we had a problem with email yesterday
which caused some mail sent to majordomo based mailing lists
(like 771) to be lost.

--

if you are still floundering with this problem, try looking at the partial solution in

http://www.cs.umbc.edu/771/current/hw/hw2/partialsolution.P

Note: You will need to represent a list of couples paired so far in your solution. A typical way to represent something like this is as a Prolog list where each element is just a tuple like john+mary.

So, you might expect to see:

>> xsb [xsb_configuration loaded][sysinitrc loaded][packaging loaded] XSB Version 2.2 (Tsingtao) of April 20, 2000 [i686-pc-linux-gnu; mode: optimal; engine: chat; scheduling: batched] | ?- [sm,people]. [Compiling ./sm] [sm compiled, cpu time used: 0.1310 seconds] [sm loaded] [people loaded] yes

| ?- test. Stable couples: [edward + carol,donald + denise,carl + eunice,bill + betty,alan + alice]. yes

| ?-

One key predicate you will have to write is one that takes two couples (e.g., john+mary and bill+sue) and succeeds if they are unstable with respect to each other. (e.g., john prefers sue to mary and at the same time sue prefers john to bill, OR mary prefers bill over john and at the same time bill refers mary to sue).

another predicate you will no doubt need is one which takes a set of pairing so far (e.g., [john+mary,bill+sue]) which we know is stable, and a potential new couple (say george+laura) and succeeds if the new couple is stable with respect to each of the couples in the pairings so far.



This archive was generated by hypermail 2.0b3 on Wed Mar 05 2003 - 14:28:48 EST