This permutation can be used to encrypt a
sequence of five characters by moving each character from its original position
to the position defined by the permutation. For example, the
sequence "APPLE" would be translated into the string
"PLEAP":
Note that we number positions starting at
zero just as in C++ arrays — that’s a hint of things to come. What
about decrypting the text above? Well, each permutation
has an inverse,
another permutation that does the exact opposite of the original
permutation. For the permutation given above, the inverse
permutation is:
No comments:
Post a Comment