As far as I know J pads the arrays if the size of the conjugacy class is 
smaller than the largest sized conjugacy class, i.e. it makes all the arrays 
the same size by padding with 0 0 0 0 when necessary.By the logic of group 
theory, it is inconceivable that there would be two arrays with only some of 
the same elements, as all I'm doing is partitioning the permutations into sets 
of "similar" permutations.(of course this doesn't take into account mistakes in 
my program / logic)> Date: Thu, 10 Jul 2014 11:25:10 -0400
> From: [email protected]
> To: [email protected]
> Subject: Re: [Jprogramming] Comaring Arrays
> 
> Well, hold on.
> 
> Under what circumstances does J need to pad the arrays?  If A is padded, is
> B necessarily also padded? If so, are the two arrays guarunteed to have
> the same amount of padding (i.e. the same number of all-zero rows)?
> 
> If the answer to either of the two latter questions is "no", then you could
> use the difference in the (original, unpadded) arrays' shapes as a really
> efficient shortcut to determine one is not a permutation of the other.  If
> they're both padded equally, then  e.  is probably the most efficient
> approach, as Ben says.
> 
> -Dan
> 
> ----- Original Message ---------------
> 
> Subject: Re: [Jprogramming] Comaring Arrays
>    From: Ben Gorte - CITG <[email protected]>
>    Date: Thu, 10 Jul 2014 13:20:37 +0000
>      To: "[email protected]" <[email protected]>
> 
> In that case Dan's solution is probably optimal - no sorting required.
> ________________________________________
> From: [email protected]
> [[email protected]] on behalf of Jon Hough
> [[email protected]]
> Sent: Thursday, July 10, 2014 14:55
> To: [email protected]
> Subject: Re: [Jprogramming] Comaring Arrays
> 
> Duplicate rows, other than 0 0 0 0 sjould never occur. If they did, there
> would be a big problem.
> 0 0 0 0 occur when J needs filler to pad out arrays.
> 
> --- Original Message ---
> 
> From: "Ben Gorte - CITG" <[email protected]>
> Sent: July 10, 2014 9:51 PM
> To: [email protected]
> Subject: Re: [Jprogramming] Comaring Arrays
> 
> Hi Jon,
> 
> Dan and I were wondering:
> 
>   1. whether your matrices would be allowed to have duplicate rows
>   2. and if they are, whether such duplicate rows should occur in both
> matrices equally often, for them to be equivalent
> 
> Ben
> ________________________________________
> From: [email protected]
> [[email protected]] on behalf of Jon Hough
> [[email protected]]
> Sent: Thursday, July 10, 2014 14:16
> To: [email protected]
> Subject: Re: [Jprogramming] Comaring Arrays
> 
> I  away from my computer at the moment. When I get back I will show you my
> code.
> The gist is I am making a simple permutation group theory script(i am not
> talking about simple groups, i mean a simple script).
> Anyway, what I have so far is trying to conjugate a group with itself, so i
> can nub out the resulting duplicates and get all the conjugacy classes of
> the group.
> 
> --- Original Message ---
> 
> From: "Dan Bron" <[email protected]>
> Sent: July 10, 2014 8:38 PM
> To: [email protected]
> Subject: Re: [Jprogramming] Comaring Arrays
> 
> Good point.  We could fix this up by asking an additional question: are the
> items of A unique? There's a million ways to ask that, but maybe we're in
> a cutesy mood today:
> 
>     e. *./@:*. ~:@:]
> 
> Though with the ~:, I'm not sure this would have any performance advantage
> over sorting. Maybe we should go back to i. :
> 
>     #@:] (e. < *./@:~:@:]) i.
> 
> That is, look up A in B and tell me whether all elements are unique and
> that there are no missing elements ((#A) e. A i. B).
> 
> -Dan
> 
> Please excuse typos; sent from a phone.
> 
> > On Jul 10, 2014, at 6:48 AM, Ben Gorte - CITG <[email protected]> 
> > wrote:
> >
> > Now we should ask Jon what he wants in this case:
> >
> > ]A=.3 2$1 1 1 2 1 1
> > 1 1
> > 1 2
> > 1 1
> >   ]B=.3 2$1 2 1 2 1 1
> > 1 2
> > 1 2
> > 1 1
> >
> > Should the result be:
> >   A *./@:e. B
> > 1
> > or does he prefer:
> >   (/:~A)-:/:~B
> > 0
> > ?
> >
> > (I agree the first looks quicker)
> >
> > Ben
> >
> > _
> > _______________________________________
> > From: [email protected] 
> > [[email protected]] on behalf of Dan Bron 
> > [[email protected]]
> > Sent: Thursday, July 10, 2014 12:33
> > To: [email protected]
> > Subject: Re: [Jprogramming] Comaring Arrays
> >
> > Sorting might be overkill (and/or a little expensive) for this situation.
> >
> > If A and B are the same shape (and they'd better be, or A is definitely not 
> > a permutation of B), then you really only need to know if all the items 
> > (rows) of A are also items (rows) of B.
> >
> > So let's just ask that:
> >
> >   A e. B
> > 1 1 1 1
> >   A *./@:e. B
> > 1
> >
> > Now, if we needed slightly more information (and we're willing to pay for 
> > it), in particular, exactly how A is permuted from B, we could use i. 
> > instead of e. :
> >
> >
> >   A i. B
> > 2 0 1 3
> >
> > And from here, we can figure out exactly how far Jon would have had to go 
> > in his quest to check every possible permutation:
> >
> >   A A.@:i. B
> > 12
> >   A C.@:i. B
> > +-----+-+
> > |2 1 0|3|
> > +-----+-+
> >
> > Looks like about halfway ( (!#A)%2 ) . Not surprising.
> >
> > -Dan
> >
> > Please excuse typos; sent from a phone.
> >
> >> On Jul 10, 2014, at 4:17 AM, Ben Gorte - CITG <[email protected]> 
> >> wrote:
> >>
> >> B=:4 4$2 3 0 1 3 2 1 0 1 0 3 2 0 0 0 0
> > ----------------------------------------------------------------------
> > 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
> ----------------------------------------------------------------------
> 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
                                          
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to