How to solve this triple summation problem?

1.1k Views Asked by At

For a computer science class we were asked to analyze the run time of an algorithm. The answer was posted. I am not sure the proof is correct. I believe the answer should be $ k c(n^2) $ (where $k$ is a constant). The part that I understand the least is line 2 to line 3. Can anyone give guidance?

Posted Solution

This is the first half of the problem, in case it's useful:

Part one of solution

Matt

1

There are 1 best solutions below

0
On

Looks correct to me. From line 2 to line 3, you can make a change of variable $m=j-i$, then $m$ would be from $1$ to $n-i$.