New Excel Forum

This forum has been moved to TeachExcel.com

Ask all future questions in the New Excel Forum.

ExcelKey

generate all possible combinations

Formulas, Functions, Formatting, Charts, Data Analysis, etc.

generate all possible combinations

Postby nikovlad » Fri Dec 30, 2011 2:46 am

Please help me generate all possible combinations of the given numbers without duplication of digits.
  • 0

nikovlad
Rookie
 
Posts: 1
Joined: Dec 30, 2011
Reputation: 0

Re: generate all possible combinations

Postby k0st4din » Fri Dec 30, 2011 3:08 am

Hi welcome to the forum.
I ask - How do you combine the numbers on how many possible. I play the lottery or something else?
Your question is sort of - I am looking for something in infinity. Be particular to try to help.
Merry knees and Happy New Year
  • 0

So ...
1. *Consider well what is your wish.
2. *Make a sample table
3. *Describe in detail what you want to happen is to be understood, not only by yourself.
4. And if you help someone else who needs help. :) ;)
k0st4din
Excel Junkie
 
Posts: 217
Joined: Dec 7, 2011
Location: UK
Reputation: 3
Excel Version: 2003, 2007

Re: generate all possible combinations

Postby Sisyphus » Fri Dec 30, 2011 3:17 am

Are these combinations like 3L, 8R, 1L? :twisted:
  • 0

Have a great day! :D

Sisyphus
I do this for "honour and country" - much less of the latter, actually.
If I helped you, award points, plenty of them.
If I bored you, deduct points for being too long-winded. (I know, :lol)
Sisyphus
Former Moderator
 
Posts: 4454
Joined: Dec 7, 2011
Location: Shanghai
Reputation: 203
Excel Version: 2010

Re: generate all possible combinations

Postby Sisyphus » Fri Dec 30, 2011 9:52 pm

Hi,

If anything, your question has proven that I am a lousy mathematician. :oops:

I started out with a number lock. 3 number wheels, each with numbers from 0 to 9, enables 1000 combinations from 000 to 999. 1000 = 10^3, but the number of wheels isn't significant and this formula is accidental. The correct formula is 10 * 10 * 10 where each 10 represents the number of choices. Accordingly, if my lock had one wheel each of 4, 6 and 8 numbers then the number of choices would be 4 * 6 * 8. So, that should help you crack the safe: 3 wheels of 20 numbers each plus Right and Left for each should give you 20 * 20 * 20 * 2 combinations. That is why they put time locks on such safes. You can't just get through all the combinations before the damn thing disables the combination lock. :cry:

Then I took the numbers 1 to 3 and arranged them into possible sequences:
1-2-3, 1-3-2
2-1-3, 2-3-1
3-1-2, 3-2-1
I think I got them all. 6 is the total, but by which formula do I arrive at 6?
Too difficult. So, I tried something easier:
1-2
2-1
The formula seems to be: [Top number] * [Top number -1].
That gives me 2 * 1 = 2 or, in the first series, 3 * 2 = 6.

That is encouraging. Try another one:
1-2-3-4, 1-2-4-3
1-3-2-4, 1-3-4-2
1-4-2-3, 1-4-3-2
Observe that the last two numbers are always the same, just juxtapositioned, in the sense that they are the only two numbers not used by the rest of the string. Regardless of how many positions I have, the last two must always be the two I didn't use before. So I argue that the reason why I have 6 results all starting with 1 is because the remaining digits (2, 3 and 4) have has many choices as the 1-2-3 example. Therefore, the formula for calculating the number of combinations of a series of numbers from 1 to 4 should be 4 * 3 * 2 * 1 = 24. Any one wants to contradict me that the number of choices for the numbers from 0 to 5 = 6 * 5 * 4 * 3 * 2 * 1?
There are 52 cards in a Black Jack deck. :D

Of course, these are precise sequences. The number of combinations, if sequence is of no importance, is only as many as the number itself indicates. That seems to work with the numbers lock. The series represents a single wheel with 4 numbers on it, therefore the formula is 1 * 4. Correct. 8-)

So, did I answer the question? How many possible combinations are there? If sequence is of no importance it is the number of choices multiplied by the number of choices, multiplied by the number of choices [in perpetuum].
If that answer doesn't remove the last bit of understanding you had before I should try again. :D
Have a great day! It's the last one you get this year.
  • 0

Have a great day! :D

Sisyphus
I do this for "honour and country" - much less of the latter, actually.
If I helped you, award points, plenty of them.
If I bored you, deduct points for being too long-winded. (I know, :lol)
Sisyphus
Former Moderator
 
Posts: 4454
Joined: Dec 7, 2011
Location: Shanghai
Reputation: 203
Excel Version: 2010


Return to General Excel Questions

Who is online

Users browsing this forum: Google [Bot] and 274 guests