Can you show me all of the possible combinations in selecting 6
numbers from a pool of 1 thru 56. with no repeat combinations.
And also give me the total number of combinations. |
Request for Question Clarification by
aht-ga
on
10 Feb 2004 09:36 PST
kacygirl2-ga:
Are you asking for a list of every single possible combination of 6
numbers drawn from a pool of the numbers '01' to '56'?
If so, please note that there are the following total number of combinations:
56 x 55 x 54 x 53 x 52 x 51 = 23,377,273,920 (ie. over 23.3 million)
Are you sure you want a complete list, or is there something else that
you are after here?
Please let me know,
aht-ga
Google Answers Researcher
|
Clarification of Question by
kacygirl2-ga
on
10 Feb 2004 12:20 PST
Unfortunaltly thats exactly what i need. I am working on a project
that it is necessary to have all the combinations. once i have them
all i anticipate being able to eliminate some, hovever i would need
every combination to get an accurate picture....in addition if this
note helps... i believe there is a method in MSExcel that would
produce these combinations however i have been unable to figure it
out.
|
Request for Question Clarification by
aht-ga
on
10 Feb 2004 13:01 PST
Would I be correct in assuming that you have Excel, and that you would
be comfortable with an Answer that instructs you how to use Excel to
generate this extremely large list of combinations?
Or, perhaps we can approach the problem from another perspective; can
you share with me what it is that you are hoping to do with these
numbers? Perhaps there is an easier approach to take?
Thanks,
aht-ga
Google Answers Researcher
|
Clarification of Question by
kacygirl2-ga
on
10 Feb 2004 15:44 PST
I suppose if you can assist me in accomplishing this in excel myself
that would be sufficient. I do work with excel on a regular basis, &
would love it if you could explain to me exactly step by step how to
accomplish this task. I would just like you to keep in mind as you are
aware already the info that i need is somewhat complex and needs to be
accurate. & if its going to cost me 40.00 i would hope that it works.
As far as telling you what it is i plan on doing with this information
all that i can say at this piont is that i am in the early stages of a
long(prob 2-3 year) project that i anticipate will take a lot of paper
work & determination to accomplish the ultimate goal. I would love to
share my "bright idea" with you however it's been going over like a
lead zepplen and i am affraid you may feel the same way, maybe if i am
able to accomplish my goal & prove evryone wrong then I could share it
with you....that is ...if you assist me in getting all these
combinations (correctly). Please & thank you !!
|
Request for Question Clarification by
aht-ga
on
10 Feb 2004 16:17 PST
kacygirl2-ga:
In that case, I think it's best if I provide you with the complete
list as you requested, along with an explanation of the technique used
to build it (in case you need to do something like this again). I will
start on this now, and post an Answer as soon as I am done.
Regards,
aht-ga
Google Answers Researcher
|
Request for Question Clarification by
aht-ga
on
10 Feb 2004 23:12 PST
kacygirl2-ga:
I've run into a bit of a snag. 23.3 million number combinations, as
you can well imagine, is a lot of numbers. So much, in fact, that the
simple Excel Visual Basic program I've written will take above 18
hours to run on a Pentium4 1.4 GHz machine, and the resulting Excel
file would be above 4.4 GB in size uncompressed, and about 550 MB
compressed. Anyway I look at it, it is impractical for me to give you
the completed list. Therefore, the best that I can do for you is
provide you with the Excel VB program. Before I can do this, though,
can you please tell me which version of Excel you have, so that I can
confirm that the program would be compatible?
Thanks,
aht-ga
Google Answers Researcher
|
Clarification of Question by
kacygirl2-ga
on
11 Feb 2004 06:13 PST
Aht ....First I want to say i was a little nervous on weather or not
someone would have the knowledge & ability to answer my question
...after reviewing your "ratings" in regards to answered questions I
am reassured that you are the right person for a problem to solve such
as mine....Now to answer your question I am using Microsoft Excel 2002
SP-1 , (and so can i assume that with the "program" your going to
provide i could change the amount of #'s in my pool, if need be ...to
like a pool of 1 - 36?) furthermore , since this is such a large
amount of combinations & is ALOT of data to say the least, can you
give me an idea on what it will do if anything to my system...will it
bog it down or crash my computer when i run this program...any
helpfull hints you could offer in this regard would be greatly
appreciated.....thank you ...a reassured Kacygirl2.
|
Request for Question Clarification by
aht-ga
on
11 Feb 2004 08:43 PST
kacygirl2-ga:
Well, I'm no longer sure if your faith is well-placed, since I cannot
seem to even read my own numbers! Yes, that is definitely 23.3 BILLION
I had up there, even if I wrote 'million'. You can, however, rest
assured that, within the scope you have defined (draw 6 numbers from a
pool of 56, no repeat combinations), there are indeed 23,377,273,920
possible unique combinations (or permutations, as ipfan-ga has pointed
out in the comment section below).
The Excel program I whipped up to test this problem is written to work
on Excel 2002, so no problem there. Please allow me a little bit of
time to 'clean up' the program, and provide the flexibility you are
seeking to adjust the size of the pool. As a guide to you, every time
the pool increases by one, the amount of work roughly multiplies by
the value of that number. So, while it may take over 18 hours to
generate the 23.3 billion possible permutations for a pool of 56 (and
severely overtax your PC), it only takes a few seconds if drawing 6
from a pool of 10.
If you are willing to wait until tomorrow for the finished product, I
can provide enough flexibility in the program for you. Is this
alright?
Thanks,
aht-ga
Google Answers Researcher
|
Clarification of Question by
kacygirl2-ga
on
11 Feb 2004 10:07 PST
AHT ....STOP... befor you get too far into your work, i just read the
comments i might have missed them befor...you should consider the
combination 123456 the same as 654321....the order does not matter...I
am so srry if you spent alot of time on that please keep me posted I
have alot of faith...you two have already gotten as far as i have in
my few weks working on this in just a few hours....take your time
please,, i am in no big rush...your work is really appreciated...thank
you !!!
|
Request for Question Clarification by
aht-ga
on
11 Feb 2004 11:04 PST
kacygirl2-ga:
Thanks for the clarification!
So I did misread your intent after all. However, in an embarassing
turn of events, the program I've written does exactly what you are
asking for! :)
As ipfan-ga has pointed out, the number of combinations is
56!/(6!*50!)= 32.4 million. And, funnily enough (ok, it's funny to me,
perhaps not to you), that's actually the approach I took in my
program. I guess my subconscious mind understood you correctly, while
my conscious mind was too preoccupied with Austin Power movie
analogies :).
Allow me to explain the approach I am taking, so that you can see if
this is what you need:
- The program will work the same was as a lottery draw, once a number
has been drawn, it is no longer available in the same draw;
- The program will ONLY look at unique sets of numbers, order does NOT
matter... in other words, the numbers "1, 2, 3, 4, 5, 6" will only
ever appear together once, and once only, in the results
Basically, in words, here is what I am asking Excel to do for you:
1. Start with 1,2,3,4,5,6
2. Iterate the 'last' drawn number, to give 1,2,3,4,5,7
3. Repeat iteration until the last number is equal to the largest
number in the pool, ie. "1,2,3,4,5,56"
4. Iterate the 'second last' number, and set the last number to
'second last plus one', ie "1,2,3,4,6,7" (so still a unique
combination)
5. Again, iterate the last number to 56, and then repeat starting from
"1,2,3,4,7,8"
6. Continue until the PC melts down, or "51,52,53,54,55,56" is
reached, whichever occurs first. :)
This is actually the only practical approach to this problem. Every
set of generated numbers will be unique, there will be no repeats (ie.
after "1,2,3,4,5,6" is drawn, we will NOT also be drawing
"2,3,4,5,6,1" or "1,6,2,5,3,4", or any other combination of these
numbers).
I have confirmed that the program works properly by running it for a
scenario where 6 numbers are drawn from a pool of 10. According to the
formula (and the example on the page link provided by ipfan-ga), there
are 210 unique combinations. The program generates 210 results, that
range from "1,2,3,4,5,6" to "5,6,7,8,9,10".
So, you can rest assured that I have interpreted your requirements
correctly. And, we have now proven that two wrongs DO make a right. :)
With a very embarassed look on my face,
aht-ga
Google Answers Researcher
|
Clarification of Question by
kacygirl2-ga
on
11 Feb 2004 13:36 PST
Aht ... i am confident that you understand what i am looking for
useing the lotto example is a good idea... & as far as embarrasment
goes imagine the look on my face when your first response was
56x55x54x53x52x51 !!! it took me over a week to find that in a book
at the book store. !!! I think you have it under control..thank you
|
kacygirl2-ga:
Thanks for your Question, and I hope that this Answer works for you!
---------------------------------------
First, to address your question about the total number of unique
combinations, as ipfan-ga has pointed out in the comments section
below, the formula for calculating combinations is:
Total Combinations = (Pool Size)!
---------------------------------------------
(Number Drawn)! x (Pool Size - Number Drawn)!
So, when drawing 6 out of 56, you have
(56)! 56x55x54x53x52x51
-------------- = ------------------ = 32,468,436 combinations
(6)! * (50)! 6x5x4x3x2x1
---------------------------------------
Next, for the main part of your question, where you are requesting a
list of these combinations. As I have mentioned above, given the large
number of these combinations, it is not practical to attempt to give
you a complete list. Instead, I have written a program using Visual
Basic for Applications within Excel, that will allow you to generate
the list yourself.
More importantly, I have added enough flexibility to the program so
that you can easily alter the size of the pool, and the number of
numbers drawn from the pool for one combination.
Please note the following limitations:
- the program's speed is dependent on your PC's processor and
available memory; the faster your computer and the greater your PC's
memory, the faster the program will compute
- for large pools such as 56, it is impractical to attempt to compute
the whole set all at once; the size of the file and the amount of
memory required would exceed the capabilities of most PCs, so I have
provided the ability to compute portions of the total range
- the most values that can be computed in one run, assuming that your
PC does not crash first due to the memory required to store the
spreadsheet, is 21.2 million six-number combinations; I advise against
computing more than several million at a time, so that you can safely
store the values on your hard drive
- I have provided the ability for you to limit the maximum run time,
in case you simply want to run the program for, say, two hours, then
save the results
- there is just enough error checking to prevent the most common
problems, but you will still need to be careful when changing the
settings
You can find the program stored on the following website:
http://aht_ga.tripod.com/kacygirl2.htm
It is called 'Combination Generator', and is a spreadsheet stored in
ZIPped format. When you unZIP and open the spreadsheet, your MS Excel
may warn you that there are macros in the file, and that for your
safety they have been disabled.
To enable the macros in this file, go to Tools>Options>Security and
click the Macro Security button. Change the Security Level to Medium,
then re-open the spreadsheet. You will now have the option to enable
macros in the file, please do so.
To use the program, simply enter the pool size and draw size, along
with the beginning and end range, then click the 'Generate
Combinations' button. If you wish, you may enter a maximum run time
before clicking the button.
---------------------------------------
Please download the spreadsheet and give it a try. I suggest using a
smaller pool size at first, so that you can get a feel for how the
results are displayed on the other sheets of the file (namely,
"Sheet1" through "Sheet9"). Please let me know if you encounter any
problems, or if the solution is not what you are looking for, before
accepting and rating this Answer. I fully expect that you will have
some clarification requests before we are done, so please feel free to
use the 'Request Clarification' button above!
Good luck!
aht-ga
Google Answers Researcher |
Request for Answer Clarification by
kacygirl2-ga
on
12 Feb 2004 09:25 PST
aht ... GOOD JOB...I think you did it, it appears to me as thought you
helped me get my answer(s). Thank you... I was wondering ..is it ok
if I take a day or two to work on this before i "accept & rate "
this,...just because I am not sure what google will do if i accept &
rate this ...would that mean that i can't communicate w/ you
anymore...(incase i have a problem) ...As far as satisfaction goes I
am very pleased & you have a well deserved 5 star rateing from me & if
i can tip you I will !!!...just let me know how long i have to play w/
this before i have to accept & rate... THANK YOU VERY MUCH EXCELLENT
WORK !!!
|
Clarification of Answer by
aht-ga
on
12 Feb 2004 11:49 PST
kacygirl2-ga:
I'm glad you like what you've seen so far!
Rating the Answer is optional, but highly encouraged. It is always
best to make sure you are certain about the rating you wish to give,
before you give it.
Even after rating the Answer, you will be able to request further
Clarification. To the best of my knowledge, there is no real limit to
how long you have before you can no longer ask for Clarification. I
know that it is at least a month, probably longer (as in forever), as
I have had Clarification requests come through for rated Answers up to
a month after I posted the Answer, in recent memory.
Feel free to take your time, and definitely let me know if you need
any clarification!
Thanks,
aht-ga
Google Answers Researcher
|