From fer@math.binghamton.edu  Mon Dec  6 20:49:33 1999
Received: from math.binghamton.edu (math.binghamton.edu [128.226.2.4])
	by swi.psy.uva.nl (8.9.3/8.9.3) with ESMTP id UAA24308
	for <prolog@swi.psy.uva.nl>; Mon, 6 Dec 1999 20:49:32 +0100 (MET)
Received: (from fer@localhost)
	by math.binghamton.edu (8.9.3/8.9.3) id OAA29854;
	Mon, 6 Dec 1999 14:49:27 -0500 (EST)
From: Fernando Guzman <fer@math.binghamton.edu>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <14412.4934.638068.260159@gargle.gargle.HOWL>
Date: Mon, 6 Dec 1999 14:49:26 -0500 (EST)
To: alexandra romantseva <afromant@midway.uchicago.edu>,
        <prolog@swi.psy.uva.nl>
Subject: RE: How to write join(X,Y)??
In-Reply-To: <199912060440.WAA13027@harper.uchicago.edu>
References: <199912060440.WAA13027@harper.uchicago.edu>
X-Mailer: VM 6.72 under Emacs 20.2.1

alexandra romantseva writes:
 > Hello!
 > 
 > I was wondering if anyone can PLEASE help me write a definition for
 > join(X,Y). 
 > I need join(X,Y) join the two equivalence relations X and Y, so that
 > positions equivalent 
 > whenever either of X or Y become then equivalent.  

Alexandra,
  what you need to do is compose the two relations X and Y iteratively
until the result stabilizes.  That is, compute the following
compositions:
XoY			XoY means X composed with Y as binary relations
XoYoX
XoYoXoY
XoYoXoYoX
and so on, until you get nothing new. At that point stop.  You now
have the join of the two equivalence relations.  If X and Y are
finite, and as far as Prolog is concerned they better be, then the
process is guaranteed to stop.

-- 
Fernando Guzman
fer@math.binghamton.edu

