I'm trying to figure out this question and this is my thought process right now. Any help would be appreciated because I feel like im doing something wrong.
Considering a string of 28 characters, how do we determine how many strings would start and end with the same letter (only lowercase) . If I dont consider the first and last character, then there are 26 characters left. Each character has the possibility of being one of the 26 possible letters in the alphabet. So is that 26 characters x 26 letters = 676. Then since there are 26 letters in the alphabet, then the first and last characters could be one of the 26 possible letters. So 676 x 26 = 17576, which is the answer?
Answer
Not quite; the number of 26 letter strings is 2626, not 26⋅26. This is because we have 26 choices for the first letter, times 26 choices for the second letter, times 26 choices for the third letter, and so on and so forth. Perhaps trying a few small cases would help you understand the intuition. But you are correct about the second part; once you determine the middle string, you simply multiply by 26 to account for the first and last letter.
No comments:
Post a Comment