Question

In: Statistics and Probability

Exercise 10.11.1: Counting strings over {a, b, c}. infoAbout Count the number of strings of length...

Exercise 10.11.1: Counting strings over {a, b, c}.

infoAbout

Count the number of strings of length 9 over the alphabet {a, b, c} subject to each of the following restrictions.

(a)

The first or the last character is a.

(b)

The string contains at least 8 consecutive a's.

(c)

The string contains at least 8 consecutive identical characters.

(d)

The first character is the same as the last character, or the last character is a, or the first character is a.

(e)

The string contains at least seven consecutive a's.

(f)

The characters in the string "abababa" appear consecutively somewhere in the 9-character string. (So "ccabababa" would be such a 9-character string, but "cababcaba" would not.)

(g)

The string has exactly 2 a's or exactly 3 b's.

(h)

The string has exactly 2 a's or exactly 2 b's or exactly 2 c's

Solutions

Expert Solution

ANSWER::

NOTE:: I HOPE THIS ANSWER IS HELPFULL TO YOU......**PLEASE SUPPORT ME WITH YOUR RATING......

**PLEASE GIVE ME "LIKE".....ITS VERY IMPORTANT  FOR,ME......PLEASE SUPPORT ME .......THANK YOU


Related Solutions

[02] For n ≥ 1, how many strings of length n using letters a,b,c are there...
[02] For n ≥ 1, how many strings of length n using letters a,b,c are there if the letter a must occur an even number of times?
S is the language over S = {a, b, c, d, e} containing all strings that...
S is the language over S = {a, b, c, d, e} containing all strings that start with at least 2 a's, followed by any number of b's, followed by 5 c's, followed by an odd number of d's, followed by an even number of e's.  For example, S contains aaabbcccccdee, aaaacccccdddeeee, and so on.  Write S symbolically in the manner of section 6.1, problem # 12 a) - f).  Example 6.12 will also be helpful. bonus: How many strings in {000, 11}*...
Counting SortShow the B and C arrays after Counting Sort finishes on the array A [19,...
Counting SortShow the B and C arrays after Counting Sort finishes on the array A [19, 6, 10, 7, 16, 17, 13, 14, 12, 9] if the input range is 0-19.
find a recurrence relation for the number of bit strings of length n that contain the...
find a recurrence relation for the number of bit strings of length n that contain the string 10. What are the initial conditions? How many bit strings of length eight contain the string 10
(2) More inclusion-exclusion counting: How many bit strings of length 15 have bits 1, 2, and...
(2) More inclusion-exclusion counting: How many bit strings of length 15 have bits 1, 2, and 3 equal to 101, or have bits 12, 13, 14, and 15 equal to 1001 or have bits 3, 4, 5, and 6 equal to 1010? (Number bits from left to right. In other words, bit #1 is the left most bit and bit #15 is the right most bit.) Hint: The fact that the third bit appears in two of the required patterns...
Design an efficient algorithm to compute the number of binary strings with length n that satisfy...
Design an efficient algorithm to compute the number of binary strings with length n that satisfy 1 the regular expression ((0 + 11 + 101)∗ (1101))∗ .
Find a recurrence relation for the number of binary strings of length n which do not...
Find a recurrence relation for the number of binary strings of length n which do not contain the substring 010
find a recurrence relation for the number of bit strings of length n that contain two...
find a recurrence relation for the number of bit strings of length n that contain two consecutive 1s. What are the initial conditions? How many bit strings of length eight contain two consecutive 1s
Use inclusion-exclusion to find the number of binary strings of length 5 that have at least...
Use inclusion-exclusion to find the number of binary strings of length 5 that have at least one of the following characteristics: start with a 1, end with a 0, or contain exactly two
Main Objective: Create a function collect_statistics to count the number of words and mean length of...
Main Objective: Create a function collect_statistics to count the number of words and mean length of words in each sentence This is my code so far but I am struggling to join the two functions together. I would appreciate the help! The sentence given as an example is : "Haven't you eaten 8 oranges today?" the mean length of this sentence is 4.5 for reference. Each sentence needs to be split up if given multiple sentences, assuming each sentence ends...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT