Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

$T(N) = N + T(N-3)$

This is what I got so far

$$\begin{align}&= T(N-6) + (N-3)+N\\ &= T(N-9) + (N-6) + (N-3)+N \\ &= T(N-12) + (N-9) + (N-6) + (N-3)+ N\end{align}$$

I think I should use $(n^2 + n) / 2$.

im not sure if im doing it right or not!

Thanks :)

share|improve this question
1  
Welcome to math.SE! It's not hard to type formulas properly here: see this tutorial. For now, I formatted the formulas in your post. –  user53153 Feb 6 '13 at 5:12
    
$N,N-3,N-6,N-9,\ldots$ form an arithmetic progression. Use the formula for the sum of an AP –  dexter04 Feb 6 '13 at 5:12
add comment

1 Answer

Note: we generally express functions of integer arguments with subscripts, i.e. $T_n$ rather than $T(n)$.

This is a constant-coefficient difference equation. To specify the solution, you need three initial conditions, say, $T_1$, $T_2$, and $T_3$. In general, the solution takes the form

$$T_n = T_n^{(H)} + T_n^{(I)}$$

where $T_n^{(H)}$ is a homogeneous solution satisfying

$$T_n^{(H)} - T_{n-3}^{(H)} = 0$$

and the initial conditions, and $$T_n^{(I)}$ is an inhomogeneous solution satisfying

$$T_n^{(I)} - T_{n-3}^{(I)} = n$$

The homogeneous piece takes the form $a r^n$ for some (potentially complex) value of $r$. When we plug this into the homogeneous equation, we get

$$r^3-1=0$$

which has solutions $r=1$, $r=\omega = e^{i 2 \pi/3}$, and $r=\omega^2 = e^{i 4 \pi/3}$. The homgeneous solution is then a linear combination of the solutions corresponding to these roots, i.e.,

$$T_n^{(H)} = A + B \omega^n + C \omega^{2 n}$$

where the constants $A$, $B$, and $C$ are determined by the initial conditions.

The inhomogeneous solution is determined by the factor of $n$, and because of the nature of the equation (a difference), we guess it takes the form $T_n^{(I)} = P n + Q n^2$. Plugging this into the equation, we see that

$$3 P + (6 n-9) Q = n$$

which implies that $Q = 1/6$ and $P = 1/2$. The general solution to the equation is then

$$T_n = A + B \omega^n + C \omega^{2 n} + \frac{1}{6} n (n+3)$$

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.