Counting permutations of the string ABABABBB in two different ways I have a string ABABABBB, I want to find the number of permutations of the string. I tried to do it in two ways but the answers don't match and I am a bit confused.
First method:
There are $8$ slots and I need to choose $3$ positions to fill in the As (and the Bs go in the rest). So its just $\binom{8}{3} = 56$. 
Second method:
I can ignore the As and write the string as:
.B.B.B.B.B.
The dots are bins and each A can go in any of the $6$ bins. If all $3$ As go into the first bin, I get AAABBBBB and so on. So in this representation each A has $6$ choices to land in and total choices would be $6 \cdot 6 \cdot 6$. Why is this answer wrong?
 A: You correctly found that there are $\binom{8}{3} = 56$ possible permutations of the string ABABABBB.  
The reason you did not obtain this answer with your second method is that the As are indistinguishable, so you are counting each string multiple times.
$$\square B \square B \square B \square B \square B \square$$
Placing five Bs in a row creates six spaces, four between successive Bs and two at the ends of the row in which we can place a B.  A permutation of ABABABBB is distinguished by how many As are placed in each space.  Let $x_k$ be the number of As placed in the $k$th space.  Then 
$$x_1 + x_2 + x_3 + x_4 + x_5 + x_6 = 3$$
is an equation in the nonnegative integers.  A particular solution corresponds to the placement of three ones in a row of five addition signs.  For instance,
$$1 1 + + + 1 + +$$
corresponds to the solution $x_1 = 2$, $x_2 = x_3 = 0$, $x_4 = 1$, $x_5 = x_6 = 0$ and the permutation $AABBBABB$.  The number of such solutions is the number of ways we can choose which three of the eight positions required for three ones and five addition signs will be filled with ones, which is 
$$\binom{3 + 5}{3} = \binom{8}{3}$$
Notice that the As correspond to the ones and the Bs correspond to the addition signs in the equation $x_1 + x_2 + x_3 + x_4 + x_5 + x_6 = 3$.
Alternatively, there are $\binom{6}{3}$ ways to place the three As in three different spaces, $6 \cdot 5$ ways to place two As in one space and the other A in a different space, and $6$ ways to place all the As in one space.
$$\binom{6}{3} + 6 \cdot 5 + 6 = 20 + 30 + 6 = 56$$
Since your method treats the As as distinguishable, you count strings in which the three As are each placed in a different space six times (corresponding to the $3!$ permutations of the As in those spaces), strings in which two As are placed in one space and one A is placed in another three times (corresponding to which A is placed by itself), and strings in which all the As are placed in the same space once.  Notice that 
$$\color{red}{6}\binom{6}{3} + \color{red}{3} \cdot 6 \cdot 5 + 6 = 120 + 90 + 6 = 216 = 6^3$$
