Short Trick to Find Rank of a Word With Repetitions

Duration: 9 min

This video lesson is available to enrolled students.

Enroll to watch — TCS SuperSet Course

AI Summary

An AI-generated summary of this video lecture.

This educational video, presented by Yash Jain from Knowledge Gate Educator, is a tutorial on finding the rank of a word in a dictionary, specifically focusing on words with repeated letters. The video begins with an introduction to the topic, using a title slide that reads "Rank of a Word (With Repetition)". The core of the lesson is a step-by-step demonstration of a method to calculate the rank. The instructor first analyzes the word "SECRET", which has 6 letters with the letter 'E' repeated twice. He explains that the rank is found by summing the number of words that can be formed with letters that come before the current letter in the alphabet, for each position in the word. For "SECRET", he calculates the number of words starting with letters A, B, C, D, and F (all before 'S') and then proceeds to the next letter 'E', calculating words starting with 'SE' and so on. The method involves using permutations of the remaining letters, adjusting for repetitions. The video then applies the same method to the word "GOOGLE", which has 6 letters with 'O' repeated three times and 'G' repeated twice. The instructor shows the calculation for each letter position, summing the results to find the final rank. The video concludes with a list of practice questions for the viewer, including words like "BANANA", "ZENITH", and "MISSISSIPPI".

Chapters

  1. 0:00 2:00 00:00-02:00

    The video opens with a title slide for a lesson on "Rank of a Word (With Repetition)". The instructor, Yash Jain, introduces the topic. The first example presented is the word "SECRET". The instructor begins the calculation by identifying the letters in the word and their frequencies: S, E, C, R, E, T, with E appearing twice. He explains that the rank is determined by counting all the words that would come before "SECRET" in a dictionary. He starts with the first letter, 'S', and calculates the number of words that can be formed with letters that come before 'S' in the alphabet (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R). For each of these letters, he calculates the number of permutations of the remaining 5 letters, which is 5! (120). He then identifies that the letter 'E' is the next letter in the word, and he will now consider words starting with 'S' and the next letter being one that comes before 'E'. The on-screen text clearly shows the word "SECRET" and the initial calculation for the first letter.

  2. 2:00 5:00 02:00-05:00

    The instructor continues the calculation for the word "SECRET". After establishing that 5 letters (A, B, C, D, F) come before 'S', he calculates the number of words starting with these letters as 5 * 5! = 600. He then moves to the second letter, 'E'. He identifies that the letter 'C' comes before 'E' and calculates the number of words starting with 'SC'. The remaining letters are E, R, E, T, which can be arranged in 4! / 2! = 12 ways. He then moves to the third letter, 'C'. He identifies that no letters come before 'C' in the remaining set (C, R, E, E, T), so the count for this position is 0. He then moves to the fourth letter, 'R'. He identifies that the letter 'E' comes before 'R' and calculates the number of words starting with 'SEC' and the next letter being 'E'. The remaining letters are R, E, T, which can be arranged in 3! = 6 ways. He then moves to the fifth letter, 'E'. He identifies that the letter 'E' is the same as the current letter, so he moves to the next position. The on-screen text shows the step-by-step calculation, including the numbers 5, 2, 1, 4, 2, 6, and the formula 5! / 2! for the first calculation.

  3. 5:00 8:47 05:00-08:47

    The instructor completes the calculation for "SECRET". He moves to the fifth letter, 'E', and identifies that the letter 'E' is the same as the current letter, so he moves to the next position. He then moves to the sixth letter, 'T'. He identifies that the letter 'E' comes before 'T' and calculates the number of words starting with 'SECRE' and the next letter being 'E'. The remaining letter is T, so there is only 1 way. He sums all the calculated values: 600 (from S) + 12 (from SC) + 0 (from SEC) + 6 (from SECR) + 0 (from SECRE) + 1 (from SECRET) = 619. He then adds 1 to get the final rank, which is 620. He then moves to the next example, "GOOGLE". He identifies the letters and their frequencies: G, O, O, G, L, E, with O repeated three times and G repeated twice. He begins the calculation for the first letter, 'G'. He identifies that the letter 'E' comes before 'G' and calculates the number of words starting with 'E'. The remaining letters are G, O, O, G, L, which can be arranged in 5! / (2! * 2!) = 30 ways. He then moves to the second letter, 'O'. He identifies that the letter 'G' comes before 'O' and calculates the number of words starting with 'GG'. The remaining letters are O, O, L, E, which can be arranged in 4! / 2! = 12 ways. He then moves to the third letter, 'O'. He identifies that the letter 'G' comes before 'O' and calculates the number of words starting with 'GO'. The remaining letters are O, G, L, E, which can be arranged in 4! = 24 ways. He then moves to the fourth letter, 'G'. He identifies that the letter 'E' comes before 'G' and calculates the number of words starting with 'GOO'. The remaining letters are G, L, E, which can be arranged in 3! = 6 ways. He then moves to the fifth letter, 'L'. He identifies that the letter 'E' comes before 'L' and calculates the number of words starting with 'GOOG'. The remaining letters are L, E, which can be arranged in 2! = 2 ways. He then moves to the sixth letter, 'E'. He identifies that the letter 'E' is the same as the current letter, so he moves to the next position. He then adds all the calculated values: 30 + 12 + 24 + 6 + 2 + 0 = 74. He then adds 1 to get the final rank, which is 75. The video ends with a list of practice questions.

The video provides a clear, step-by-step method for calculating the rank of a word with repeated letters in a dictionary. The core concept is to break down the problem position by position. For each letter in the target word, the instructor calculates the number of valid permutations of the remaining letters that can be formed using letters that are alphabetically before the current letter. This count is then summed for all positions. The method explicitly accounts for repeated letters by dividing the total permutations by the factorial of the count of each repeated letter. The video effectively demonstrates this process with two detailed examples, "SECRET" and "GOOGLE", and concludes by providing a list of practice problems to reinforce the concept.