Asked by VP

Prove by showing:
f(n) = n^2 + 4n is O(n)

Answers

Answered by drwls

I am not quite sure what you mean by O(n)
f(n) is of order n^2, not n, as n-> infinity
Answered by VP
Yes it is suppose to be
f(n) = n^2 + 4n is O(n^2)

This is what I have:
n^2 = n^2 + 4n^2 = 5n, but that all I have and don't know what else to do, can you help. Thanks
Answered by Reiny
I am as puzzled by your notation as drwls was.

how did you get n^2 = n^2 + 4n^2 = 5n

from f(n) = n^2 + 4n is O(n^2) ???


BTW, in the original you had O(n)
Answered by VP
Oh okay, I am sorry for typing error. It is definely suppose to be
f(n) = n^2 + 4n is O(n^2)

I am typing to fast bc my answer was suppose to read
n^2 = n^2 + 4n <= n^2 + 4n^2 = 5n^2


Does this make any sense. Please Help!
Answered by Reiny
nope, sorry, makes no sense at all

how did f(n) which is a function notation, become n^2 ??

how did the term 4n suddenly turn into 4n^2 ??

I have certainly never seen a notation such as O(n^2) used in that kind of setting.
Answered by VP
okay, well it is suppose to read Big O of n^2

how about this question
what is the theta class for
f(n) = n^2 + 4n x lg(n)
Answered by Reiny
I am sorry not to be able to help you.
I have never seen that kind of question before.

What level of math is this supposed to be, and whose curriculum are you studying?
Answered by VP
Thanks anyway! :)
Answered by Qun
Yes it is suppose to be
f(n) = n^2 + 4n is O(n^2) :

Hi,

I assume n>1.
let g(n)=n^2

This is straight forward according to big O notation.

f(n) = n^2 + 4n

<= n^2 + 4n^2 = 5n^2

That means |f(n)|<=C|g(n)| where C is a constant.

According to big O definition

f(n) is O(n^2)
There are no AI answers yet. The ability to request AI answers is coming soon!

Related Questions