How many #8 digits can you build? 
How many different 8-digit numbers can be formed using two 1s, two 2s, two 3s, and two 4s such that no two
  adjacent digits are the same?

So we have $0 -> 9 = 10$ options for the digits but with the constraints we have something different. 
Cases:
$1$ _ _ 
$2$ _ _
$3$ _ _
$4$ _ _ 
We can do recursion in the form $A(N), B(N),.. D(N)$ as to how many sequences can be built from the $1, 2, .. 4$ for $N$ letters.
We have $T(n) = A(N-1) + B(N-1) + C(N-1) + D(N-1)$
We are after $T(8)$. We have that for instance $A(n-1) = B(n-2) + C(n-2) + D(n-2) = [A(n-3) + C(N-3) + D(n-3)] + [A(n-3) + B(n-3) + D(n-3)] + [A(n-3) + B(n-3) + C(n-3)] = 3A(n-3) + 2B(n-3) + 2C(n-3) + 2D(n-3)$. 
But this gets long fast.
 A: Use inclusion/exclusion principle:


*

*Include the total number of sequences, which is $\frac{8!}{2!2!2!2!}$

*Exclude the number of sequences containing $11$, which is $\frac{7!}{1!2!2!2!}$

*Exclude the number of sequences containing $22$, which is $\frac{7!}{1!2!2!2!}$

*Exclude the number of sequences containing $33$, which is $\frac{7!}{1!2!2!2!}$

*Exclude the number of sequences containing $44$, which is $\frac{7!}{1!2!2!2!}$

*Include the number of sequences containing $11$ and $22$, which is $\frac{6!}{1!1!2!2!}$

*Include the number of sequences containing $11$ and $33$, which is $\frac{6!}{1!1!2!2!}$

*Include the number of sequences containing $11$ and $44$, which is $\frac{6!}{1!1!2!2!}$

*Include the number of sequences containing $22$ and $33$, which is $\frac{6!}{1!1!2!2!}$

*Include the number of sequences containing $22$ and $44$, which is $\frac{6!}{1!1!2!2!}$

*Include the number of sequences containing $33$ and $44$, which is $\frac{6!}{1!1!2!2!}$

*Exclude the number of sequences containing $11$ and $22$ and $33$, which is $\frac{5!}{1!1!1!2!}$

*Exclude the number of sequences containing $11$ and $22$ and $44$, which is $\frac{5!}{1!1!1!2!}$

*Exclude the number of sequences containing $11$ and $33$ and $44$, which is $\frac{5!}{1!1!1!2!}$

*Exclude the number of sequences containing $22$ and $33$ and $44$, which is $\frac{5!}{1!1!1!2!}$

*Include the number of sequences containing $11$ and $22$ and $33$ and $44$, which is $\frac{4!}{1!1!1!1!}$



Hence the number of such sequences is $\sum\limits_{n=0}^{4}(-1)^n\cdot\binom4n\cdot\frac{(8-n)!}{(1!)^n(2!)^{4-n}}=864$.
A: Use Inclusion-exclusion principle. 
There are $\frac{8!}{2^4}$ 8-digits numbers that can be formed using two 1s, two 2s, two 3s, and two 4s.
i) How many of these 8-digits numbers have two adjacent 1s? 
There are $7\cdot \frac{6!}{2^3}$ such numbers.
ii) How many of these 8-digits numbers have two adjacent 1s and two adjacent 2s in this order? There are
$15\cdot \frac{4!}{2^2}$ such numbers.
iii) How many of these 8-digits numbers have two adjacent 1s, two adjacent 2s and two adjacent 3s in this order? There are
$10\cdot \frac{2!}{2^1}$ such numbers.
iv) How many of these 8-digits numbers have two adjacent 1s, two adjacent 2s, two adjacent 3s and two adjacent 4s in this order? They is only $1$ such number.
Hence the final result is (why?):
$$\frac{8!}{2^4}-4\cdot7\cdot \frac{6!}{2^3}
+(4\cdot 3)\cdot 15\cdot \frac{4!}{2^2}
-(4\cdot 3\cdot 2)\cdot 10\cdot \frac{2!}{2^1}
+(4!)\cdot 1\cdot \frac{0!}{2^0}=864.$$
