for 3, removing the "reverse duplicates" of permutations is as easy as taking the top half
(i.@! A. i.) 3 0 1 2 0 2 1 1 0 2 1 2 0 2 0 1 2 1 0 last (5) is reverse of 0. 4 is reverse of 2, and 3 reverse of 1 Is there a function for producing permutations without their reverse included? ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm