[Jprogramming] Arc consistency in J
Linda Alvord
lindaalvord at verizon.net
Mon Nov 5 10:09:22 UTC 2012
-----Original Message-----
From: programming-bounces at forums.jsoftware.com
[mailto:programming-bounces at forums.jsoftware.com] On Behalf Of Michal D.
Sent: Sunday, November 04, 2012 11:26 PM
To: programming at jsoftware.com
Subject: Re: [Jprogramming] Arc consistency in J
> >> variables. In other words, if we specify the constraint x < y it
> >> looks like either x1 < x2 or x2 < x1 is sufficient to satisfy arc
> >> consistency. In other words, i think we should always use the
> >> symmetric closure of the constraint.
> >
> >> Does this sound valid to you?
> >
> > Unfortunately not. There are no values that can satisfy x1<x2 and
x2<x1.
> > If this was the case all csps would have no solutions
>
> I meant x1<x2 OR x2<x1
>
> So symmetric closure was the wrong term for me to use.
>
> But I think we want to be using intersection of the relationship with
> its inverse.
>
> Does that sound right to you?
>
Sorry I missed the or. Unfortunately not, I mean you can have a constraint
like that if you want but you don't have to have to in general. I think
we're dwelling on an implementation detail. They (wikipedia) must just have
the < constraint propagating both ways.
My brain is fried but I did hack together an ugly search procedure. You can
try it out on a sudoku puzzle if you want. For some reason I couldn't
generate it using the code you gave me. http://pastebin.com/2zPB4DBA
Maybe we can update the printf docs to say:
load 'format/printf'
http://www.jsoftware.com/help/jforc/input_and_output.htm
Cheers,
Mike
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
More information about the Programming
mailing list