# how to determin number of combinations

• Apr 1st 2011, 07:53 AM
sedam7
how to determin number of combinations
hello...

I'm having a bit of problem with one simple task :D First sorry if I put this thread in wrong place :D

I know how to calculate number of combinations (without repetition)

$\frac {n!}{k!(n-k)!}$

and that's ok :D

but now I have big problem :) I have to calculate number of combinations with repetitions :D so i tried like this :D

when i have 2 variables A and B with second expansion i have :

$AA, AB, BA, BB$

so it's four combinations :D

for third expansion i have :

$AAA, AAB, ABA, BAA, BBB, BBA, BAB, ABB$

so there is 8 combinations .... and at first i think formula should be $n^k$ or in my case now $2^n$ meaning $2^2 = 4 and 2^3 = 8$ but as I get to problem with 4 variables and need to do third expansion by that formula I need 64 combinations... I wrote all of them and I got 40... now I'm confused very much because in next task I have problem with 10 variables and third expansion ... and there is no way that i can wrote them all to find pattern ....

can anyone please help me with this :D I also find some formulas for similar things but none of them can be any use to me in this problem :D
• Apr 1st 2011, 08:37 AM
sedam7
here is how i got combinations with 4 variables and third expansion :D

$\begin{matrix}
AAA & BBB & CCC & DDD & AAC & BBD\\
AAB & BBC & CCD & DDA & ACA & BDB\\
ABA & BCB & CDC & DAD & CAA & DBB\\
BAA & CBB & DCC & ADD & ACC & BDD\\
ABB & BCC & CDD & DAA & CAC & DBD\\
BAB & CBC & DCD & ADA & CCA & DDB\\
BBA & CCB & DDC & AAD & &
\end{matrix}$

so there are 40 combinations :D
• Apr 1st 2011, 08:40 AM
Plato
I think you mean if there are ten symbols, ABCDEFGHIJ, how many strings of length ten can be formed using any or all of the ten.

For example: $FJBBIIAGHI\text{ or }JIHGFEDCBA$ are two possible strings.
In that example there are $10^{10}$ possible strings.

In general, if you have $\mathif{N}$ different symbols the number of possible strings of length $\mathif{K}$, using any or all of the symbols, is $\mathif{N}^{\mathif{K}}$

If you mean something else, please try to make it clearer.
• Apr 1st 2011, 09:14 AM
sedam7
It's more like how much combinations can U wrote with 10 symbols in string with length of 3 :D with repetitions :D
• Apr 1st 2011, 09:22 AM
Plato
Quote:

Originally Posted by sedam7
It's more like how much combinations can U wrote with 10 symbols in string with length of 3 :D with repetitions :D

The answer to that question is just $10^{3}=10\cdot 10\cdot 10$.

In the case of four symbols it is $4^3=64$.
• Apr 1st 2011, 09:23 AM
HallsofIvy
Quote:

Originally Posted by sedam7
hello...

I'm having a bit of problem with one simple task :D First sorry if I put this thread in wrong place :D

I know how to calculate number of combinations (without repetition)

$\frac {n!}{k!(n-k)!}$

and that's ok :D

but now I have big problem :) I have to calculate number of combinations with repetitions :D so i tried like this :D

when i have 2 variables A and B with second expansion i have :

$AA, AB, BA, BB$

so it's four combinations :D

for third expansion i have :

$AAA, AAB, ABA, BAA, BBB, BBA, BAB, ABB$

so there is 8 combinations .... and at first i think formula should be $n^k$ or in my case now $2^n$ meaning $2^2 = 4 and 2^3 = 8$ but as I get to problem with 4 variables and need to do third expansion by that formula I need 64 combinations... I wrote all of them and I got 40... now I'm confused very much because in next task I have problem with 10 variables and third expansion ... and there is no way that i can wrote them all to find pattern ....

can anyone please help me with this :D I also find some formulas for similar things but none of them can be any use to me in this problem :D

If you have 2 things (as letters) and n places to put them (as in 2 or three letter words) then you have 2 choices n times. The number of possible "words" is $2^n$

More generally, if you have m objects and n places to put them, there are $m^n$ possible combinations.
• Apr 1st 2011, 09:27 AM
sedam7
Quote:

Originally Posted by Plato
The answer to that question is just $10^{3}=10\cdot 10\cdot 10$.

In the case of four symbols it is $4^3=64$.

hehehehehe... yes $4^3 = 64$ but up there in post #2 i wrote all of them and there are just 40 combinations :D or i made mistake :D
• Apr 1st 2011, 09:40 AM
Plato
Quote:

Originally Posted by sedam7
hehehehehe... yes $4^3 = 64$ but up there in post #2 i wrote all of them and there are just 40 combinations :D or i made mistake :D