The Math Forum

Ask Dr. Math - Questions and Answers from our Archives
Associated Topics || Dr. Math Home || Search Dr. Math

Generating Possible Lottery Outcomes

Date: 3/29/96 at 19:52:17
From: Anonymous
Subject: Lottery

What math rule would I need to follow if I wanted to generate all
possible combinations in a 50 number draw 6 lottery? (15,890,700).
I have a programmer friend who is willing to write the program but
needs a rule to follow.  If you don't have time for this problem, will
you recommend a source where I can get the answer?


Date: 6/13/96 at 21:17:23
From: Doctor Ethan
Subject: Re: Math Rule

Hey Stan,

I am assuming that in this lottery 2 3 4 and 3 2 4 would be the same
thing - i.e. that order doesn't matter.

I also am assuming that a number cannot be repeated.

Otherwise, the number 15,890,700 doesn't make sense.

Given that, here is my idea.  I will leave it to you to check it.

start with 

1,2,3,4,5 -> 1,2,3,4,6 ->1,2,3,4,7-> ... 1,2,3,4,50
1,2,3,5,6 -> 1,2,3,5,7 ->1,2,3,5,8-> ... 1,2,3,5,50
1,3,4,5,6 ->

Hope that helps.  

By the way I heard a good joke about the Lottery.

Lottery: Definition: A tax for the mathematically incompetent.

-Doctor Ethan,  The Math Forum

Associated Topics:
High School Discrete Mathematics
High School Permutations and Combinations

Search the Dr. Math Library:

Find items containing (put spaces between keywords):
Click only once for faster results:

[ Choose "whole words" when searching for a word like age.]

all keywords, in any order at least one, that exact phrase
parts of words whole words

Submit your own question to Dr. Math

[Privacy Policy] [Terms of Use]

Math Forum Home || Math Library || Quick Reference || Math Forum Search

Ask Dr. MathTM
© 1994- The Math Forum at NCTM. All rights reserved.