home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / softsys / matlab / 130 < prev    next >
Encoding:
Internet Message Format  |  1993-01-24  |  1.5 KB

  1. Path: sparky!uunet!vtserf!vtserf.cc.vt.edu!krishnam
  2. From: krishnam@math.vt.edu (Ravi Krishnamurthy)
  3. Newsgroups: comp.soft-sys.matlab
  4. Subject: Re: Enumerating Combinations
  5. Message-ID: <KRISHNAM.93Jan23202510@corona.math.vt.edu>
  6. Date: 24 Jan 93 01:25:10 GMT
  7. References: <1993Jan23.214452.26779@news.yale.edu>
  8. Sender: usenet@vtserf.cc.vt.edu
  9. Organization: Department of Mathematics, Virginia Tech, VA 24061
  10. Lines: 26
  11. In-reply-to: wayne@econ.yale.edu's message of 23 Jan 93 21:44:52 GMT
  12.  
  13. In article <1993Jan23.214452.26779@news.yale.edu> wayne@econ.yale.edu (Kevin Wayne) writes:
  14.  
  15.  
  16. >  I want to enumerate all combinations of n items taken p at a time for
  17. >  arbitrary n, p<=n.
  18. >
  19. >  (i.e., for (n,p)=(5,3) generate a sequence of vectors:
  20. >   [1 2 3], [1 2 4], [1 2 5], [1 3 4], [1 3 5], [1 4 5],
  21. >   [2 3 4], [2 3 5], [2 4 5], [3 4 5] )
  22.  
  23. >  Obviously, the computational effort will increase exponentially, but I only
  24. >  need to use it for relatively small n.
  25.  
  26. >  If anyone has written such code, please send e-mail. Thanks in advance.
  27.  
  28. I'm also interested in having this program if someone has it. Can I have
  29. copy too? 
  30.  
  31. Thanks!
  32. --
  33. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  34.  Ravi S. Krishnamurthy             |        Phone: (703) 951-1712 (H)
  35.  Dept. of Mathematics              |                     231-4842 (O) 
  36.  Virginia Tech                     |        Internet: krishnam@math.vt.edu
  37.  Blacksburg, VA 24061-0123         |        Bitnet: krishnam@vtmath 
  38. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  39.