Problem

Solve the following recurrence relations.

Solve the following recurrence relations.

Step-by-Step Solution

Solution 1

a)

The given recurrence relation is

$$ \begin{aligned} x(n) &=x(n-1)+5 \text { for } n>1, x(1)=0 \\ &=[x(n-2)+5]+5=x(n-2)+5.2 \\ &=[x(n-3)+5]+5.2=x(n-3)+5.3 \\ \cdot \\ \\ &=[x(n-1)+5]+5 . i \\ =& \dots \dots \\ =& x(1)+5 \cdot(n-1) \\ =& 0+5(n-1) \\ =& 5(n-1) \end{aligned} $$

This can also be done using arithmetic progression

$$ \begin{aligned} \mathrm{x}(\mathrm{n}) &=\mathrm{x}(1)+\mathrm{d}(\mathrm{n}-1) \\ &=0+5(\mathrm{n}-1) \\ &=5(\mathrm{n}-1) \end{aligned} $$

b)

The given recurrence relation is

$$ \begin{aligned} x(n) &=3 x(n-1) \text { for } n>1, x(1)=4 \\ &=3[3 x(n-2)]=3^{2} x(n-2) \\ &=3\left(3[3 x(n-3)]=3^{3} x(n-3)\right.\\ \\ & \\ &=3^{i} x(n-i) \\ &=3^{n-1} x(n-1) \\ &=3^{n-1} x(1) \\ =& 4.3^{n-1} \end{aligned} $$

This can also be done using geometric progression

$$ \begin{aligned} x(n) &=x(1) \cdot q^{n-1} \\ &=4.3^{n-1} \end{aligned} $$

c)

The given recurrence relation is

\(x(n)=x(n-1)+n\) for \(n>0, x(0)=0\)

\(=[\mathrm{x}(\mathrm{n}-2)+(\mathrm{n}-1)]+\mathrm{n}=\mathrm{x}(\mathrm{n}-2)+(\mathrm{n}-1)+\mathrm{n}\)

\(=[x(n-3)+(n-2)+(n-1)]+n=x(n-3)+(n-2)+(n-1)+n\)

\(=x(n-i)+(n-i+1)+(n-i+2)+\ldots \ldots+n\)

\(=x(0)+1+2+3+\ldots .+n=\frac{n(n+1)}{2}\)

d)

The given recurrence relation is

$$ \begin{aligned} x(n) &=x(n / 2)+n \text { for } n>1, x(1)=1 \text {, we want to solve for } n=2^{k} \\ &=x\left(2^{k-1}\right)+2^{k} \\ &=\left[x\left(2^{k-2}\right)+2^{k-1}\right]+2^{k}=x\left(2^{k-2}\right)+2^{k-1}+2^{k} \\ &=\left[x\left(2^{k-3}\right)+2^{k-2}\right]+2^{k-1}+2^{k}=x\left(2^{k-3}\right)+2^{k-2}+2^{k-1}+2^{k} \\ \cdot \\ \cdot \\ \cdot \\ &=x\left(2^{k-k}\right)+2^{k-k+1}+2^{k-k+2}+\ldots .+2^{k} \\ =& x\left(2^{k-k}\right)+2^{1}+2^{2}+\ldots+2^{k} \\ =& 1+2^{1}+2^{2}+\ldots .+2^{k} \\ =& 2^{k+1}-1 \\ =& 2.2^{k}-1 \\ =& 2 n-1 \end{aligned} $$

e)

The given recurrence relation is

$$ \begin{aligned} \mathrm{x}(\mathrm{n}) &=\mathrm{x}(\mathrm{n} / 3)+1 \text { for } \mathrm{n}>1, \mathrm{x}(1)=1 \text { we want to solve for } n=3^{k} \\ &=x\left(3^{k}\right)+1 \\ &=\left[x\left(3^{k-2}\right)+1\right]+1=x\left(3^{k-2}\right)+2 \\ &=\left[x\left(3^{k-3}\right)+1\right]+2=x\left(3^{k-3}\right)+3 \end{aligned} $$

$$ =x\left(3^{k-i}\right)+i $$

$$ =x\left(3^{k-k}\right)+k=x(1)+k $$

Apply the logarithms on both sides for \(n=3^{k}\) then

$$ \begin{aligned} &=x(1)+k \\ &=1+\log _{3} n \end{aligned} $$

Add your Solution
Textbook Solutions and Answers Search
Solutions For Problems in Chapter 2.4
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT