- #1
SamitC
- 36
- 0
Problem: How many passwords can be created with 6 to 8 characters. Letter case does not matter. Every password must have at least 1 digit.
Approach taken in the solution in the book:
Passwords with 6 characters P6 = 36^6 − 26^6 = 1,867,866,560.
Similarly, we have P7 = 36^7 − 26^7 = 70,332,353,920
and P8 = 36^8 − 26^8 = 2,612,282,842,880.
So, Answer: P = P6 + P7 + P8 = 2,684,483,063,360
My approach:
(number of passwords possible with 6 characters) * (adding 7th an 8th characters including blank) - (number of passwords possible with 6 alpha) * (adding 7th an 8th alpha including blank)
36^6 * 37^2 - 26^6 * 27^2 = 2,754,815,417,280
The answers are different. Can you pls. help finding what did I miss?
Approach taken in the solution in the book:
Passwords with 6 characters P6 = 36^6 − 26^6 = 1,867,866,560.
Similarly, we have P7 = 36^7 − 26^7 = 70,332,353,920
and P8 = 36^8 − 26^8 = 2,612,282,842,880.
So, Answer: P = P6 + P7 + P8 = 2,684,483,063,360
My approach:
(number of passwords possible with 6 characters) * (adding 7th an 8th characters including blank) - (number of passwords possible with 6 alpha) * (adding 7th an 8th alpha including blank)
36^6 * 37^2 - 26^6 * 27^2 = 2,754,815,417,280
The answers are different. Can you pls. help finding what did I miss?