LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] impressive... [OT - lotto odds]

[ILUG] impressive... [OT - lotto odds]

Aidan Keady aidan at ssldesign.com
Thu Oct 28 15:27:00 IST 1999


> On Thu, Oct 28, 1999 at 08:59:44AM -0500, John_White at dell.com mentioned:
> > as easy as it would be to write one that gets the factorial of 5 :)
> > but you'd need a mad data type to store the result in . . .
> 
>  That's part of the point! Lisp doesn't mind!
> 
>  Question though. I was doing the lotto calculation, and:
> 
> ==> (/ (factorial 42) (factorial 36))
> 3776965920
> 
>  Is it really a 3.777 billion to one chance of winning now ?
> 
>     42*41*40*39*38*37=3776965920
> 
> Kate

No, you've forgotten the 6! in the bottom line.

i.e.  n
       C	= n!/[r!(n-r)!]
       	r

The odds against having the six numbers are only about 5.25 million to 1.

ATB,
Aidan.




More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell