The Student Room Group

Big theta question

Hi,

I'm trying to show that n(n+1)21 \frac{n(n+1)}{2}-1 is big theta(n^2). Is it as simple as this:

K1n(n+1)21K2 K_{1}\leq\frac{n(n+1)}{2}-1 \leq K_{2}

2+2K1n(n+1)2+2K2 2+2K_{1}\leq n(n+1)\leq 2+2K_{2}

2+2K1n2+n2+2K2 2+2K_{1}\leq n^2+n \leq 2+2K_{2}

Then as n tends to infinity the n squared factor increases much faster, so it's big theta n squared for some constants K1 and K2?
bump.
Original post by maths learner
Hi,

I'm trying to show that n(n+1)21 \frac{n(n+1)}{2}-1 is big theta(n^2). Is it as simple as this:

K1n(n+1)21K2 K_{1}\leq\frac{n(n+1)}{2}-1 \leq K_{2}

2+2K1n(n+1)2+2K2 2+2K_{1}\leq n(n+1)\leq 2+2K_{2}

2+2K1n2+n2+2K2 2+2K_{1}\leq n^2+n \leq 2+2K_{2}

Then as n tends to infinity the n squared factor increases much faster, so it's big theta n squared for some constants K1 and K2?

That's not really a proof. You've shown that if there are K1,K2K_1, K_2 such that 2+2K1n2+n2+2K2 2+2K_{1}\leq n^2+n \leq 2+2K_{2} then it is big theta(1). You're actually aiming for K1n2n(n+1)21K2n2 K_{1} n^2 \leq\frac{n(n+1)}{2}-1 \leq K_{2} n^2 - do you see why?
Original post by Smaug123
That's not really a proof. You've shown that if there are K1,K2K_1, K_2 such that 2+2K1n2+n2+2K2 2+2K_{1}\leq n^2+n \leq 2+2K_{2} then it is big theta(1). You're actually aiming for K1n2n(n+1)21K2n2 K_{1} n^2 \leq\frac{n(n+1)}{2}-1 \leq K_{2} n^2 - do you see why?


I don't :frown:. Could you explain it a bit more please. Thank you.

Oh is it because I want to show its big theta(n^2) so since the K1 and K2 are just constants, then multiplying them by n^2 gives a proportionality factor... I know what I mean but not sure how to word it aha. Or for that matter how to actually prove this is big theta(n^2). I'm completely new to this.
(edited 9 years ago)
Original post by maths learner
I don't :frown:. Could you explain it a bit more please. Thank you.

The statement that f(x)f(x) is Θ(g(x))\Theta(g(x)) is precisely the statement that there are constants c,Cc, C such that cg(x)f(x)Cg(x)c g(x) \leq f(x) \leq C g(x) for sufficiently large xx.
You have apparently shown that there are constants c,Cc, C such that 2+2cn2+n2+2C2+2 c \leq n^2 + n \leq 2+2C. (This is false, by the way, and it's false because your first line is false.)

Essentially, you started from a false premise, and derived a conclusion which is both false and unrelated to the problem at hand.

The appropriate starting line is:

Spoiler


Intentionally there is only one line; you're meant to fill in the equivalent following lines.
Original post by maths learner
I'm completely new to this.

Should have said :smile:

Suppose n(n+1)2\frac{n(n+1)}{2} is Θ(n2)\Theta(n^2). Then there exist constants c,Cc, C such that cn2n(n+1)2Cn2c n^2 \leq \frac{n(n+1)}2 \leq C n^2 for nn sufficiently large. Can you then discover what c,Cc, C actually are?
Original post by Smaug123
Should have said :smile:

Suppose n(n+1)2\frac{n(n+1)}{2} is Θ(n2)\Theta(n^2). Then there exist constants c,Cc, C such that cn2n(n+1)2Cn2c n^2 \leq \frac{n(n+1)}2 \leq C n^2 for nn sufficiently large. Can you then discover what c,Cc, C actually are?


I'll have an attempt. Not too sure how to go about it though, also are you missing a -1 in between the inequalities?

Do c and C have to be positive?
(edited 9 years ago)
Original post by Smaug123
Should have said :smile:

Suppose n(n+1)2\frac{n(n+1)}{2} is Θ(n2)\Theta(n^2). Then there exist constants c,Cc, C such that cn2n(n+1)2Cn2c n^2 \leq \frac{n(n+1)}2 \leq C n^2 for nn sufficiently large. Can you then discover what c,Cc, C actually are?


is it 1/2 ?. I re arranged each inequality for c and then did the limit as n tends to infinity so took the ratio of the n^2...
Original post by maths learner
I'll have an attempt. Not too sure how to go about it though, also are you missing a -1 in between the inequalities?

Do c and C have to be positive?

Yes on both counts - sorry :smile:


Original post by maths learner
is it 1/2 ?. I re arranged each inequality for c and then did the limit as n tends to infinity so took the ratio of the n^2...

cn2n(n+1)21Cn2c n^2 \leq \dfrac{n(n+1)}{2}-1 \leq C n^2; c=12c=\frac{1}{2} gives n22n22+n21\frac{n^2}{2} \leq \frac{n^2}{2} + \frac{n}{2} - 1 for the lower inequality, which is true as long as n is sufficiently large (bigger than 1). So yes, c=1/2 will do. (Note that the constant is not unique - 1/4 would also do. 1/2 is the best bound there is here.)

For the upper bound: notice that both c and C can't be the same thing - otherwise you're asserting that n(n+1)2\frac{n(n+1)}{2} is precisely 12n2\frac{1}2 n^2 for sufficiently large n, and that's false. You're going to need C to be bigger. Have a guess? Can you show your guess works?
Original post by Smaug123
Yes on both counts - sorry :smile:



cn2n(n+1)21Cn2c n^2 \leq \dfrac{n(n+1)}{2}-1 \leq C n^2; c=12c=\frac{1}{2} gives n22n22+n21\frac{n^2}{2} \leq \frac{n^2}{2} + \frac{n}{2} - 1 for the lower inequality, which is true as long as n is sufficiently large (bigger than 1). So yes, c=1/2 will do. (Note that the constant is not unique - 1/4 would also do. 1/2 is the best bound there is here.)

For the upper bound: notice that both c and C can't be the same thing - otherwise you're asserting that n(n+1)2\frac{n(n+1)}{2} is precisely 12n2\frac{1}2 n^2 for sufficiently large n, and that's false. You're going to need C to be bigger. Have a guess? Can you show your guess works?


Can C just be 1. Because then you have 1/2+1/2-1<1 i.e. 0<1
Original post by maths learner
Can C just be 1. Because then you have 1/2+1/2-1<1 i.e. 0<1

Yep, exactly. (Indeed, *any* C will do, as long as it's strictly bigger than 1/2.)

Now you've found the appropriate c, C. Mathematical pedantry: the proof started out "suppose that the function is Θ(n2)\Theta(n^2)". That is, we assumed what we wanted to prove. We need to make sure that all the steps are iff rather than just implications (although this might be hard because several C, c will do, so some of our steps won't be "only if"). Alternatively, we could re-write the proof, starting out from "let c=1/2, C = 1".
Original post by Smaug123
Yep, exactly. (Indeed, *any* C will do, as long as it's strictly bigger than 1/2.)

Now you've found the appropriate c, C. Mathematical pedantry: the proof started out "suppose that the function is Θ(n2)\Theta(n^2)". That is, we assumed what we wanted to prove. We need to make sure that all the steps are iff rather than just implications (although this might be hard because several C, c will do, so some of our steps won't be "only if"). Alternatively, we could re-write the proof, starting out from "let c=1/2, C = 1".


Ah okay. Thanks so much. So just to clarify it would go something along the lines of:

Proof:

Let cn2n(n+1)21Cn2 cn^2\leq \frac{n(n+1)}{2}-1 \leq Cn^2 from some constants c, C.

This implies that cn(n+1)2n21 c \leq \frac{n(n+1)}{2n^2} -1 . Then the limit as n tends to infinity is 1/2 therefore c=1/2. Then apply a similar argument for C?
Original post by maths learner
Ah okay. Thanks so much. So just to clarify it would go something along the lines of:

Proof:

Let cn2n(n+1)21Cn2 cn^2\leq \frac{n(n+1)}{2}-1 \leq Cn^2 from some constants c, C.

This implies that cn(n+1)2n21 c \leq \frac{n(n+1)}{2n^2} -1 . Then the limit as n tends to infinity is 1/2 therefore c=1/2. Then apply a similar argument for C?

Strictly speaking you need to show that the limiting process behaves well. For instance, the sequence 1, 2-1/2, 3+1/3, 4-1/4, is Θ(n)\Theta(n) according to your argument, but the function is not Θ(n)\Theta(n) with constant c=1 because the terms alternate between below and above n. Constant 1/2 would do there, though.

In this case, any c strictly less than 1/2 will do - that's what you've shown. You could, for instance, say "limit is 1/2, so as n increases, the RHS approaches 1/2 n^2; hence c = 1/4 will do".
Original post by Smaug123
Strictly speaking you need to show that the limiting process behaves well. For instance, the sequence 1, 2-1/2, 3+1/3, 4-1/4, is Θ(n)\Theta(n) according to your argument, but the function is not Θ(n)\Theta(n) with constant c=1 because the terms alternate between below and above n. Constant 1/2 would do there, though.

In this case, any c strictly less than 1/2 will do - that's what you've shown. You could, for instance, say "limit is 1/2, so as n increases, the RHS approaches 1/2 n^2; hence c = 1/4 will do".


Hi thanks for all your help :smile:. I was just re-reading through and I understand it all apart from one thing. When we assumed C=1, why did we sub the value of 1 in for n... that's the one part I don't get which obviously leads to 0<1 so the inequlity holds.
Original post by maths learner
Can C just be 1. Because then you have 1/2+1/2-1<1 i.e. 0<1


Original post by maths learner
Hi thanks for all your help :smile:. I was just re-reading through and I understand it all apart from one thing. When we assumed C=1, why did we sub the value of 1 in for n... that's the one part I don't get which obviously leads to 0<1 so the inequlity holds.

Ah, I didn't read your answer properly - that line should read n2+n21n2\frac{n^2+n}{2}-1 \leq n^2 (letting C = 1), whence subtracting n22\frac{n^2}2 from both sides will give you an inequality which holds for sufficiently large n.

What you have done *could* have been a proof - as long as you also show that equality holds with the inequality only for n<0. (You'd do that by solving the quadratic equation n2+n21=n2\frac{n^2+n}{2}-1 = n^2.) That would then be like drawing a plot of the function (n against n(n+121n2\frac{n(n+1}2 - 1 - n^2), and showing that it intersects the n-axis only for n<0; then observing that at n=0 the function lies above the n-axis, so it must also lie above the n-axis for n>0. That turns out to work in this case, because in fact the inequality is always satisfied for all real n, but it's a bit less safe as a method - it might not work so easily in all cases.
Original post by Smaug123
Ah, I didn't read your answer properly - that line should read n2+n21n2\frac{n^2+n}{2}-1 \leq n^2 (letting C = 1), whence subtracting n22\frac{n^2}2 from both sides will give you an inequality which holds for sufficiently large n.

What you have done *could* have been a proof - as long as you also show that equality holds with the inequality only for n<0. (You'd do that by solving the quadratic equation n2+n21=n2\frac{n^2+n}{2}-1 = n^2.) That would then be like drawing a plot of the function (n against n(n+121n2\frac{n(n+1}2 - 1 - n^2), and showing that it intersects the n-axis only for n<0; then observing that at n=0 the function lies above the n-axis, so it must also lie above the n-axis for n>0. That turns out to work in this case, because in fact the inequality is always satisfied for all real n, but it's a bit less safe as a method - it might not work so easily in all cases.


Ah okay I get that, but then don't you have to find out what the sufficently large values of n actually are? Otherwise it seems like you're just saying this holds for some large number. :P. Seen as my proof doesn't have to be particularly rigorous I'm happy with just subtracting and using the above though.
Original post by maths learner
Ah okay I get that, but then don't you have to find out what the sufficently large values of n actually are? Otherwise it seems like you're just saying this holds for some large number. :P. Seen as my proof doesn't have to be particularly rigorous I'm happy with just subtracting and using the above though.

Well, you could just say "the values exist, because n^2 gets bigger than n" - that's probably enough for these purposes. To be strictly rigorous, you'd need to find the sufficiently large values, yes.
Original post by Smaug123
Well, you could just say "the values exist, because n^2 gets bigger than n" - that's probably enough for these purposes. To be strictly rigorous, you'd need to find the sufficiently large values, yes.


Thank so much for all the help. Legend.
Original post by maths learner
Thank so much for all the help. Legend.

No problem :smile:

Quick Reply

Latest