1
$\begingroup$

You try to guess your friend's password, which is $8$ characters long, chosen from numbers the $0 \to 9$, letters a $\to$ z and letter A $\to $Z [caps]. But Your friend is lazy, and only choses from "a, s, d, f" and "A, S, D, F" and the number "$1$". What is the probability that your friend's password has no repeated characters?

total possibilities: $9^8$

event possibilities: $9^{(8)}$ (9 permute 8)

$P = \frac{9^{(8)}}{9^8} - 0.008$?

But the answer the text gives is: $0.012$?

  • 2
    Mnnn... How many ways are there to make a password 8 characters long with no repeated characters using only five characters.?2017-01-31
  • 0
    Indeed. You have an egg carton with 8 holes but only 5 eggs…2017-01-31
  • 0
    @GrahamKemp, the answer given is 0.017, Im not sure what the writers were thinking2017-01-31
  • 1
    Now.. what is $5^{(8)}$? Presumably you are using notation for falling factorial, where $n^{(r)}=\underbrace{n(n-1)(n-2)\dots(n-r+1)}_{r~\text{terms}}$. Calculate $5^{(8)}$ then... $5\cdot 4\cdot 3\cdot 2\cdot 1\cdot \color{red}{0}\cdot -1\cdot -2$2017-01-31
  • 1
    Perhaps they are allowing the characters $\{a,A,s,S,d,D,f,F,1\}$ for a total of $9$ characters, not just lowercase asdf, but upper as well, but that would give a result of $9!/9^9\approx 0.00843$ (*assuming of course his selection of password is taken uniformly at random from all passwords satisfying those conditions, which wasn't explicitly stated in the problem statement*)2017-01-31
  • 0
    @JMoravitz, updated the question. They allowed caps too2017-02-01
  • 0
    @GrahamKemp, updated problem2017-02-01
  • 0
    @Amad27 Indeed. Then I'd agree with JMoravitz' comment. $9!/9^8\approx0.0084\small 3$2017-02-01
  • 0
    @GrahamKemp, but the answer provided is $0.012$?2017-02-01
  • 0
    @Amad27 But the answer is actually $0.0084$ !2017-02-01
  • 0
    @amad It is possible that the question writers have made a mistake. It is also possible that you still have not copied the question correctly and we are interpreting the question in a different way than the authors intended. Yet another interpretation is that perhaps they are allowing the *number* $1$ (*which is still commonly referred to as a character in this context*) to be repeated, but no *letter* may be repeated. This will increase the probability to about $0.03349$, so still is not likely the intended interpretation.2017-02-01
  • 0
    The end result is that whatever the intended interpretation may be, you are supposed to be able to understand how to find the answer for a specific interpretation and have the analytical tools necessary to complete the problem. In any testing environment, you can and should ask for clarification on problems like these in case there is any ambiguity. Don't trust answers without explanations too much because book authors and teachers are humans too and are prone to mistakes.2017-02-01

2 Answers 2

1

A possibility to explain the answer $0.012$ could be that the password has to be alphanumeric, i.e. it is not allowed to be all letters or all numbers. Under this restriction, the total number of possible passwords is given by $$9^8-8^8-1= 26.269.504$$

where $9^8$ is the total number of possibilities of filling $8 $places with $9$ characters, $8^8$ is the number of passwords containing only letters, and $1$ refers to the unique password containing only numbers $1$.

Considering then the passwords with no repeated characters, we can note that, to meet the condition of being alphanumeric, they all must contain the number $1$ one and only one time. As a result, they must also contain exactly $7$ letters. So their number is given by $$ \binom{8}{7} \cdot 7! \cdot 8=322.560$$

where $ \binom{8}{7} $ is the number of possibilities to choose $7$ letters from the group of available $8$ letters, $7! $ are the permutations of the chosen letters, and $8$ refers to the fact that the number $1$ can be in any position within the password.

Therefore, the resulting probability is

$$\frac {322.560}{26.269.504} \approx 0.012$$

  • 0
    The numerator could also be $9P8 - 8P8$2017-02-01
  • 0
    Surely, using the permutations notation. Could you check whether the original text of the problem has the alphanumeric restriction?2017-02-01
-1

There has to be a repetition because the set of possible characters is smaller than the password length. This is called the Pigeonhole Principle

EDIT: This is outdated due to an edit to the original question, this was true for the character set "a","s","d","f","1" but not when "A","S","D","F" is added.