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