Finding Rank of a Word: With Repetition

In the previous tutorial, we learn how to find the rank of a word, if the letters are having no repetition. Now lets learn how to find the rank of word, if the letters in a word having repetition.

Before proceeding to the tutorial: we should know, how to calculate the total number of words can be formed using letters of a word is the letters are repeating in nature.

Like how many words can be formed using letters of INDIA. In letter “INDIA” there are 2 I and no other letter is repeating. So the number of words that can form using letter of INDIA will be 5 ! / 2 ! = 60.

Now we may proceed with new learning.

Algorithm

1. First take that word which we have to find the rank and the letters are repeating in nature. I will take “BOMBAY.”

2. Now arrange the letter of ” BOMBAY ” in alphabetical order. Now they are “ABBMOY”.

3. Pickup first letter from “ABBMOY” that’s “A”. Now compare “A” from “BOMBAY”. Does the letter “A” in the first we want? NO. Now how many words can be made if we extract “A” from “ABBMOY”.

A = 5! / 2! = 60

Now proceed to the next.

4. Pickup second letter from “ABBMOY” that’s “B”. Now compare “B” from “BOMBAY”. Does the letter “B” in the first we want? Yes. Now fix the letter “B”.

[ B ]

Then go to once again on the first letter of “ABBMOY”. Does “A” we want? NO. Then write down how many words can be made with starting [ B ] A

[ B ] A = 4! = 24

5. Repeat the process until we get the letter which we want after B in the word “BOMBAY”.

[ B ] B = 4! = 24

[ B ] M = 4! = 24

[ B ] O. “O” we want. So fix this and get back to the starting.

6. Does we want now [ B O ] A? NO. So write down once again.

[ B O ] A = 3! = 6

[ B O ] B = 3! = 6

[ B O ] M. “M” we want now. So fix this too. And get back to the starting.

7. Does we want [ B O M ] A? No. So write down once again.

[ B O M ] A = 2! = 2

[ B O M] B. “B” we want. So fix this too. And get back to starting. We see “A” also we want now. So fix this too. And the last letter is “Y” We also want this. So we reach to the end. Now we can write.

The shortcut for repetition is there
for ex- GOOGLE
It has 6 letters with O repeating twice so all u need to do is
6!/2!
where 6! is for 6 letters in GOOGLE and 2! for 2 O repeating….
try for MISSISSIPPI…