Permutation problem (password)

jayp

New Member
#1
Hello all, I have been struggling with this problem for a while and I would really appreciate it if you can explain it to me.


A computer hacker is trying to break into a computer system by guessing the system administrator's password. The hacker can try 8 passwords a minute, but if he tries unsuccessfully for more than 8 minutes a day, he will get caught. If he limits his attempts to less time each day, he will not get caught. The hacker knows that the administrator's password is at least 5 and at most 9 characters long, does not contain any character that is not a number, an uppercase letter, or a lowercase letter (no special characters such as spaces, punctuation marks, dollar signs, etc.), and that the first character is a letter. Case matters, and characters can be repeated.

There's 3 parts to the question, but I figure if I know how to solve one of them, then the other ones would be easy to figure out.

Q1) How many passwords are there that start with a letter, contain only numbers and upper and lowercase letters, and are exactly 5 characters long?

What I did here was 52 x 61 x 60 x 59 x 58 because the first one is for sure a letter (26 x 2 to account for both lower and upper) then 61 (because 52 letter possibilities plus 10 number possibilities minus one because characters can't repeat), then 60, and on forth. I got 651,275,040 as the answer. Is that right, and if not, can you please explain why? Thank you.

Q) How many passwords are there that start with a letter, contain only numbers and upper and lowercase letters, and are exactly 9 characters long?

I did the same thing for this as question 2 except i multiplied 9 numbers, so 52 x 61 x 60 x 59 x 58 x 57 x 56 x 55 x 54 and got 6.174243685 e15.

Q3) How many passwords are there that start with a letter, contain only numbers and upper and lowercase letters, and are at least 5 and at most 9 characters long?

I simply found how many possibilities for 5, 6, 7, 8, and 9 (by computing as i did above) and then added all the possibilities together, getting 6.290698175e15

Q4)What fraction of the passwords that start with a letter, contain only numbers and upper and lowercase letters, and are at least 5 and at most 9 characters long can the hacker try in 8 years without getting caught? (Assume that every year lasts 365.25 days.) (Q10)

What I did here is simply take the answer from above and divide (64 x 365.25 days x 8 year) from it because the hacker can try 64 pass codes a day and theres 365.25 days a year, and 8 years). I got 2.97277019e-11 as the answer.


The above methods seem right to me, but I'm not sure. Is it right, and if not please correct me on what Im doing wrong. I've been stressing over this problem for a while now so please help me a little if you can. Thanks so much!