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

  • Thread starter Thread starter Logik
  • Start date Start date
  • Tags Tags
    Log
Click For Summary

Homework Help Overview

The problem involves proving that the function f(n) = n * log(n) is O(n(1+sqrt(n))). This falls within the subject area of algorithm analysis and asymptotic notation.

Discussion Character

  • Exploratory, Conceptual clarification, Assumption checking

Approaches and Questions Raised

  • Participants discuss the definition of Big O notation and express uncertainty about how to derive g(n) from f(n). Some participants suggest starting with definitions and solving for constants, while others question the components of g(n) and how they relate to f(n).

Discussion Status

The discussion is ongoing, with participants sharing their understanding of the definitions and expressing confusion about the relationship between f(n) and g(n). Some guidance has been offered regarding solving for constants, but no consensus has been reached on the approach to take.

Contextual Notes

Participants note a lack of clarity on how to manipulate f(n) to fit the form of g(n) and express uncertainty about the origin of certain terms in the inequality.

Logik
Messages
31
Reaction score
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
Definitions are usually a good place to start.
 
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)...
 
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? ...
 
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)...
 
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?
 
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:
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.
 

Similar threads

  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 8 ·
Replies
8
Views
5K
  • · Replies 17 ·
Replies
17
Views
3K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 3 ·
Replies
3
Views
1K