How many strings of length 8 The question - how many strings of length 8, from 4 letter alphabet, using each letter twice. There is to be exactly one pair of same letters next to each other (example of valid string: AABCDBCD).
I tried to check how this develops by drawing a tree, but it seems that this gets really unwieldy really fast. What counting technique can be used here to make it easier?

If there were no restrictions, we could arrange the letters AABBCCDD in 
$$\binom{8}{2}\binom{6}{2}\binom{4}{2}\binom{2}{2} = \frac{8!}{2!6!} \cdot \frac{6!}{4!2!} \cdot \frac{4!}{2!2!} \cdot \frac{2!}{0!2!} = \frac{8!}{2!2!2!2!}$$
distinguishable ways since we can place the two A's in two of the eight available positions, the two B's in two of the six remaining positions, the two C's in two of the four remaining positions, and the two D's in the last two open positions.
We choose which of the four letters is doubled, placing the pair in a box so that we have seven objects - the box containing the double letter, and the other six letters.  We choose which of the seven positions will be occupied by that box. The remaining letters can be arranged in $\binom{6}{2}\binom{4}{2}\binom{2}{2}$ ways.  Hence, the number of ways of arranging the letters AABBCCDD so that two adjacent letters are the same is 
$$\binom{4}{1}\binom{7}{1}\binom{6}{2}\binom{4}{2}\binom{2}{2}$$
However, we have counted arrangements in which more than one pair of identical letters are adjacent.  We must exclude these from the total. 
Suppose two letters are doubled.  We choose two of the four letters to be doubled, placing each double letter in a distinct box.  This gives us six objects, the two boxes and four remaining letters.  We choose which two of the six positions will be occupied by the boxes, arrange them in these positions in $2!$ ways, and then arrange the remaining four letters in $\binom{4}{2}\binom{2}{2}$ ways.  This gives 
$$\binom{4}{2}\binom{6}{2} \cdot 2! \cdot \binom{4}{2}\binom{2}{2}$$
arrangements with two double letters.
Suppose three letters are doubled.  We choose three of the four letters to be doubled, placing each double letter in a distinct box.  This gives us five objects, the three boxes and the two single letters.  We choose three of the five positions for the letters, arrange the boxes in these positions in $3!$ ways, then arrange the remaining two letters in $\binom{2}{2}$ ways.  This gives
$$\binom{4}{3}\binom{5}{3} \cdot 3! \cdot \binom{2}{2}$$
arrangements with three double letters.
Suppose all four letters are doubled.  We place each double letter in a distinct box.  The four boxes can be arranged in $4!$ orders.  
By the Inclusion-Exclusion Principle, the number of arrangements of AABBCCDD in which there is exactly one pair of adjacent letters that are the same is 
$$\binom{4}{1}\binom{7}{1}\binom{6}{2}\binom{4}{2}\binom{2}{2} - \binom{4}{2}\binom{6}{2} \cdot 2! \cdot \binom{4}{2}\binom{2}{2} + \binom{4}{3}\binom{5}{3} \cdot 3! \cdot \binom{2}{2} - 4!$$
