Let hn​ be the number of strings of length n consisting of A's, B's, or C's that do not contain two adjacent A's. (So to compute h5​, you would count ACBAB but not CAABA.) (a) Compute h1​ be listing the the allowable strings. (b) Compute h2​ be listing the allowable strings. (c) Find a recurrence relation for hn​ and use it to compute h5​.

Q&A Education