Math Problem : HH.11 Arrange three numbers and alphabet

I will arrange in a row three numbers/alphabets which are selected among numbers from 0 to 9 and several types of alphabet observing the following [Promise 1] and [Promise 2].

[Promise 1]
I may use the same numbers and alphabets repeatedly to arrange them in a row.


[Promise 2]
I may not arrange only three numbers nor three alphabets.
Answer the following questions.

(1) How many ways of arrangement are there when alphabets are A, B and C ?

(2) There are 5000 ways or more of arrangement.
What is the least number of alphabet to be used in this case ?










Answer
(1) 1170 ways
(2) nine

Solution
(1) The number of the permutations which choose and put three pieces in order from 13 kinds in all of a number and the alphabet is 13 × 13 × 13 = 2197 ways.


I may not choose and put in order only three numbers nor three alphabets.

The number of the permutations which choose and put three pieces in order from ten kinds of numbers is 10 × 10 × 10 = 1000 ways.

The number of the permutations which put only the three alphabet in order is 3 × 3 × 3 = 27 ways.

Therefore, the number of ways to arrange in this case is 2197 - (1000 + 27) = 1170 ways.

(2) When the number of arrangement is considered in the same manner as (1), if there are ten kinds of alphabet - it becomes 20 × 20 × 20 - (1000 +1000) = 6000 ways.


If there nine alphabet, 19 × 19 × 19 - (1000 + 9 × 9 × 9) = 6859 - 1729 = 5130 ways.

If there eight alphabet, 18 × 18 × 18 - (1000 + 8 × 8 × 8) = 5832-1512 = 4320 ways.
From the above, it is nine.