23. Find the number of 10 -letter permutations comprising $4 a^{\prime} s, 3 b ' s, 3 c$ 's such that no two adjacent letters are identical.
23. Answer: 248 .
We shall use the RP hex function (where RP stands for Roger Poh) to deal with this question. Let \# $(p, q, r)$ denote the number of permutations of $p$ copies of $A, q$ copies of $B$ and $r$ copies of $C$ such that no two adjacent letters are identical. Among these \#(p,q,r) such permutations, let \#(p;q,r) denote the number of those permutations which do not begin with $A$. Hence, we have
$$
\begin{array}{l}
\#(p, q, r)=\#(p-1 ; q, r)+\#(q-1 ; p, r)+\#(r-1 ; p, q) \text { and } \\
\#(p, q, r)=\#(q-1 ; p, r)+\#(r-1 ; p, q) .
\end{array}
$$

For this question, we are required to evaluate \# $(4,3,3)$.
$$
\begin{array}{l}
\#(4,3,3)=\#(3 ; 3,3)+2 \#(2 ; 4,3) \\
\#(3 ; 3,3)=2 \#(2 ; 3,3)=4 \#(2 ; 2,3)=116 \\
\#(2 ; 2,3)=\#(1 ; 2,3)+\#(2 ; 2,2)=9+20=29 \\
\#(1 ; 2,3)=\#(1 ; 1,3)+\#(2 ; 1,2)=2+7=9 \\
\#(1 ; 1,3)=\#(1,3)+\#(2 ; 1,1)=\#(2 ; 1,1)=2 \\
\#(2 ; 1,1)=2 \#(2,1)=2 \\
\#(2 ; 1,2)=\#(2,2)+\#(1 ; 2,1)=2+\#(1 ; 2,1)=7 \\
\#(1 ; 2,1)=\#(1 ; 1,1)+\#(1,2)=2 \#(1,1)+1=5 \\
\#(2 ; 2,2)=2 \#(1 ; 2,2)=4 \#(1 ; 2,1)=20 \\
\#(2 ; 4,3)=\#(3 ; 2,3)+\#(2 ; 4,2)=45+21=66 \\
\#(3 ; 2,3)=\#(1 ; 3,3)+\#(2 ; 3,2)=2 \#(2 ; 1,3)+\#(2 ; 3,2) \\
\#(2 ; 1,3)=\#(2,3)+\#(2 ; 1,2)=1+7=8 \\
\#(3 ; 2,3)=16+29=45 \\
\#(2 ; 4,2)=\#(3 ; 2,2)+\#(1 ; 2,4)=2 \#(1 ; 3,2)+\#(1 ; 2,4) \\
\#(4 ; 3,3)=116+2(66)=248 . \\
\#=21 \\
\hline
\end{array}
$$