Question

Exercise 3: Find the number of words a1a2... ag of length 9 such that at least 4 consec- utive letters are the same? (In other terms, for each i e{1,...,9), a, E fa, b, c,..., z, and there exists an integer l < j < 6 such that aj-dj+,-dj+2-aj+3.)
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Let such a bunch of 4 consecutive letters start at index k

The possibilities are k = 1, 2, 3, 4, 5, 6 but not k = 7, 8, 9 (since if a bunch of size 4 starts at k=7 it can go only up to k=9)

If it starts at k=1, then the number of such letters is 26.26 5 as the bunch (which is the bunch of same letters) can be chosen in 26 ways. For each of the other 5 letters, there are 26 possibilities

If it starts at k=2 then the first letter must be different from the bunch so we have 25 26 264 possible numbers

If it starts at k=3 then we have 26.25 264 and so on till k=6

So the total number of such letters is 26 2655.26 25 264- 1794087776

lacksquare

Please do rate this answer positively if you found it helpful. Thanks and have a good day!

Add a comment
Know the answer?
Add Answer to:
Exercise 3: Find the number of words a1a2... ag of length 9 such that at least...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • 3 digits are drawn independently and at random to obtain a 3-digit number. Each of the...

    3 digits are drawn independently and at random to obtain a 3-digit number. Each of the 3 digits can take integer values 1 through 9, with each integer being equally likely to be chosen. In other words, the 3-digit number can be from 111 through 999, but any 3-digit number that contains 0 is impossible. A. What is the chance that the 3-digit number is even? B. What is the chance that the 3-digit number has at least one digit...

  • Exercise 3: Write a program that reads a file and prints the letters in decreasing order...

    Exercise 3: Write a program that reads a file and prints the letters in decreasing order of frequency. Your program should convert all the input to lower case and only count the letters a-z. Your program should not count spaces, digits, punctuation, or anything other than the letters a-z. Find text samples from several different languages and see how letter frequency varies between languages. Compare your results with the tables at https://wikipedia.org/wiki/Letter_frequencies. PYTHON PLEASE the text can be found here...

  • 2. (25) [Rising trend] Textbook Exercise 17 in Chapter 6. The problem to solve is, in other words...

    2. (25) [Rising trend] Textbook Exercise 17 in Chapter 6. The problem to solve is, in other words, to select from a sequence of n numbers a subset, including the first number, such that the selected numbers make a longest monotonously increasing sequence. In the exercise b, (i) write an optimal substructure (with an explanation),ii) write the iterative dynamic programming algorithm (pseudocode), and (iii) show the running-time analysis. Hints: the algorithm in the exercise a is a greedy algorithm; the...

  • IN JAVA. P0\/\/|\|3D. In the early 80s, hackers used to write in an obfuscated, but mostly...

    IN JAVA. P0\/\/|\|3D. In the early 80s, hackers used to write in an obfuscated, but mostly readable way called “leet” – short for “elite”.  In essence, it was a simple character replacement algorithm, where a single “regular” character was replaced by one or more “leet” characters; numbers remained the same.  Here’s one of the most readable versions: a 4 g 9 m /\\/\\ s $ y ‘/ b B h |-| n |\\| t 7 z Z c ( i...

  • I need help writing this C code. Here is the description: Let's say we have a...

    I need help writing this C code. Here is the description: Let's say we have a program called smart typing which does two things: The first letter of a word is always input manually by a keystroke. When a sequence of n letters has been typed: c1c2...cn and the set of words in the dictionary that start with that sequence also have c1c2...cnc then the smart typing displays c automatically. we would like to know,  for each word in the dictionary,...

  • Need help with number 3 the last one Need help with number 3 I have already...

    Need help with number 3 the last one Need help with number 3 I have already given the whole question MATH 1030 – Application Assignment 3 Cryptography Due: Thursday, June 4, 2020 at 11:59pm Atlantic time (submit through Brightspace) You must show your work for full marks. The goal of this assignment is to use our knowledge of linear algebra to do cryptography. We will encrypt a plaintext using a cipher where the resulting ciphertext should not be legible unless...

  • Question 2: Finding the best Scrabble word with Recursion using java Scrabble is a game in...

    Question 2: Finding the best Scrabble word with Recursion using java Scrabble is a game in which players construct words from random letters, building on words already played. Each letter has an associated point value and the aim is to collect more points than your opponent. Please see https: //en.wikipedia.org/wiki/Scrabble for an overview if you are unfamiliar with the game. You will write a program that allows a user to enter 7 letters (representing the letter tiles they hold), plus...

  • I don't know how to terminate the code in the second time that whether or not...

    I don't know how to terminate the code in the second time that whether or not the users want to continue to get a new number. PLEASE HELP. To make telephone numbers easier to remember, some companies use letters to show their telephone number. For example, using letters, the telephone number 438-5626 can be shown as GET LOAN. In some cases, to make a telephone number meaningful, companies might use more than seven letters. For example, 225-5466 can be displayed...

  • c program that counts the number of characters, words and lines from standard input until EOF....

    c program that counts the number of characters, words and lines from standard input until EOF. attached is what i Have so far but its not working ?. about shell redirection Requirements 1. Write a C program that counts the number of characters, words and lines read from standard Input until EOF Is reached. 2. Assume the Input is ASCII text of any length. 3. Every byte read from stdin counts as a character except EOF 4. Words are defined...

  • Write a C++ program that prompts the user with the following menu options: [E]rase–ArrayContent [C]ount–Words [R]ev–Words...

    Write a C++ program that prompts the user with the following menu options: [E]rase–ArrayContent [C]ount–Words [R]ev–Words [Q]uit 1. For Erase–ArrayContent option, write complete code for the C++ function Erase described below. The prototype for Erase is as follows: void Erase( int a[ ], int * N, int * Search-Element ) The function Erase should remove all occurrences of Search-Element from the array    a[ ]. Note that array a[ ] is loaded with integer numbers entered by the user through the...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT