
Patrick B. answered 04/30/19
Math and computer tutor/teacher
the letter T can appear in the first position ONLY. In that case, there are 3^3=27 possible combinations.
The same is true for the letter T appearing in ONLY the second position...
and the 3rd ONLY...
and the 4th ONLY
so the subtotal thus far is 4*27 = 108
Now for the letter T appearing in 2 of the 4 letter T, there are (4 choose 2) possible ways to arrange this:
(4 choose 2) = 4*3/2 = 6, namely
TTxx
TxTx
TxxT
xTTx
xTxT
xxTT
where x=Q,R, or Z
so we have 3^2*6 = 9 *6 = 54 possible combinations for the letter T appearing twice.
This brings the total up to 108+54 = 162
Now for 3 appearances of the letter T, the template looks like (4 choose 3) = 4
TTTx
TTxT
TxTT
xTTT
So there are exactly 3*4=12 ways to pull this off, which brings the total up to 162+12 = 174.
Then finally we have the case of letter T appearing in all four positions.
The final answer is 175