Can somebody look over my proof? (Asymptotic notation and algorithms)

Click For Summary

Discussion Overview

The discussion revolves around the proof of the statement that log(n!) is in Θ(n log(n)). Participants are examining different approaches to proving this asymptotic relationship, focusing on formal proof techniques and the use of Stirling's formula versus integral approximations.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant expresses uncertainty about their proof-writing skills and seeks feedback on their proof of log(n!) in Θ(n log(n)).
  • Another participant suggests that Stirling's formula is unnecessary and proposes using an integral approximation to derive log(n!).
  • A different participant questions the rigor of using asymptotic expressions directly in the proof, emphasizing the importance of maintaining error terms for a rigorous approach.
  • Another participant provides a method to derive error bounds for log(n!) using integrals, suggesting a visual representation of the relationship between the sum and integrals.
  • The original poster acknowledges the validity of the integral approach but notes that their textbook recommended using Stirling's formula.

Areas of Agreement / Disagreement

Participants express differing opinions on the necessity of Stirling's formula versus integral approximations, indicating that there is no consensus on the best approach to the proof.

Contextual Notes

Some participants highlight the importance of rigor in proofs, particularly regarding the treatment of error terms and the use of asymptotic forms. There is also mention of specific techniques such as bounding functions using integrals, which may depend on the definitions and assumptions made in the context of the problem.

Who May Find This Useful

This discussion may be useful for individuals studying algorithms, particularly those interested in asymptotic analysis and formal proof techniques in mathematics.

scorpion4377
Messages
9
Reaction score
0
Hey. I'm self studying my way through an algorithms book, and one of the questions at the end of a section is to prove that [itex]log(n!) \in \Theta (n log(n))[/itex]. I wrote up what I believe is a valid proof. However, I don't have much experience writing formal proofs (and even less experience with having my proofs corrected by professionals), so it could very well be invalid/lingered with errors. Can somebody take a quick look at it and comment on any mistakes that may exist? Can you comment on my style? Any advice would be appreciated.

Here is my write-up. I apologize for not using the built-in equation editor.

http://i.imgur.com/iyAto.png
 
Physics news on Phys.org
I think Stirling's formula is unnecessary here. An asymptotic expression for [itex]\log(n!)[/itex] can be obtained as follows:
[tex]\log(n!)=\sum_{k=1}^{n}\log(k) \sim \int_{1}^{n}\log(x)dx[/tex]
The integral on the right side can be evaluated using integration by parts:
[tex]\int \log(x)dx = x\log(x) - \int dx = x\log(x)-x+C[/tex]
and this yields
[tex]\log(n!) \sim n\log(n)-n \sim n\log(n)[/tex]
Can you take it from there?
 
That wouldn't be rigorous, would it? In my proof, I kept the error terms and treated them rigorously.

EDIT: The point of the problem is to proof the asymptotic behavior of the function, so it would be self defeating to use its asymptotic form. Please correct me if I am wrong, though.
 
Last edited:
You can get the error bounds from post #2.
$$\log(n!) = \sum_{k=2}^n \log k$$
I changed the lower limit since ##\log 1 = 0##.

Because ##\log## is a monotonic function you can bracket the sum by two integrals
$$\int_2^n \log (x-1)\,dx < \sum_{k=2}^n \log k < \int_2^n \log x\,dx$$

Draw a picture of the integrals and the sum as a set of rectangles, if you can't see where that came from.
 
I see! That definitely looks like a valid proof, too. The book that I'm using mentioned bounding functions using integrals, but for some reason told me to use Sterling's formula to prove the theorem.
 

Similar threads

  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 4 ·
Replies
4
Views
1K
Replies
2
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 25 ·
Replies
25
Views
2K
  • · Replies 1 ·
Replies
1
Views
4K
Replies
29
Views
6K
  • · Replies 5 ·
Replies
5
Views
3K