Question
Find the rank of the word 'PROPER' in dictionary order
among all its permutations.Solution
The word is 'PROPER'. The letters in alphabetical order are E, O, P, P, R, R. The number of letters is 6. We need to find the rank of 'PROPER' in dictionary order. We will consider all permutations of the letters of 'PROPER'. 1.    Words starting with 'E': If 'E' is the first letter, the remaining 5 letters (O, P, P, R, R) can be arranged in (5!)/(2!2!) = 30 ways. 2.    Words starting with 'O': If 'O' is the first letter, the remaining 5 letters (E, P, P, R, R) can be arranged in(5!)/(2!2!) = 30 ways. 3.    Words starting with 'P': If 'P' is the first letter, we look at the second letter. The remaining letters are (E, O, P, R, R). a.    Words starting with 'PE': The remaining 4 letters (O, P, R, R) can be arranged in 4!/2! = 12 ways. b.    Words starting with 'PO': The remaining 4 letters (E, P, R, R) can be arranged in4!/2! = 12 ways. c.    Words starting with 'PP': The remaining 4 letters (E, O, R, R) can be arranged in4!/2! = 12 ways. d.    Words starting with 'PR': The remaining 4 letters (E, O, P, R) can be arranged in 4!=24 ways. Now we have reached the first two letters 'PR' of our word 'PROPER'. We look at the third letter. The remaining letters are (E, O, P, R). The third letter in 'PROPER' is 'O'. We consider the letters that come before 'O' in the remaining letters (E, O, P, R). 'E' comes before 'O'. e.    Words starting with 'PRE':
The remaining 3 letters (O, P, R) can be arranged in 3!=6 ways.
Now we have 'PRO'. The remaining letters are (P, E, R). The next letter in 'PROPER' is 'P'. We consider the letters that come before 'P' in the remaining letters (E, P, R). 'E' comes before 'P'. f.     Words starting with 'PROE':
The remaining 2 letters (P, R) can be arranged in 2!=2 ways (EPR, ERP). Now we have 'PROPE'. The remaining letters are (P, R). The next letter in 'PROPER' is 'P'. The letters in the remaining set are 'P' and 'R'. No letter comes before 'P'. Finally, we have 'PROPER'. The remaining letter is 'R'. The rank is the sum of the number of words counted before 'PROPER' plus 1. Rank = (Words starting with 'E') + (Words starting with 'O') + (Words starting with 'PE') + (Words starting with 'PO') + (Words starting with 'PP') + (Words starting with 'PRE') + (Words starting with 'PROE') + 1 Rank = 30+30+12+12+12+6+2+1=105.
What does A/B testing involve in data analytics?
Which of the following is an example of an active electronic component?
Which complexity class represents problems that can be solved in polynomial time?
In a typical Ethernet LAN, what type of cable is commonly used for wired connections?
Which operator is used to allocate dynamic memory in C++?
What will be the output of the following code:
int main() {
  int...
The Protocol Data Unit (PDU) at the Network Layer of the OSI model is commonly referred to as a:
Which tree traversal visits the nodes in the order: left, root, right?
In Hadoop, what is the purpose of the MapReduce paradigm?
What is abstraction in object-oriented programming?