Is nlogn the Same as n Multiplied by logn?

  • Context: Undergrad 
  • Thread starter Thread starter pjhphysics
  • Start date Start date
  • Tags Tags
    Log
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
1 reply · 2K views
pjhphysics
Messages
16
Reaction score
0
Hey,

Is nlogn (or more specifically nlog[base2]n) the same as: n multiplied by logn?

Thanks
 
Mathematics news on Phys.org
Yes. In a programming, it would be written something like n * log(n).

I am guessing you're talking about Big Oh notation. An interesting thing about Big Oh is that it doesn't matter what base log you're referring to. Given two bases, log_a(x) and log_b(x) will always be proportional to each other for all x. Big Oh notation ignores scalar differences between functions, so O(log_a(x)) = O(log_b(x)).