Advent calendar 2017
15 December
The string ABBAABBBBB is 10 characters long, contains only A and B, and contains at least three As.
Today's number is the number of different 10 character strings of As and Bs that have at least three As.
Show answer
Hide answer
The number of 10 character strings containing at least 3 As is equal to
the number of 10 character strings containing exactly 3 As
plus
the number of 10 character strings containing exactly 4 As
plus ... plus
the number of 10 character strings containing exactly 10 As.
The number of 10 character strings containing exactly \(a\) As is \(\left(\begin{array}{c}10\\a\end{array}\right)\) ("10 choose \(a\)").
Therefore the number we are looking for is
$$
\left(\begin{array}{c}10\\3\end{array}\right)
+
\left(\begin{array}{c}10\\4\end{array}\right)
+
\left(\begin{array}{c}10\\5\end{array}\right)
+
\left(\begin{array}{c}10\\6\end{array}\right)
+
\left(\begin{array}{c}10\\7\end{array}\right)
+
\left(\begin{array}{c}10\\8\end{array}\right)
+
\left(\begin{array}{c}10\\9\end{array}\right)
+
\left(\begin{array}{c}10\\10\end{array}\right)
$$
You can work this out by either using the formula \(\left(\begin{array}{c}n\\r\end{array}\right)=\frac{n!}{r!(n-r)!}\), or by remembering that
these numbers all appear in the 10th row of
Pascal's triangle.
The answer is 968.