Answer :
SOLUTION
This is a permutation problem.
a) To find the number of possible two digits codes
[tex]^6P_2[/tex][tex]^6P_2=\frac{6!}{(6-2)!}[/tex][tex]\begin{gathered} =\frac{6!}{4!} \\ =\frac{720}{24} \\ =30\text{ ways} \end{gathered}[/tex]There are 30 possible two-digit codes pattern.
b) To find the number of three digits codes
[tex]\begin{gathered} ^6P_3=\text{ }\frac{6!}{(6-3)!} \\ \text{ =}\frac{6!}{3!} \\ \text{ =}\frac{720}{6} \\ \text{ = 120 ways} \end{gathered}[/tex]There are 120 possible three-digit codes pattern.
Any other pattern can be calculated using
[tex]\begin{gathered} ^6P_r \\ \text{where r is the number of digits code (1,2,3,4,5,6)} \end{gathered}[/tex]So to predict the number of possible five-digit codes will be:
[tex]^6P_5[/tex][tex]\begin{gathered} =\frac{6!}{(6-5)!} \\ =\frac{6!}{1!} \\ =720\text{ways} \end{gathered}[/tex]There are 720 different possible five-digit codes