# Rosen 7e Exercise-8.2 Question no-23 page no-525 Recurrence Relation

0 votes
89 views
Consider the nonhomogeneous linear recurrence relation $a_n$=$3a_{n-1}$+$2^n$

in the book solution is given $a_n$=$-2^{n+1}$

but I’m getting $a_n$=$3^{n+1}-2^{n+1}$

edited
0
what is the base condition ?
$-2^{n+1}$ is the particular solution..
1
base condition is $a_0$=1
im getting the same

homogeneous part i got $3^{n+1}$
and particular part $-2^{n+1}$
1

@aditi19

your answer is correct.

You can verify yourself by taking small values of 'n'.

For eg.,  for $n=1$, recurrence relation gives $a_1=3a_0+2^1=3*1+2=5$

Now,$-2^{n+1}$ will give answer as $-2^2=-4$ where as $3^{n+1}-2^{n+1}$ will give answer as $3^2-2^2=5$. So, your answer is correct.

## Related questions

0 votes
0 answers
1
134 views
What is the general form of the particular solution guaranteed to exist of the linear nonhomogeneous recurrence relation $a_n$=$6a_{n-1}$-$12a_{n-2}$+$8a_{n-3}$+F(n) if F(n)=$n^2$ F(n)=$2^n$ F(n)=$n2^n$ F(n)=$(-2)^n$ F(n)=$n^22^n$ F(n)=$n^3(-2)^n$ F(n)=3
0 votes
1 answer
2
149 views
How many bit sequences of length seven contain an even number of 0s? I'm trying to solve this using recurrence relation Is my approach correct? Let T(n) be the string having even number of 0s T(1)=1 {1} T(2)=2 {00, 11} T(3)=4 {001, 010, 100, 111} Case 1-we add 1 to strings of length ... =T(n-1) Case 2-we add 0 to strings of length n-1 having odd number of 0s T(n)=T(n-1) Hence, we have T(n)=2T(n-1)
0 votes
2 answers
3
99 views
Find a recurrence relation for the number of bit strings of length n that contain the string 01.
0 votes
0 answers
4
12 views
Consider the nonhomogeneous linear recurrence relation $a_{n} = 3a_{n-1} + 2^{n}.$ Show that $a_{n} = -2^{n+1}$ is a solution of this recurrence relation. Use Theorem $5$ to find all solutions of this recurrence relation. Find the solution with $a_{0} = 1.$