1
$\begingroup$

If you consider a 26 letter alphabet, and a cipher where 24 of the letters are sent to themselves, and only 2 letters switch, how many different substitution alphabet ciphers are there, and what percentage are they of total possible?

I thought it would be there are $26\cdot25=650$ such possible ciphers, for a percentage of $$\frac{26\cdot25}{26!}\cdot100\approx1.61\cdot10^{-22}\%$$

But it seems there are only $325$ possible ciphers, when switching only two letters, and i dont understand why?

$\endgroup$
2
  • 1
    $\begingroup$ Hint: Try that calculation with a 2 letter alphabet where 0 of the letters are sent to themselves. $\hspace{.79 in}$ $\endgroup$
    – user991
    Jun 2, 2014 at 23:38
  • $\begingroup$ If $\Sigma=\{a,b\}$ then wouldnt you have only one possible cipher combination? I feel like something should have clicked from that, but it didnt nor as i try to think of smaller cases now... $\endgroup$ Jun 3, 2014 at 1:13

1 Answer 1

3
$\begingroup$

Iterate through the alphabet (using a smaller alphabet is always a good way to start). So you take letter A and you can combine it with letter B..Z. Now if you take B, then you can combine it with letter A and C..Z. But the combination (A,B) is equivalent to (B,A). So you only have C..Z to consider. Thus you would get (n - 1) + (n - 2) + ... pairs, leaving you with 26 * (25 / 2) = 325 combinations.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.