0

In the book Introduction to Algorithms (3rd edition) I found this equation in a probability topic:

enter image description here

However, when I sum 1/1 + 1/2 + 1/3 + 1/4 + 1/5 it doesn't give me the same result as ln(5)

Gary
  • 31,845
GabrielBB
  • 101
  • 3
    As you can see, there is an error term of order $1$ there as well. See my answer here: https://math.stackexchange.com/q/3551025 You can also Google for Euler-Mascheroni constant, or maybe look at equation (A.7) in the book you are citing. – Gary May 18 '21 at 10:20
  • 5
    You are ignoring the $O(1)$ term, which represents the error. The sum is a Riemann Sum for $\int_1^x\frac {dt}t=\ln(x)$. – lulu May 18 '21 at 10:21
  • 1
    This may help: https://math.stackexchange.com/a/3960344/752069 – VIVID May 18 '21 at 10:30
  • 1
    See also here. – J.G. May 18 '21 at 11:39

0 Answers0