This good enough? ;"1 ({.,.>@}.)S:2 (] <@; $:^:(1 < #)@-.)"1 0~ 0 1 2
Or did you have additional constraints? Thanks, -- Raul On Mon, May 2, 2016 at 11:21 AM, 'Pascal Jasmin' via Programming <programm...@jsoftware.com> wrote: > how might you derive the unboxed permutation list from this tree? > > (] <@; $:^:(1 < #)@-.)"1 0~ 0 1 2 > +---------------+---------------+---------------+ > |+-+-----+-----+|+-+-----+-----+|+-+-----+-----+| > ||0|+-+-+|+-+-+|||1|+-+-+|+-+-+|||2|+-+-+|+-+-+|| > || ||1|2|||2|1|||| ||0|2|||2|0|||| ||0|1|||1|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