When n=7, d=3, D will contain only 1s while E will typically contain a
mix of 1s and 0s.

I do not know enough about the purpose of this code to comment on
which is better.

-- 
Raul

On Mon, Nov 5, 2012 at 5:11 AM, Linda Alvord <lindaalv...@verizon.net> wrote:
> I just began to ponder this thread. Do you think E is the same as D?
>
> D=. (n%2) > (?]) n$d
> E=. ?(n,d)$2
>
> Linda
>
> -----Original Message-----
> From: programming-boun...@forums.jsoftware.com
> [mailto:programming-boun...@forums.jsoftware.com] On Behalf Of Michal D.
> Sent: Sunday, November 04, 2012 11:26 PM
> To: programm...@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
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to