MHB Show that $S(m)=\Theta(m^2)$ with Recurrence Relation

evinda
Gold Member
MHB
Messages
3,741
Reaction score
0
Hello! (Smile)

Let $S(m)=S(m-1)+m$.
I want to show that $S(m)=\Theta(m^2)$.

That's what I have tried:

We suppose a positive integer $m>0$. We suppose that $S(m-1)=\Theta((m-1)^2)$, so it holds that $\exists c_1, c_2>0$ such that :
$$c_1 (m-1)^2 \leq S(m-1) \leq c_2(m-1)^2$$

We will show that $c_1 m^2 \leq S(m) \leq c_2 m^2$.

$$S(m)=S(m-1)+m \leq c_2(m-1)^2+m=c_2 m^2-2c_2 m +c_2+m=c_2m^2-(2c_2m-c_2-m) \leq c_2 m^2, \text{ if } 2c_2m-c_2-m \geq 0 \Rightarrow c_2(2m-1) \geq m \Rightarrow c_2 \geq \frac{m}{2m-1} \to \frac{1}{2} \Rightarrow c_2 \geq \frac{1}{2}$$

So, we have that $S(m)=O(m^2)$.

$$S(m)=S(m-1)+m \geq c_1(m-1)^2+m=c_1 m^2-2c_1 m +c_1+m=c_1m^2-(2c_1m-c_1-m) \geq c_1 m^2, \text{ if } 2c_1m-c_1-m \leq 0 \Rightarrow c_1(2m-1) \geq m \Rightarrow c_1 \geq \frac{m}{2m-1} \to \frac{1}{2} \Rightarrow c_1 \geq \frac{1}{2}$$

So, we have that $S(m)=\Omega(m^2)$.

Therefore, $S(m)=\Theta(m^2)$.

Could you tell me if it is right or if I have done something wrong? (Thinking)

Also, can we find from the above the exact solution of the recurrence relation, or do we have to do it in an other way, like using the substitution method? If so, how can we know when the recursion ends, without having an initial condition? :confused:
 
Physics news on Phys.org
evinda said:
Hello! (Smile)

Let $S(m)=S(m-1)+m$.
I want to show that $S(m)=\Theta(m^2)$.

That's what I have tried:

We suppose a positive integer $m>0$. We suppose that $S(m-1)=\Theta((m-1)^2)$, so it holds that $\exists c_1, c_2>0$ such that :
$$c_1 (m-1)^2 \leq S(m-1) \leq c_2(m-1)^2$$

We will show that $c_1 m^2 \leq S(m) \leq c_2 m^2$.

$$S(m)=S(m-1)+m \leq c_2(m-1)^2+m=c_2 m^2-2c_2 m +c_2+m=c_2m^2-(2c_2m-c_2-m) \leq c_2 m^2, \text{ if } 2c_2m-c_2-m \geq 0 \Rightarrow c_2(2m-1) \geq m \Rightarrow c_2 \geq \frac{m}{2m-1} \to \frac{1}{2} \Rightarrow c_2 \geq \frac{1}{2}$$

So, we have that $S(m)=O(m^2)$.

$$S(m)=S(m-1)+m \geq c_1(m-1)^2+m=c_1 m^2-2c_1 m +c_1+m=c_1m^2-(2c_1m-c_1-m) \geq c_1 m^2, \text{ if } 2c_1m-c_1-m \leq 0 \Rightarrow c_1(2m-1) \geq m \Rightarrow c_1 \geq \frac{m}{2m-1} \to \frac{1}{2} \Rightarrow c_1 \geq \frac{1}{2}$$

So, we have that $S(m)=\Omega(m^2)$.

Therefore, $S(m)=\Theta(m^2)$.

Could you tell me if it is right or if I have done something wrong? (Thinking)

Also, can we find from the above the exact solution of the recurrence relation, or do we have to do it in an other way, like using the substitution method? If so, how can we know when the recursion ends, without having an initial condition? :confused:

Writing the equation in slightly different form You have...

$\displaystyle s_{n+1} = s_{n} + n + 1\ (1)$

Setting $s_{0}$ the value of the $s_{n}$ for n=0, the solution of (1) is...

$\displaystyle s_{n} = s_{0} + \sum_{k=1}^{n} k = s_{0} + \frac{n\ (n+1)}{2}\ (2)$

... so that is $\displaystyle s_{n} = \mathcal{O} (n^{2})$...

Kind regards

$\chi$ $\sigma$
 
chisigma said:
Writing the equation in slightly different form You have...

$\displaystyle s_{n+1} = s_{n} + n + 1\ (1)$

Setting $s_{0}$ the value of the $s_{n}$ for n=0, the solution of (1) is...

$\displaystyle s_{n} = s_{0} + \sum_{k=1}^{n} k = s_{0} + \frac{n\ (n+1)}{2}\ (2)$

... so that is $\displaystyle s_{n} = \mathcal{O} (n^{2})$...

Kind regards

$\chi$ $\sigma$

I see.. But is the way I showed that $S(m)=\Theta(m^2)$ also right?
Or have I done something wrong? :confused:
 
Namaste & G'day Postulate: A strongly-knit team wins on average over a less knit one Fundamentals: - Two teams face off with 4 players each - A polo team consists of players that each have assigned to them a measure of their ability (called a "Handicap" - 10 is highest, -2 lowest) I attempted to measure close-knitness of a team in terms of standard deviation (SD) of handicaps of the players. Failure: It turns out that, more often than, a team with a higher SD wins. In my language, that...
Hi all, I've been a roulette player for more than 10 years (although I took time off here and there) and it's only now that I'm trying to understand the physics of the game. Basically my strategy in roulette is to divide the wheel roughly into two halves (let's call them A and B). My theory is that in roulette there will invariably be variance. In other words, if A comes up 5 times in a row, B will be due to come up soon. However I have been proven wrong many times, and I have seen some...
Back
Top