You are right to question the symbology of C.!.2,
and right to be suspicious of having to look up it 
in the manual.  _All_ cases of u!.n have a scent
of arbitrariness about them because you can not
readily deduce what exactly they do.



----- Original Message -----
From: Marshall Lochbaum <[email protected]>
Date: Monday, October 4, 2010 18:08
Subject: Re: [Jprogramming] Distinct Numbers in Rows and Columns
To: 'Programming forum' <[email protected]>

> My best shot with expansion by minors, if anyone's interested in 
> O(n!):((i.3) -: [: /:~ -.&_1)"1  , .(_1:`...@.=)"2 q
> 
> I retract my comment about <: being unnecessary, though. I 
> have been using
> (i.n) instead of (1+i.n).
> 
> The real reason C.!.2 bothers me is that it makes it seem that 
> C.!.1 is
> taken. I agree that the function can be useful.
> 
> Marshall
> 
> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]] On Behalf Of Henry Rich
> Sent: Monday, October 04, 2010 8:14 PM
> To: Programming forum
> Subject: Re: [Jprogramming] Distinct Numbers in Rows and Columns
> 
> I got to
> 
> -.@(0&e.)@:(C.!.2)@(,|:)@:<:"2
> 
> as the test for whether the item is a Latin square.  I have 
> been trying to
> find some cool test, without success.
> 
> Henry Rich
> 
> On 10/4/2010 7:37 PM, Roger Hui wrote:
> > Great minds think alike, eh?  (But I think you need to 
> test your 
> > expressions ;-)  Go to 
> http://www.jsoftware.com/jwiki/Essays/KenKen> and look about a 
> third of the way down,
> >
> > q #~ (8$15) -:"1 (+/"1 ,. +/"2) q{0,2^i.4
> >
> > The initial effort in your previous msg is also similar to my 
> initial 
> > effort.
> >
> >
> >
> > ----- Original Message -----
> > From: Marshall Lochbaum<[email protected]>
> > Date: Monday, October 4, 2010 16:28
> > Subject: Re: [Jprogramming] Distinct Numbers in Rows and Columns
> > To: 'Programming forum'<[email protected]>
> >
> >> Here's a funny--and much faster--one:
> >> p=.p:i.n
> >> *./"1 (*/p) = (*/"2 ,. */"1) q{p
> >>
> >> Actually, I suppose it is better to do it with addition, so 
> p=.2^i.n>> *./"1 (+/p) = (+/"2 ,. +/"1) q{p
> >>
> >> Marshall
> >>
> >> -----Original Message-----
> >> From: [email protected] 
> >> [mailto:[email protected]] On Behalf Of Roger Hui
> >> Sent: Monday, October 04, 2010 6:41 PM
> >> To: Programming forum
> >> Subject: [Jprogramming] Distinct Numbers in Rows and Columns
> >>
> >> An interesting puzzle arising from the KenKen solver:
> >> q is an array with shape (m,n,n) and  (,q) e. 1+i.n .
> >> Which items of q have 1+i.n in each row and in each column?
> > ---------------------------------------------------------------
> -------
> > 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
> 
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to