home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / lang / cplus / 13598 < prev    next >
Encoding:
Text File  |  1992-09-13  |  830 b   |  21 lines

  1. Newsgroups: comp.lang.c++
  2. Path: sparky!uunet!noc.near.net!news.Brown.EDU!qt.cs.utexas.edu!yale.edu!spool.mu.edu!agate!tfs.com!tfs.com!eric
  3. From: eric@tfs.com (Eric Smith)
  4. Subject: Re: FULL HOUSE
  5. Message-ID: <1992Sep13.202532.15954@tfs.com>
  6. Organization: TFS
  7. References: <1992Sep13.144315.24892@wuecl.wustl.edu>
  8. Date: Sun, 13 Sep 1992 20:25:32 GMT
  9. Lines: 10
  10.  
  11. In article <1992Sep13.144315.24892@wuecl.wustl.edu> ppc1@cec1.wustl.edu (Peter Pui Tak Chiu) writes:
  12.  
  13. [poker program with bug]
  14.  
  15. Your bug is caused by an invalid assumption about the probabilities.
  16. Imagine a 52-card deck, and deal 5 cards, one at a time.  The
  17. probability that the first card will be an ace, for example, is 1/13.
  18. But if it is, then the probability that the 2nd card will also be an
  19. ace is only 1/17.  But your program assumes the probability remains
  20. 1/13.
  21.