home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!usna!math3!mdm
- From: mdm@math3.sma.usna.navy.mil (Mark D. Meyerson -- math FACULTY <mdm@sma.usna.navy.mil>)
- Newsgroups: comp.theory
- Subject: Re: Looking for random permutation generation algorithms
- Message-ID: <2611@usna.NAVY.MIL>
- Date: 8 Jan 93 15:20:59 GMT
- References: <1993Jan6.014749.15323@ee.ubc.ca> <1993Jan7.165939.11149@cs.cornell.edu> <2607@usna.NAVY.MIL>
- Sender: news@usna.NAVY.MIL
- Reply-To: mdm@math3.sma.usna.navy.mil (Mark D. Meyerson -- math FACULTY <mdm@sma.usna.navy.mil>)
- Lines: 9
-
- In reply to 22795: a permutation algorithm:
-
- How about using an inductive (recursive) definition?
- To get a permutation on N elements take a
- permutation on N-1 elements and send the new Nth
- element to itself. Then switch the Nth element
- with any of the 1..N elements (including itself).
- I would think this could be enumerated or randomized
- as desired without much trouble.
-