Could anyone describe, why this is a True statements?
if $f_i$ be a function of natural numbers to natural numbers and $f_i(n)=O(n)$ then $\Sigma_{i=1}^{n} f_i(n)=O(n^2) $
Could anyone describe, why this is a True statements?
if $f_i$ be a function of natural numbers to natural numbers and $f_i(n)=O(n)$ then $\Sigma_{i=1}^{n} f_i(n)=O(n^2) $
The statement is false as written. Suppose that each $f_{i}(n)$ satisfies $i^2 n \leq f_{i}(n)\leq 2 i^{2}n$. Then it is the case that $f_{i}(n)=O(n)$ (you can take the constant for $f_{i}(n)$ to be $2i^2$). Then, your function $f$ is lower-bounded by $\sum_{i=1}^{n} i^2 n \leq \sum_{i=1}^{n}f_{i}(n)$ and $\sum_{i=1}^{n}i^2 n \sim n^3$.
In order for the statement to be true, you need each $f_{i}(n)$ to be $O(n)$ using one constant for all of them, i.e. $f_{i}(n)\leq Cn$ for all $i$.
EDIT: and, you need the bound to be true for all $n\geq N$ (where the same $N$ works for each $f_{i}$).