Prove that f(n) = n * log (n) is O(n(1+sqrt(n))).

  • Thread starter Logik
  • Start date
  • Tags
    Log
In summary: Let me know if you need me to help.In summary, the student does not know how to solve for c in order to prove that f(n) is O(n(1+sqrt(n))). They are looking for help from the tutor and have asked for it.
  • #1
Logik
31
0

Homework Statement



Prove that f(n) = n * log (n) is O(n(1+sqrt(n))).

Homework Equations


n/a


The Attempt at a Solution


I really don't know what to do else I wouldn't be here :? Some hints would be appreciated!
 
Physics news on Phys.org
  • #2
Definitions are usually a good place to start.
 
  • #3
f(n) is O(g(n)) if and only if there exists an n_0 part of natural numbers and a constant C that is part of rational numbers for which f(n) <= that c*g(n) for all n >= n_o

I know the def just don't know how to get g(n)...
 
  • #4
Logik said:
f(n) is O(g(n)) if and only if there exists an n_0 part of natural numbers and a constant C that is part of rational numbers for which f(n) <= that c*g(n) for all n >= n_o

I know the def just don't know how to get g(n)...
Well, you were given an f(n) and asked to prove
f(n) is O(n(1+sqrt(n))),​
weren't you? ...
 
  • #5
yes well I don't know how to go from f(n) to g(n)... the examples I have seen were just that you would multiply so part of f(n) until you could group everything together to get c* g(n) but this time I don't see how I can multiply anything to get anything that looks like g(n)...
 
  • #6
Logik said:
yes well I don't know how to go from f(n) to g(n)... the examples I have seen were just that you would multiply so part of f(n) until you could group everything together to get c* g(n) but this time I don't see how I can multiply anything to get anything that looks like g(n)...
I think I had misunderstood you -- your last post sounded like you said you didn't know what g(n) was.

Did you try solving for c? What did you get?
 
  • #7
I don't know where to start to solve for c.. that is my problem...

I don't understand where the 1 comes from... I know O(logn) < O(sqrt(n)) so I can get that but where is the (1+srt(n)) comes from?
 
Last edited:
  • #8
Logik said:
I don't know where to start to solve for c.. that is my problem...

Well, assuming that the problem is correct, you have a known f(n) and g(n) in the inequality
f(n)< C g(n)

I think you can handle solving that for C.
 

1. What does "f(n) = n * log(n) is O(n(1+sqrt(n)))" mean?

This notation is known as Big O notation, which is a mathematical way to describe the limiting behavior of a function as its input grows. In this case, it means that the function f(n) grows no faster than n(1+sqrt(n)) as n increases.

2. How do you prove that f(n) = n * log(n) is O(n(1+sqrt(n)))?

To prove this, we need to show that there exists a positive constant c and a positive integer n0 such that f(n) <= c*n(1+sqrt(n)) for all n > n0. This can be done using mathematical induction or by using limits and derivatives.

3. How does the value of c and n0 affect the proof?

The value of c represents the slope of the function, while n0 represents the point at which the function begins to follow the growth rate of n(1+sqrt(n)). A smaller value of c and larger value of n0 make the proof stronger, as it shows that the function follows the growth rate at a lower input and with a smaller slope.

4. Can this proof be generalized for other functions?

Yes, this proof can be generalized for other functions by following the same logic and using the properties of Big O notation. However, the values of c and n0 may vary for different functions.

5. Why is proving Big O notation important in computer science?

Big O notation allows us to analyze the efficiency and performance of algorithms and functions as the input grows. By proving the Big O notation of a function, we can determine how much time and space it will require to run, and compare it to other functions to choose the most efficient one for a given task.

Similar threads

  • Calculus and Beyond Homework Help
Replies
8
Views
302
  • Calculus and Beyond Homework Help
Replies
17
Views
1K
  • Calculus and Beyond Homework Help
Replies
6
Views
467
  • Calculus and Beyond Homework Help
Replies
1
Views
502
  • Calculus and Beyond Homework Help
Replies
3
Views
541
  • Calculus and Beyond Homework Help
Replies
9
Views
1K
  • Calculus and Beyond Homework Help
Replies
4
Views
641
  • Calculus and Beyond Homework Help
Replies
12
Views
855
  • Calculus and Beyond Homework Help
Replies
1
Views
495
  • Calculus and Beyond Homework Help
Replies
9
Views
902
Back
Top