How many DNA sequences of length $3$ that have no C's at all or have no T's in the first position?

845 Views Asked by At

How many DNA sequences of length $3$ that have no C's at all or have no T's in the first position?

Here are my workings below but I am not sure if they are correct or not,

So there are $4$ letters of the DNA sequence, CTGA

So considering DNA sequences of length $3$ that have no C's at all,

the first position can be filled by $3$ options, the second by $3$ options and the last by $3$ options, so therefore $3\times3\times3=27$

Considering DNA sequences of length $3$ that have no T's in the first position,

the first position can be filled by $3$ options, the second by $4$ options and the last by $4$ options, so therefore $3\times4\times4= 48$

So combining both cases, there are $48+27$ DNA sequences.

1

There are 1 best solutions below

1
On BEST ANSWER

This can be done using the inclusion-exclusion principle. If you want to find the number of things that are X or Y, you add the number of Xs to the number of Ys, then subtract the number of things that are both X and Y, since they were counted twice.

  • There are $3\times3\times3 = 27$ sequences have no Cs.
  • There are $3\times4\times4 = 48$ sequences that don't begin with T.
  • There are $2\times3\times3 = 18$ sequences that don't begin with T and have no Cs.

So the total number is $27 + 48 - 18 = 57$.

As an alternate method, you could also count the number that have a T in the first position and at least one C (i.e., the ones that aren't in your solution set). There are 7 of these. Since there are 64 possible sequences, that means the number that are in your solution set is $64 - 7 = 57$, which agrees with the above.