Answer only a & b thanks
A ternary string is a sequence of 0’s,1’s and2’s. Just like a bit string, but with three symbols. Let’s call a ternary string good provided it never contains a 2 followed immediately by a 0. Let Gn be the number of good strings of length n. For example, G1= 3, and G2 = 8 (since of the 9 ternary strings of length 2, only one is not good).
a. List the set of all good strings of length n = 2
b. List the set of all good strings of length n = 3
c. Find, with justification, a recursive formula for Gn, and
d. Use the recursive relation found in(c) to compute G5.
Get Answers For Free
Most questions answered within 1 hours.