home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / sci / math / symbolic / 3339 < prev    next >
Encoding:
Text File  |  1992-12-27  |  1.2 KB  |  27 lines

  1. Newsgroups: sci.math.symbolic
  2. Path: sparky!uunet!caen!destroyer!plex-1!dhw
  3. From: dhw@plex-1.ann-arbor.mi.us (David West)
  4. Subject: Re: "shut up and deal the cards"
  5. Message-ID: <1992Dec27.175326.18832@plex-1.ann-arbor.mi.us>
  6. Organization: Plex-1, Michigan's Public Access Usenet Gateway  (Ann Arbor).
  7. References: <Bzs70r.B1B@news.cso.uiuc.edu> <Bzv5LK.969@news.cso.uiuc.edu>
  8. Date: Sun, 27 Dec 1992 17:53:26 GMT
  9. Lines: 16
  10.  
  11. In article <Bzv5LK.969@news.cso.uiuc.edu> Richard J. Gaylord <gaylord@ux1.cso.uiuc.edu> writes:
  12. >and one has to select the site with the lowest random number
  13. >(eg., the most vulnerable cell). 
  14. >
  15. >the way i finally did it was to sort the list {..{Random[], {a,b}..} and
  16. >take the second part of the first element in the sorted list. 
  17. [...]
  18. >i was able to write my functional program in a  direct
  19. >way by simply implementing what i wanted to do with the entire list using
  20. > built-in functions (one key to functional programming is to deal with a
  21. >list as a single data object without unnecessarily deconstructing it) 
  22.  
  23. Does this mean that heaps are awkward to implement in Mathematica?  They 
  24. should give an O(N) speed improvement over sorting the whole list.
  25.  
  26. -David West
  27.