In: Statistics and Probability
Solution
Back-up Theory
If an Activity 1 can be done in n ways, another Activity 2 can be done in m ways and for every one way of doing Activity 1, there are m ways of doing Activity 2, then Activity 1 and Activity 2 can be simultaneously done in
(n x m) ways. This is the Rule of Multiplication applicable to both Permutations and Combinations........................... (1)
Number of ways of arranging n distinct things among themselves (i.e., permutations)
= n!
= n(n - 1)(n - 2) …… 3.2.1…………………………………………………………………................................................................................….(2)
Number of ways of arranging n distinct things taking only r at a time = nPr = (n!)/(n – r)! ……................................….(2a)
Values of n!can be directly obtained using Excel Function: Math & Trig FACT (Number).......................................... (2b)
Number of ways of arranging r things out of n things when the same thing can be selected any number of times
(i.e., with replacement or repetition is allowed) is given by nr..................................................................................... (2c)
Now, to work out the solution,
Trivial, but for clarity, there are 26 lowercase letters [a, b, ….., y, z], 26 uppercase letters [A, B, ….., Y, Z], and 10 numbers [0,1 , 2, ……, 8, 9]……………………………………………………………............................................… (4)
Order matters and repetition of characters is allowe…………………………………………………....................... (5)
One nanosecond = 10-9 x 1 second………………………………………………………………….....................…….. (6)
Part (a)
In total there are (26 + 26 + 10) = 62 characters available. Arranging any 8 out of these 62 characters can be done in 628 = 218340105584896 [vide (2c)]
So, number of passwords of length 8 with any combination of lowercase letters, uppercase letters, and numbers = 218340105584896 Answer 1
At the rate of 1 nanosecond per password, time taken to test
= 218340.1056 s = 60.65 hours [vide (6)] Answer 2
Part (b)
First character can be any one of 26 capital letters in 26 ways, last character can be any one of 10 numbers in 26 ways and intervening 10 characters can be any 10 of 26 lowercase letters in 2610 [vide (2c)] ways.
So, vide (1),
number of passwords that start with a capital letter, have 10 lowercase letters, and end with a number
= 26 x 10 x 2610
= 36703444869877800 Answer 3
At the rate of 1 nanosecond per password, time taken to test
= 36703444.869877800 s = 10195.40135 hours [vide (6)] Answer 4
Part (c)
Following the same analysis as in Part (b),
Number of passwords that start with a capital letter, have between 10 and 20 lowercase letters, and end with a number
= 26 x 10 x (2610 + 2611 + 2612 + 2613 + 2614 + 2615 + 2616 + 2617 + 2618 + 2619 + 2620 )
= 5.39E+30 Answer 5
At the rate of 1 nanosecond per password, time taken to test
= 1.49683E+18 hours [vide (6)] Answer 6
Part (d)
This is just permuting 20000 words taking any 4 with repetition and in any order = 2000004
Number of passwords that have four words in them, where the words come from a list of 20,000 words.
= 1.60E+17 Answer 7
At the rate of 1 nanosecond per password, time taken to test
= 11555555.56 hours [vide (6)] Answer 8
DONE