home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / theory / 2829 < prev    next >
Encoding:
Internet Message Format  |  1993-01-08  |  904 b 

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