• Congratulations to the Class of 2024 on your results!
    Let us know how you went here
    Got a question about your uni preferences? Ask us here

Math Help please (1 Viewer)

CM_Tutor

Moderator
Moderator
Joined
Mar 11, 2004
Messages
2,642
Gender
Male
HSC
N/A
Regarding the second question:

(a) 4 digit PINs from 0, 1, 2, ..., 9 with repetition allowed:

Method 1: Since repetition is allowed, the set of all possible PINs is:

{0000, 0001, 0002, 0003, ..., 9999}

The number of all possible PINs is then the cardinality of this set, which is 10,000

Method 2:
The first digit can be chosen as any of the digits from 0 to 9, so there are 10 possible choices.
Similarly for the second digit, and the third, and the fourth.
Thus, # PINs = 10 x 10 x 10 x 10 = 10,000

(b) 4 digit PINs from 0, 1, 2, ..., 9 with repetition prohibited:

Method 1:
The first digit can be chosen as any of the digits from 0 to 9, so there are 10 possible choices.
The second digit can be chosen as any of the digits from 0 to 9 except for the one chosen first, so there are 9 possible choices.
The third digit can be chosen as any of the digits from 0 to 9 except for the ones chosen first or second, so there are 8 possible choices.
The fourth (and last) digit can be chosen as any of the digits from 0 to 9 except for the three already chosen, so there are 7 possible choices.

Thus, # PINs = 10 x 9 x 8 x 7 = 5,040

Method 2:
We know that there are 10,000 possible PINs with no restrictions on repetition, so the number possible without repetition is this number less the number of prohibited cases.

Prohibited Case 1: All four digits the same.
There are ten such PINs (0000, 1111, 2222, ..., 9999) as there are ten possible choices for the digit to repeat.

Prohibited Case 2: Three digits the same.
The digit repeated three times can be chosen in 10 ways.
This repeated digit can be placed into the PIN in 4 ways (XXXY, XXYX, XYXX, or YXXX).
The remaining digit can be chosen in 9 ways.
So, # prohibited three-digit-same PINs = 10 x 4 x 9 = 360.

Prohibited Case 3: Two digits the same.
This case needs care as the remaining two digits could also be the same...

Case 3(a): Two digits the same and the other two different (like 1123)
The digit to be appear twice in the PIN can be chosen in 10 ways.
These identical digits can appear in a PIN in 6 ways (XX.., X.X., X..X, .XX., .X.X, ..XX)
There are 9 ways to choose the next digit, and 8 ways to choose the last digit
So, # prohibited AABC PINs = 10 x 6 x 9 x 8 = 4,320

Case 3(b): Two digits the same and the other two a different pair (like 1122)
The two digits each to appear twice in the PIN can be chosen in 10C2 = 45 ways.
There are 6 ways to rearrange an AABB PIN into a different PIN (AABB, ABAB, ABBA, BAAB, BABA, BBAA)
So, # prohibited AABB PINs = 45 x 6 = 270

Total Prohibited PINs = 10 + 360 + 4,320 + 270 = 4,960

So, # allowed 4 digit PINs without replacement = 10,000 - 4,960 = 5,040

Now, see if you can figure out (c) for yourself :)
 

Cherrybomb56

Active Member
Joined
Aug 20, 2019
Messages
350
Gender
Female
HSC
2021
Regarding the second question:

(a) 4 digit PINs from 0, 1, 2, ..., 9 with repetition allowed:

Method 1: Since repetition is allowed, the set of all possible PINs is:

{0000, 0001, 0002, 0003, ..., 9999}

The number of all possible PINs is then the cardinality of this set, which is 10,000

Method 2:
The first digit can be chosen as any of the digits from 0 to 9, so there are 10 possible choices.
Similarly for the second digit, and the third, and the fourth.
Thus, # PINs = 10 x 10 x 10 x 10 = 10,000

(b) 4 digit PINs from 0, 1, 2, ..., 9 with repetition prohibited:

Method 1:
The first digit can be chosen as any of the digits from 0 to 9, so there are 10 possible choices.
The second digit can be chosen as any of the digits from 0 to 9 except for the one chosen first, so there are 9 possible choices.
The third digit can be chosen as any of the digits from 0 to 9 except for the ones chosen first or second, so there are 8 possible choices.
The fourth (and last) digit can be chosen as any of the digits from 0 to 9 except for the three already chosen, so there are 7 possible choices.

Thus, # PINs = 10 x 9 x 8 x 7 = 5,040

Method 2:
We know that there are 10,000 possible PINs with no restrictions on repetition, so the number possible without repetition is this number less the number of prohibited cases.

Prohibited Case 1: All four digits the same.
There are ten such PINs (0000, 1111, 2222, ..., 9999) as there are ten possible choices for the digit to repeat.

Prohibited Case 2: Three digits the same.
The digit repeated three times can be chosen in 10 ways.
This repeated digit can be placed into the PIN in 4 ways (XXXY, XXYX, XYXX, or YXXX).
The remaining digit can be chosen in 9 ways.
So, # prohibited three-digit-same PINs = 10 x 4 x 9 = 360.

Prohibited Case 3: Two digits the same.
This case needs care as the remaining two digits could also be the same...

Case 3(a): Two digits the same and the other two different (like 1123)
The digit to be appear twice in the PIN can be chosen in 10 ways.
These identical digits can appear in a PIN in 6 ways (XX.., X.X., X..X, .XX., .X.X, ..XX)
There are 9 ways to choose the next digit, and 8 ways to choose the last digit
So, # prohibited AABC PINs = 10 x 6 x 9 x 8 = 4,320

Case 3(b): Two digits the same and the other two a different pair (like 1122)
The two digits each to appear twice in the PIN can be chosen in 10C2 = 45 ways.
There are 6 ways to rearrange an AABB PIN into a different PIN (AABB, ABAB, ABBA, BAAB, BABA, BBAA)
So, # prohibited AABB PINs = 45 x 6 = 270

Total Prohibited PINs = 10 + 360 + 4,320 + 270 = 4,960

So, # allowed 4 digit PINs without replacement = 10,000 - 4,960 = 5,040

Now, see if you can figure out (c) for yourself :)
Thanks :)
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top