How many ternary strings of length 8 begin with 01 or end with 1? (A ternary string consists of 0s, 1s, and 2s.)
We know length of string that is 8.
We want to start with 01 or end with 1
So let us consider the string which starts with 01 so we are left with 6 places to fill with 0s, 1s and 2s. There are 3 possibilities for each place hence total number of such string will be 36.
Now we want our string to end with 1. There are 7 places left to fill with 0s, 1s and 2s. So each place has 3 possiblities hence there are 37 such strings.
Since we want either of the strings. We will add both and hence there are 36 + 37 = 4*36 strings of length 8 which begin with 01 or end with 1.
Get Answers For Free
Most questions answered within 1 hours.