Re: disjunctive constraints, use of ~= ?

From: Ulrich Scholz <scholz_at_inferenzsysteme.informatik.tu-darmstadt.de>
Date: Fri 25 Apr 2003 02:17:29 PM GMT
Message-ID: <20030425141729.GB21950@kiwi.intellektik.informatik.tu-darmstadt.de>
Sorry.  

Of course you are right in that set-disequality and set-disjointness are not
the same.

I forgot to say that in my case, I solely consider interger sets with
cardinality one, thus all variables are variables of integer sets with
cardinality one, ie

Y subset [1,2,3], #(Y,1).

In this special case, set-disequality and set-disjointness are the same.  But
of course you can generalize my question on general disjunctive constraints.

Uli

On Fri, Apr 25, 2003 at 02:08:53PM +0100, Joachim Schimpf wrote:
> Ulrich Scholz wrote:
> > 
> > I would like to formulate disjunctive constraints with set variables
> > (fd_sets).  An example is
> > 
> > either X1 disjoint X1 or Y1 disjoint Y2
> > 
> > where X1 .. Y2 are interger sets.  Currently, I'm simulating this with ~=
> > (notinstance), eg
> > 
> > [X1, Y1] ~= [X2, Y2].
> > 
> > This works quite well.
> 
> But set-disequality and set-disjointness are not the same!?
> 
> ?- X1=[1,2],X2=[1,2],Y1=[1,2],Y2=[1,3],
>    [X1, Y1] ~= [X2, Y2].
> 
> X1 = [1, 2]
> Y1 = [1, 2]
> X2 = [1, 2]
> Y2 = [1, 3]
> Yes (0.00s cpu)
> 
> ?- X1=[1,2],X2=[1,2],Y1=[1,2],Y2=[1,3],
>    ( X1 disjoint Y1 ; X2 disjoint Y2 ).
> 
> No (0.00s cpu)
> 

-- 
Ulrich Scholz

scholz@informatik.tu-darmstadt.de
http://www.intellektik.informatik.tu-darmstadt.de/~scholz
Received on Fri Apr 25 17:59:17 2003

This archive was generated by hypermail 2.1.8 : Wed 16 Nov 2005 06:07:23 PM GMT GMT