[SLUG] [PIG] Enumerate possible permutations?

From: Levi Bard (taktaktaktaktaktaktaktaktaktak@gmail.com)
Date: Fri Jul 07 2006 - 12:30:23 EDT


OK, piggers!

Say you have four (in this instance) numbers: 0, 1, 2, 3.
Can you determine a good way to programmatically enumerate all the
possible permutations of these numbers?

As in:
0 1 2 3
0 1 3 2
0 2 1 3
0 2 3 1
...

-- 
Tcsh: Now with higher FPS!
http://www.gnu.org/philosophy/shouldbefree.html
-----------------------------------------------------------------------
This list is provided as an unmoderated internet service by Networked
Knowledge Systems (NKS).  Views and opinions expressed in messages
posted are those of the author and do not necessarily reflect the
official policy or position of NKS or any of its employees.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 20:36:54 EDT