retagged by
558 views
0 votes
0 votes
Find a recurrence relation for the number of ternary strings of length n that do not contain two consecutive 0s or two consecutive 1s.
Find the same for binary strings.

Also write the initial conditions.
retagged by

1 Answer

0 votes
0 votes
Are we have to write recurrance relation or regular  expression? check the question please

Related questions

0 votes
0 votes
1 answer
1
Jaspreet Kaur Bains asked Dec 19, 2017
2,153 views
Which recurrence relation satisfy the sequence: 2, 3, 4, . . ., for n ≥ 1.A ) T(N) = 2 T(N-1) - T(N-2) B)T(N) = T(N-1) + T(N-2)C)T(N) = N+1D)None of these
1 votes
1 votes
1 answer
2
0 votes
0 votes
1 answer
3
vivek1211 asked Oct 2, 2023
262 views
T(n) = T(n^1/2) + ndoing this in substitution method gives the ans as O(n)but using tree recursion gives the ans as O(nlogn)which of these are correct and which has to be...
0 votes
0 votes
0 answers
4
rexritz asked Aug 13, 2023
303 views
$T\left ( n \right )= 8T\left ( \frac{n}{2} \right )+\left ( n\cdot logn \right )^{2.99}$Also can $\mathcal{O}(n^{3})$ be an upper bound to above recurrence relation?