1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Is there a formula to find a combination of numbers

  1. Oct 21, 2008 #1
    Hi, what I meant in the title was:

    Let's say that I have two variables in a game and I would like to know how many combination of numbers there is... For example if I have to calculate it for 3 times the possible combinations would be:
    a,a,a
    a,a,b
    a,b,a
    b,a,a
    b,b,b
    b,b,a
    b,a,b
    a,b,b

    Is there a formula to calculate how many it would let's say for 13 times...or for 50 times.
    Thanks in advance!
    Rafael
     
  2. jcsd
  3. Oct 21, 2008 #2
    If you replace a,b by 0,1, you will see that you have just enumerated all combinations for 3 binary bits, which are 2^3 = 8. If you want to repeat it 13 or 50 times, you will have 2^13 = 8192 or 2^50 = 1125899906842624. If you have three or four values instead of two, then you will have 3^n or 4^n cases.

    (If you had 10 values, repeated 5 times, you would have 10^5 cases; the cases themselves are like the digits in a 5-digit number, from 00000 to 99999. Your example with a,b is the same as the digits in a 3-digit number in base 2, from 000 to 111.)
     
  4. Oct 21, 2008 #3
    thank you very much Dodo you've been a great help!
    You cannot answer my question in a better way. :)

    Have a great day!
    Rafael
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Is there a formula to find a combination of numbers
  1. Combination of Numbers (Replies: 2)

Loading...