416 views

1 Answer

0 votes
0 votes
$\begin{align*} &\text{Lets us assume, } \\ \\ &A(n) = \text{Number of strings ends with 1 and has 01 substring} \\ &B(n) = \text{Number of strings ends with 0 and has 01 substring} \\ &\text{and let us call the strings satisfying the property as valid strings.} \\ \\ & \text{We can see that } B(n) = F(n-1) \quad \text{ For } B(n) \text{, We can not get more number of strings} \\ \\ &A(n) = \left [\text{All strings of length }(n - 2) \right ].01 \quad + \\ &\quad \left [\text{All the valid strings of length }(n - 1) \text{ that ends with 1} \right ].1 \\ \\ &A(n) = 2^{n-2} + A(n-1) \\ &A(n) = 2^{n-2} + 2^{n-3} + A(n-2) \\ & ....... \\ &A(n) = 2^{n-2} + 2^{n-3} + .... + 2^{n - (n-1+1)} + A(n - (n-1)) \\ &A(n) = 2^{n-1} - 1 \\ \\ &\Rightarrow F(n) = 2^{n-1} - 1 + F(n-1) \\ \\ &\text{Initial condition, } F(1) = 0 \quad \text{ because valid strings are of atleast length 2} \\ \end{align*}$

Related questions

381
views
2 answers
1 votes
admin asked May 2, 2020
381 views
How many bit sequences of length seven contain an even number of $0s?$
203
views
0 answers
0 votes
admin asked May 2, 2020
203 views
Find a recurrence relation for the number of bit sequences of length $n$ with an even number of $0s.$
265
views
0 answers
0 votes
admin asked May 2, 2020
265 views
Find the recurrence relation satisfied by $S_{n},$ where $S_{n}$ is the number of regions into which three-dimensional space is divided by $n$ planes if every ... four of the planes go through the same point.Find $S_{n}$ using iteration.
264
views
0 answers
0 votes
admin asked May 2, 2020
264 views
a) Find the recurrence relation satisfied by $R_{n},$ where $R_{n}$ is the number of regions into which the surface of a sphere is divided by $n$ great ... of the great circles go through the same point.b) Find $R_{n}$ using iteration.