How many size 10 sequences can be formed with terms in $\{A,B,C\}$ and the number of terms A is odd?

76 Views Asked by At

How many size 10 sequences are there, all formed with terms belonging to $\{A,B,C\}$, in which the number of terms with A is odd.

My proposed solution: $$\sum_{m\in \{1,3,5,7,9\}} {10 \choose m} 2^{10-m}=28804$$ That is for each $m\in \{1,3,5,7,9\}$ finding the possibilities for A and then filling the remaining spots with B and C (2 possibilities for each non-A spot).

But the given short answer is 2391484 (no solution provided).

Question: what am I missing? or is the given answer wrong?

2

There are 2 best solutions below

0
On

As has been remarked, the official solution can't be correct as it greatly exceeds the total number of ternary strings of length $10$.

To solve the problem recursively, let $A_n$ be the number of strings of length $n$ with an odd number of $A's$ and let $B_n$ be the number of strings of length $n$ with an even number of $A's$. Then $$A_n+B_n=3^n$$

And $$A_n=2A_{n-1}+B_{n-1}=A_{n-1}+\left(A_{n-1}+B_{n-1}\right)=A_{n-1}+3^{n-1}$$

Since $A_1=1$ we see that $$A_n=1+3+3^2+\cdots +3^{n-1}=\frac {3^n-1}2$$

Thus $$\boxed{A_{10}=\frac {3^{10}-1}2=29524}$$

Note that, as expected, $A_n$ is about half of $3^n$.

Your method makes sense logically, so I expect you just made an arithmetic error. Wolfram Alpha uses your sum to match the recursive result.

Side note: We remark that $A_{14}=2391484$ so perhaps the strings were intended to have length $14$.

0
On

Assume that each B or C is worth $1$, each A is worth $x$, and the worth of a sequence is the product of the worths of its letters. When we multiply out $(2+x)^{10}$ distributively we obtain $2^{10}$ terms. Their sum is the sum of all worths of the possible ABC-sequences of length $10$. But we want only sequences with an odd number of $x$'s. We can collect these by forming $$f(x):={(2+x)^{10}-(2-x)^{10}\over2}\ .$$ When we put $x:=1$ here each appearing word obtains the value $1$. The number $N$ of admissible words therefore is $$N=f(1)={3^{10}-1^{10}\over2}=29\,524\ .$$