2
$\begingroup$

In the following question I am trying to determine how many DNA sequences of length $3$ that have no $C$'s at all or have no T's in the first position.

Below are my workings,

So there are $4$ DNA letters, $A,T,C,G$

Considering how many DNA sequences of length $3$ that have no $C'$s,

in the first position we have $3$ options, then in the next position we have another $3$ options to fill in, and then finally in the last position since its length $3$ we have $3$ options, therefore by the product rule we have,

$$3x3x3 = 3^3 = 27$$

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

in the first position we have $3$ options, then in the next position we have $4$ options to fill in, finally in the last position since its length $3$ we have $4$ options, therefore by the product rule,

$$3*4*4 = 3*4^2 = 48$$

So my questions are the following,

1) Am I using the product rule correctly?
2) What does the or mean in this case? Is it two different questions or is it all one question and I will need to use the sum rule to combine both answers above?

$\endgroup$

1 Answer 1

1
$\begingroup$

Your answer is correct for each separate question -- you are using the product rule correctly.

If the question imposed both restrictions simultaneously, you should proceed much in the same manner as you did before: how many possibilities are there for the first position? What about the second? And so on. There is no 'sum rule' at play here.


Assuming the 'or' in the question is the logical or, then you wish to find $|\mathcal A\cup \mathcal B|$, where $|\mathcal S|$ is the number of elements in the set $\mathcal S$, $\mathcal A$ is the set of length $3$ sequences with no $C$s, and $\mathcal B$ is the set of length $3$ sequence without $T$ in the first position. By inclusion-exclusion, we have

$$|\mathcal A \cup \mathcal B|= |\mathcal A| + |\mathcal B| - |\mathcal A \cap \mathcal B|$$

You have already calculated $|\mathcal A|$ and $|\mathcal B|$ so it remains to compute $|\mathcal A \cap \mathcal B|$. Now, $\mathcal A \cap \mathcal B$ is the set of length $3$ sequences without $C$s and without $T$ in the first position, ie, both conditions apply simultaneously. Here we may apply the product rule as you did in your calculations to find that

$$|\mathcal A \cap \mathcal B| = 2\times 3 \times 3 = 18$$

$\endgroup$
7
  • 1
    $\begingroup$ okay so the or word makes it separate but if it was and instead of or I would use the sum rule? $\endgroup$
    – user123
    Jan 16, 2018 at 17:09
  • $\begingroup$ What do you mean by 'sum rule'? I'm not sure I understand your question $\endgroup$ Jan 16, 2018 at 17:56
  • $\begingroup$ Hopefully the new edit answers the question more thoroughly. $\endgroup$ Jan 16, 2018 at 19:02
  • $\begingroup$ so I'm not answering two questions here I should be saying that for the first position I have 2 options since there is no C or T allowed, then the net position I have 3 options since there is no C allowed and finally the last position I have 3 options because there is no C allowed, therefore by the product rule $$2*3*3=2*3^2=2*9=18$$ $\endgroup$
    – user123
    Jan 16, 2018 at 23:52
  • $\begingroup$ Have you seen my edit? $\endgroup$ Jan 17, 2018 at 0:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .