0
$\begingroup$

It turns out that an employee's name happens to be a very close anagram of our server name. Both contain 13 letters. The employee's name is 1 letter different, although the letter is also only 1 position away from the right letter.

My first thought is that the chance of a perfect anagram is one in $26^{13}$.

And then including the chance of being 1 letter and only 1 position away provides an additional $23$ ways to match. (There are $3$ letter $a$s, so if we don't roll from $a$ to $z$ and vice-versa then there are $26 - 3 = 23$ more ways.)

Including the perfect way to match gives $24$ total ways to match, so the chance of the name being that close is then one out of $26^{13} / 24 \approx 1.03 * 10^{17}$.

Is this correct, or am I missing removing a bunch of duplicates? I notice that order does not matter, since it's an anagram, which makes me think I am missing something.

There are three groups of repeated letters. The $3$ $a$s mentioned, and two other pairs. This could mean I should divide by $3!2!2!$, but I'm not sure. That would make the chance of a perfect anagram the one out of $1.03 * 10^{17}$, and the chance of a "close but not perfect" one would be one out of $26^{13} / 24 / 24 \approx 4.3 * 10^{15}$.

  • 0
    All this seems to be based on assuming letters are equally likely and independently chosen. Most 13-letter names have several of vowels. And in English, consonants x, q, z are used less frequently than s, t, r, n.2017-02-10

1 Answers 1

0

There are $26^{13}$ possible 13-letter "names". For the near match, there 13 possible choices for the mismatched letter, and two possible choices for which letter it could be (if one takes the view that A and Z are adjacent - if not, then things get a bit more complicated). Thus, given a particular server name, there would be $2\times 13 = 26$ possible names for your employee that differ by only one letter.

If all server/employee names were equally likely, then the probability of an exact match would be $1\over 26^{13}$, and the probability of a near match would be ${26 \over 26^{13}} = {1\over 26^{12}}$.

But as BruceET points out, all combinations of 13 letters do not have the same chance to be either name. One assumes both names were chosen based on language, and that puts severe restrictions on the possibilities. I have heard that there are approximately 60,000 words in the english language. Of course, names do not necessarily have to be words in the language, but lets use that as an example. If both names were chosen at random from those 60,000 words, then the probability of a match is $1\over 60,000$, vastly less than $1\over 26^{13}$.

  • 0
    I don't think the latter point is right. That is the chance of choosing the second word the same as the first. That assumes that these are single english words. I guess they are actually pairs of english words, if you include names, but then it's still not the chance that the words are the *same* but that given different word pairs, what is the chance of being anagrams of each other. Anyway, I was aware of the language thing, but I was more concerned about whether I was ruling out duplicates properly or not, which you have not addressed.2017-02-10
  • 0
    @Sahuagin - I admit that I forgot about the names being anagrams, so my calculation are for matches in the same order. This is an issue with the first two paragraphs, but not with the last, because the point of the last paragraph is not to provide a useful probability calculation (I don't have nearly enough information available to accomplish that), but rather to illustrate BruceET's comment: Exact matches are massively more likely than your calculation (even if it were correct) shows, because your calculation is over a much larger set than the names were chosen from.2017-02-10