0
$\begingroup$

We know that that infinite series gives:

$$\sum_{i=1}^{k}i = k(k+1)/2$$

I am analyzing an algorithm that has complexity:

$$ n\sum_{i=2}^{k} i$$

My goal is to produce the tightest possible bound on this algorithm. Is it sound to say that the above sum is equivalent to:

$$ n*(k(k+1))\div2-1 $$

What is the best way to reduce my sum into a formula for analysis?

  • 3
    What "infinite" series are you talking about? You **only** have there finite series...2017-02-04
  • 0
    I'm trying to apply this: https://en.wikipedia.org/wiki/1_%2B_2_%2B_3_%2B_4_%2B_⋯2017-02-04
  • 0
    That Wikipedia article seems to be pretty confused. The summation diverges to infinity. It definitely doesn't equal -1/12.2017-02-04
  • 0
    You'd be better off forgetting you ever read that Wikipedia article...2017-02-04
  • 1
    @Kaynex `summation diverges to infinity` That's precisely what the article says, too, on the very first line. `definitely doesn't equal -1/12` Do *not* ignore all those references to [Zeta function regularization](https://en.wikipedia.org/wiki/Zeta_function_regularization), they are there for a good reason.2017-02-04
  • 0
    I'm not ignoring them. I'm regarding them as confused.2017-02-04

1 Answers 1

0

Barring a mistake with the bracketing, what you wrote is correct. Since $\sum_{i=1}^{k}{i}=\frac{k(k+1)}{2}$,

$$ n\sum_{i=2}^{k}{i} = n(\sum_{i=1}^{k}{i} - 1) = n \cdot \left[\frac{k(k+1)}{2} - 1\right]$$

You can rearrange this a bit to get $\frac{1}{2}\left( nk^2 + nk - n \right)$ if that is any more useful.

You seem to have some confusion with terminology in your question. What you have is a finite sum, since you have $1+2+3+\ldots+k$ which is finitely many terms.

An infinite series is where we have the sum going to $\infty$, e.g. something like $\sum_{i=1}^{\infty}{\frac{1}{2^n}}$.