Indeed lisL does return several results. I believe one verb I wrote returned 
all subsequences of maximal length, but the (much faster) version which is 
referred to by lisL only returns some longest subsequences. They should all be 
correct.

Louis

> On 09 Sep 2016, at 17:04, Raul Miller <rauldmil...@gmail.com> wrote:
> 
> Hmm... thinking that through,
> 
> NB. longest sequence lengths should all match
> assert 1=#~.{:@$@>(lisI; lisJ; lisM; lisL; lisEH) a
> 
> (And also could use a verification that each longest sequence is a valid 
> one...)
> 
> Thanks,
> 
> -- 
> Raul
> 
> 
> On Fri, Sep 9, 2016 at 10:30 AM, Erling Hellenäs
> <erl...@erlinghellenas.se> wrote:
>> Hi all !
>> 
>> Good point. It seems lisI gives strange results. lisL sometimes gives
>> several results, which are probably all correct. There can be many different
>> longest strictly increasing subsequences.
>> 
>> a
>> 
>> 4 12 10 23 18 19 8 7 5 2 0 16 15 11 1 9 22 3 13 14 21 17 24 20 6
>> 
>> lisI a
>> 
>> 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2
>> 2 2 2 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 3 3 3 4 4 4 5
>> 
>> lisJ a
>> 
>> 0 1 3 13 14 17 20
>> 
>> lisM a
>> 
>> 0 1 3 13 14 17 20
>> 
>> lisL a
>> 
>> 0 1 3 13 14 17 20
>> 
>> 4 5 9 13 14 17 20
>> 
>> lisXR a
>> 
>> 0 1 3 13 14 17 20
>> 
>> lisEH a
>> 
>> 0 1 3 13 14 17 20
>> 
>> 
>> Cheers,
>> Erling
>> 
>> 
>> 
>>> On 2016-09-09 16:02, Raul Miller wrote:
>>> 
>>> 1=#~.(lisI; lisJ; lisM; lisL; lisEH) a
>> 
>> 
>> ----------------------------------------------------------------------
>> 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