Prove that log(n) ∈ Θ( nlog(n) )

  • Thread starter Thread starter s3a
  • Start date Start date
Click For Summary

Discussion Overview

The discussion revolves around proving that log(n) ∈ Θ(n log(n)). Participants are exploring the mathematical steps involved in manipulating logarithmic identities and inequalities related to the factorial function, specifically log(n!). The focus is on the theoretical aspects of asymptotic notation and the application of logarithmic properties.

Discussion Character

  • Homework-related
  • Mathematical reasoning
  • Debate/contested

Main Points Raised

  • Some participants express confusion about the manipulation of terms in the expression log(n!) and how to relate it to the inequality involving n/2 terms.
  • There is a discussion about the separation of terms into two lists and the implications of using the smallest term from each list to establish inequalities.
  • One participant questions the justification of a step involving n/2 [log(n) - 1] and its equivalence to n/2 [log(n) - 1/2 * log(n)].
  • Another participant notes that log(2) equals 1 only under specific logarithmic bases, which introduces uncertainty about the validity of certain substitutions.
  • There is exploration of alternative approaches to the problem, including different ways to express log(2) in terms of other logarithmic identities.
  • A participant raises a question about a potential typo in the provided solution, suggesting that the inequality should relate log(n!) to n log(n) instead.

Areas of Agreement / Disagreement

Participants generally agree on the need to clarify the steps involved in the proof, but multiple competing views and uncertainties remain regarding the manipulation of logarithmic terms and the correctness of certain expressions.

Contextual Notes

There are unresolved mathematical steps and assumptions regarding the choice of logarithmic bases and the implications of inequalities used in the discussion. The relationship between log(n!) and n log(n) remains a point of contention.

s3a
Messages
828
Reaction score
8

Homework Statement


The question and solution are in the attachment.


Homework Equations


Big O, Ω, Θ definitions. Also, I think logarithmic identities.


The Attempt at a Solution


It's the part shown in red that I am stuck at. I tried to expand log(n!) to log(n) + log(n-1) + ... + log(1) but I can't see how to get log(n) + log(n-1) + log(n-2) + ... + log(n/2 + 1) + log(n/2) + ... + log(2) + log(1) = n/2 * log(n/2) + n/2 * log(1) out of that.

Any help getting past this step would be greatly appreciated!
Thanks in advance!
 

Attachments

  • P5.jpg
    P5.jpg
    46 KB · Views: 771
Physics news on Phys.org
s3a said:
I can't see how to get log(n) + log(n-1) + log(n-2) + ... + log(n/2 + 1) + log(n/2) + ... + log(2) + log(1) = n/2 * log(n/2) + n/2 * log(1) out of that.
The book isn't stating those are equal instead it's stating it's greater than or equal:

log(n) + log(n-1) + log(n-2) + ... + log(n/2 + 1) + log(n/2) + ... + log(2) + log(1) >= n/2 * log(n/2) + n/2 * log(1)
 
Thanks for clarifying that it's an inequality but I'm still confused as to the reasoning with all the n/2 terms as well as why those curly braces are being chosen in their entirety (because that seems to imply that it's exactly equal to the thing under each respective curly brace).

If I am being unclear, please tell me.
 
s3a said:
all the n/2 terms
It's because a list of n terms from 1 to n was separated into two lists, {1 to n/2} {n/2+1 to n}.

s3a said:
seems to imply that it's exactly equal to the thing under each respective curly brace.
Not equal but greater than or equal. For example {log(1) + log(2) + ... + log(n/2)} is greater than {log(1) + log(1) + ... + log(1)}.
 
Last edited:
Okay, I now see that the goal was to choose the smallest (or even a smaller) term from each curly brace such that it's less than or equal to the initial log(n!).

I am now stuck at the step:
n/2 [log(n) - 1] >= n/2 [log(n) - 1/2 * log(n)]

How do I justify that step?
 
It's ok up to this point:

n/2 log(n/2) + n/2 log(1), since log(1) == 0, this becomes
n/2 log(n/2) + 0 == n/2 log(n/2)

n/2 log(n/2) ==
n/2 (log(n) - log(2))

Then there's an issue:

n/2 (log(n) - log(2)) ?= n/2 (log(n) - 1)

This means log(2) == 1, which is only true if this is log base 2 (log2(...)

So ignoring this substitution and continuing

n/2 (log(n) - log(2))

note that 1/2 log(4) == log(2), { since sqrt(4) == 2, so 1/2 log(4) == sqrt(log(4)) == log(2) }

if n >= 4, then 1/2 log(n) >= log(2) and

n/2 (log(n) - log(2)) >= n/2(log(n) - 1/2 log(n))

since log(n) - 1/2 log(n) = 1/2 log(n),
n/2(log(n) - 1/2 log(n)) = n/2(1/2 log(n)) = 1/4 n log n
 
Last edited:
Basically the question is prove: lim n->infty log(n!)/ (nlog(n)) = c, for some constant c.
If you expand n! you get n*(n-1)*(n-2)...etc, which will be n^n-O(n^(n-1)). For large n, n^n will be the dominant term.
 
Thanks for the answers.

rcgldr, the whole 1/2 log(4) == log(2) thing was just an attempt to match my teacher's solution, right?

For example, if I replaced log(2) with log 1/4 * log(16) instead of replacing it with 1/2 * log(4) and then replaced log(16) with log(n) as follows:
n/2 * [log(n) - 1/4 * log(n)]
= 4n/8 log(n) - n/8 log(n)
= 3/8 * n * log(n)

it would be a correct yet slightly different approach to what the teacher did, right?
 
s3a said:
3/8 * n * log(n) ...
it would be a correct yet slightly different approach to what the teacher did, right?
Yes, but in this case only if n >= 16.
 
  • #10
I have another mini-question: Is the ending of the solution provided a typo?

More specifically, should n log(n) <= 4 n log(n) be n log(n) <= 4 log(n!) instead?
 
  • #11
s3a said:
Should n log(n) <= 4 n log(n) be n log(n) <= 4 log(n!) instead?
That's what I think it should be.
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 11 ·
Replies
11
Views
3K
Replies
2
Views
3K
Replies
2
Views
3K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 10 ·
Replies
10
Views
4K
Replies
24
Views
7K