Solution — 2017 Question 8 Permutations & Combinations
(a)
(b)
With repetitions allowed, total number of codes
(i)
For the digit to appear exactly once, one of the choices must be 5 (1 way) and we fill the remaining 2 digit positions with any of the 5 other digits. There are 3 ways to rearrange these digits (5XX, X5X, XX5)
For the letter to appear exactly twice, H must appear twice (1 way) and we fill the remaining letter position with any of the 7 other letters. There are also 3 ways to rearrange these letters (HHX, HXH, XHH)
(ii)
Case 1: 2 is the first character but H is not the sixth character
Case 2: H is the sixth character but 2 is not the first character