Re: [Jprogramming] nubsieve modulo rotation

2019-02-13 Thread Roger Hui
And what would you use if you need a noun? Normal form? Again, more of a mouthful. Other terms I would use for identity problems, when explaining to laymen, is "ID number". They usually get it immediately. On Wed, Feb 13, 2019 at 6:55 PM Raul Miller wrote: > I like “normalize” personally. >

Re: [Jprogramming] nubsieve modulo rotation

2019-02-13 Thread Raul Miller
I like “normalize” personally. The ideas I associate with “signature” are not robust enough for a reliable nub (and so would require additional care elsewhere). If that matters... Thanks, — Raul On Wednesday, February 13, 2019, Roger Hui wrote: > In this context, I prefer words like signatur

Re: [Jprogramming] nubsieve modulo rotation

2019-02-13 Thread Linda Alvord
I seem to have answered a similar But different question. a-:"2 (i.20)|."0 2 a 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 Linda -Original Message- From: Programming On Behalf Of Roger Hui Sent: Wednesday, February 13, 2019 7:29 PM To: programm...@jsoftware.com Subject: Re: [Jprogrammi

Re: [Jprogramming] nubsieve modulo rotation

2019-02-13 Thread Roger Hui
In this context, I prefer words like signature or representative rather than canonical form. Shorter and less scary and puts one's mind on the right track in multiple problems. e.g. What's a good representative for identity problems? ~. i. ] (index in nub). What's a good representative for ord

Re: [Jprogramming] nubsieve modulo rotation

2019-02-13 Thread Henry Rich
This is what I was looking for.  It works on REB's testcase but has less than quadratic run time I think. NB. Get # left-shifts to canonicalize y canonshift =: 3 : 0 NB. Try each atom of y until we find one that works for_t. /:~ ~. y do. NB. get spacing between positions of t, including th

Re: [Jprogramming] nubsieve modulo rotation

2019-02-13 Thread Roger Hui
Idea k: a minimum vector necessarily begins with a minimum sub-sequence in x,(k-1){.x of length k , itself necessarily begins with the minimal item. On Wed, Feb 13, 2019 at 9:52 AM Roger Hui wrote: > Yes, well, left as an exercise for the reader. :-) > > Idea: the minimum rotation of a vector n

Re: [Jprogramming] nubsieve modulo rotation

2019-02-13 Thread Louis de Forcrand
A possible version of the signature verb: sig=: |.~ >:@(# -~ {: i. 1:)@min min=: (_1 |. ] #^:_1 (= <./)@#~)^:(1 < +/@])^:a: 1"0 Perhaps not the fastest version, but it’s light on memory. Cheers, Louis > On 13 Feb 2019, at 18:52, Roger Hui wrote: > > Yes, well, left as an exercise for th

Re: [Jprogramming] nubsieve modulo rotation

2019-02-13 Thread R.E. Boss
My solution for 'signature' was [:{.@/:~ {:@$ [\ (,}:) R.E. Boss > -Oorspronkelijk bericht- > Van: Programming > Namens Roger Hui > Verzonden: woensdag 13 februari 2019 18:16 > Aan: programm...@jsoftware.com > Onderwerp: Re: [Jprogramming] nubsieve modulo rotation > > For each row, f

Re: [Jprogramming] nubsieve modulo rotation

2019-02-13 Thread 'Mike Day' via Programming
In a rush as Liz wants to leave this WiFi spot The first cuts down on the number of rotations... sig =: 3 : 0 min =. {. @: (/:~) y imin =. I. y = min {./:~ imin |."0 1 y ) This second looks at pairs. Unchecked as rushing off... sig2 =: 3 : 0 min =. {./:~ ~.2 ,/\r =. (,{.) y imin =. I. r =

Re: [Jprogramming] nubsieve modulo rotation

2019-02-13 Thread Roger Hui
Yes, well, left as an exercise for the reader. :-) Idea: the minimum rotation of a vector necessarily begins with its minimal item. On Wed, Feb 13, 2019 at 9:34 AM Henry Rich wrote: > Yes; but now suppose the lines are very long. Is there a way to find > the signature (I would call it a canoni

Re: [Jprogramming] nubsieve modulo rotation

2019-02-13 Thread Henry Rich
Yes; but now suppose the lines are very long.  Is there a way to find the signature (I would call it a canonical form) that doesn't require enumerating rotations?  (I haven't found a good way yet). Henry Rich On 2/13/2019 12:16 PM, Roger Hui wrote: For each row, find a "signature", then find

Re: [Jprogramming] nubsieve modulo rotation

2019-02-13 Thread Roger Hui
For each row, find a "signature", then find the nub sieve of the signatures. The signature I use here is the minimum of all possible rotations. signature=: {. @ (/:~) @ (i.@# |."0 1 ]) ~: signature"1 a 1 1 1 1 1 0 1 1 1 1 1 0 On Wed, Feb 13, 2019 at 8:55 AM R.E. Boss wrote: > Let the

[Jprogramming] nubsieve modulo rotation

2019-02-13 Thread R.E. Boss
Let the 12 x 20 matrix be defined by a=: 0 : 0 1 4 4 1 _4 _4 1 1 _4 _1 _1 _4 _4 _1 4 4 _1 _1 4 1 1 4 4 1 _4 _4 1 1 _4 _1 _1 _4 _4 _1 4 1 4 _1 _1 4 1 4 4 1 _4 _1 _4 1 1 _4 _1 _4 _4 _1 4 1 4 _1 _1 4 4 1 1 4 _1 4 1 _4 _4 1 _4 _1 _1 _4 1 _4 _1 4 4 _1 4 1 1 4

Re: [Jprogramming] How install graphviz?

2019-02-13 Thread David Mitchell
The new graphviz addon is now available for Windows, Linux and Mac. On 2/9/2019 12:14, Murray Eisenberg wrote: The installation instructions at file:///Users/murray/Downloads/graphviz/help.html say: “Install using Package Manager to ~addons/graphics/graphviz.“ But how? So far as I ca