# Number of the combinations

Hi, suppose I have 4 letters A,C,G,T.
I want to use them to create a sequence such as ACTGGTCAAA etc. The length of the sequence is 10.

Would you please tell me how many combinations totally?
Thanks.
###### Who is Participating?

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Commented:
0
\Commented:
It looks like in the first position you have 4 choices; and in the 2nd position, you also have 4 choices (so far that is 4*4 possibilities); and in the 3rd position, you also have 4 choices  (so far that is 4*4*4 possibilities). Using this pattern for all 10 choices, I think you have
4*4*4*4*4*4*4*4*4*4 = 4^10 = 1048576 possible patterns.
0
Author Commented:
Can you give me a formula? I have lost it for many years.
0
Commented:
If you have a sequence of n letters comprising of A, C, G, T  only, since you have 4 choices for each position the formula is

number of combinations for a of string length n   =   4^n

If you have k possible letters instead of 4 the answer is  k^n
0
Commented:
The link I posted above will show you the formula as well as calculate the value for you.
0
Author Commented:
So the result 286 from sch13824 is wrong. How did you get it?
0
Commented:
286 assumes you don't care about the order of the letters in the sequence.
0
Commented:
I withdraw my earlier comment/answer. I incorrectly applied combinations. Phoffric's logic and GwynforWeb's formula of k^n for k items forming a string of n length is correct.
0
Commented:
ozo is correct. That was my misapplication. From your example above, ACTGGTCAAA would be the same as CATGGTCAAA (or any sequence that contains 4 As, 2 Cs, 2 Gs , and 2 Ts for that matter).
0
Commented:
These are DNA sequences by implication order did matter.
0

Experts Exchange Solution brought to you by