Permutations and Combinations: Question 8

Syllabus 5.2

Structured AS 8 marks

A 44-digit security code is formed by arranging 44 of the 1010 digits 0,1,2,,90,1,2,\ldots,9 in a row, with no digit used more than once.

(a) Find the number of different 44-digit sequences of distinct digits that can be formed, with no other restriction. [1]

(b) A valid code cannot start with the digit 00. Find the number of different valid codes. [3]

(c) Find the number of different valid codes (still with distinct digits and not starting with 00) that are even, that is, the last digit is 00, 22, 44, 66 or 88. [4]

Show worked solution Hide worked solution

Worked solution

Part (a): No restriction other than distinct digits

Choosing and arranging 44 of the 1010 digits, with none repeated, is a permutation:

10P4=10×9×8×7=5040.^{10}P_4 = 10\times9\times8\times7 = 5040.

Part (b): Codes not starting with 0

Direct method: the first digit must come from {1,2,,9}\{1,2,\ldots,9\} (99 choices, excluding 00). Once the first digit is fixed, the remaining 33 positions are filled from the 99 digits still unused (which now includes 00), arranged in order:

9×9P3=9×(9×8×7)=9×504=4536.9 \times\, ^9P_3 = 9\times(9\times8\times7) = 9\times504 = 4536.

Check (complement): the codes that do start with 00 have their first digit fixed as 00, and the remaining 33 positions filled from the other 99 digits: 9P3=9×8×7=504^9P_3 = 9\times8\times7=504. Subtracting from the total in part (a):

5040504=4536.5040 - 504 = 4536.

Both methods agree: 45364536.

Part (c): Valid codes (not starting with 0) that are even

Split into cases according to the last digit, since whether 00 is “used up” by the last digit changes how many choices remain for the first digit.

Case 1: last digit is 00. The last digit is fixed as 00. The first digit must be nonzero, and since 00 is already placed at the end, the first digit can be any of the remaining 99 digits {1,,9}\{1,\ldots,9\}: 99 choices. The middle two positions are then filled from the remaining 88 digits, in order: 8×7=568\times7=56. 9×56=504.9\times56 = 504.

Case 2: last digit is 22, 44, 66 or 88 (44 choices of value). For each such value, the last digit is fixed (nonzero). The first digit must avoid both 00 and the chosen last digit, so from the 99 digits other than the last digit, 11 (namely 00) is excluded, leaving 88 choices. The middle two positions are filled from the remaining 88 digits (after removing the last digit and the first digit): 8×7=568\times7=56. 8×56=448 per last-digit value, so 4×448=1792.8\times56 = 448 \text{ per last-digit value, so } 4\times448 = 1792.

Total: 504+1792=2296.504 + 1792 = 2296.

Check (via the odd case and part (b)‘s total): by the same casework, codes with an odd last digit (1,3,5,7,91,3,5,7,9, all nonzero) each give 88 first-digit choices (excluding 00 and the last digit) and 8×7=568\times7=56 ways for the middle positions, so 5×8×56=22405\times8\times56 = 2240. Since every valid code from part (b) is either even or odd: 2296+2240=4536,2296 + 2240 = 4536, which matches part (b) exactly, confirming 22962296.

Final answers

  • (a) No restriction =5040= \boxed{5040}
  • (b) Not starting with 00 =4536= \boxed{4536}
  • (c) Not starting with 00 and even =2296= \boxed{2296}