1
$\begingroup$

If I have a random sequence of letters "AOKNG", and I'd like to find how many permutations of this can be formed given a character offset from 1-9.

So, offset the first character "A" 9 times would give:

  • BOKNG
  • COKNG
  • DOKNG
  • EOKNG
  • FOKNG
  • GOKNG
  • HOKNG
  • IOKNG
  • JOKNG

= 9 permutations.

Then, offset the second for each of the first 9 permutations, and so on.

I have done this programmatically, and I have a total of 32,768 permutations. I'd like to understand how I would go about getting to this number mathematically given the above scenario.

"AOKNG" itself is not a permutation, it is the starting sequence. Take each letter of "AOKNG" and advance it x number of times up until 9. So "A" would become "B", would become "C".

Advance the first letter to "B", would become "BOKNG" (1 permutation), then repeat this nine times, replacing the first letter with C,D,E,F,G,H,I,J.

This gives us 9 permutations.

Now do the same for every letter in the starting sequence to find every possible combination of letters.

There are 9 possible values in total for each of the 5 letters in the starting sequence.

  • 0
    But in your question you include up to JOKNG, which makes for ten permutations for the first letter.2012-11-28

1 Answers 1

2

On a basic interpretation of your question, you have 10 possible characters for each position in the 5-letter word. So the total number of possible words is $10^5=100,000$.

  • 0
    So the answer to my questions was as simple as 9^5. My calculation in my code was correct, I just missed 1 digit off so was doing 8^5 which is why I was getting 32,768 results. Anyway, thanks.2012-11-28