AOCP/Harmonic Numbers: Difference between revisions
From charlesreid1
(Fix math syntax error: change > to \geq in the inequality (non-strict, since 1/(2^m+2^m) = 1/2^{m+1}) (via update-page on MediaWiki MCP Server)) |
|||
| Line 26: | Line 26: | ||
<math> | <math> | ||
H_{2^m} + \dfrac{1}{2^m+1} + \dfrac{1}{2^m + 2} + \dots + \dfrac{1}{2^{m+1}} | H_{2^m} + \dfrac{1}{2^m+1} + \dfrac{1}{2^m + 2} + \dots + \dfrac{1}{2^{m+1}} \geq H_{2^m} + \dfrac{1}{2^{m+1}} + \dfrac{1}{2^{m + 1}} + \dots + \dfrac{1}{2^{m+1}} | ||
</math> | </math> | ||
Latest revision as of 01:22, 6 June 2026
Volume 1
Chapter 1: Basic Concepts: Harmonic numbers
Harmonic numbers become important in analyses of algorithms. Define
$ H_n = 1 + \dfrac{1}{2} + \dfrac{1}{3} + \dfrac{1}{4} + \dots + \dfrac{1}{n} = \sum_{1 \leq k \leq n} \dfrac{1}{k} \qquad n \geq 0 $
While it does not occur often in classical mathematics, it crops up more often in algorithm analysis.
We can make $ H_n $ as large as we please from observing that
$ H_{2^m} \geq 1 + \dfrac{m}{2} $
This results from the fact that
$ H_{2^{m+1}} = H_{2^m} + \dfrac{1}{2^m+1} + \dfrac{1}{2^m + 2} + \dots + \dfrac{1}{2^{m+1}} $
Now we have,
$ H_{2^m} + \dfrac{1}{2^m+1} + \dfrac{1}{2^m + 2} + \dots + \dfrac{1}{2^{m+1}} \geq H_{2^m} + \dfrac{1}{2^{m+1}} + \dfrac{1}{2^{m + 1}} + \dots + \dfrac{1}{2^{m+1}} $
and the right side is
$ H_{2^m} + \frac{1}{2} $
therefore
$ H_{2^m} \geq 1 + \dfrac{m}{2} $
Flags
| The Art of Computer Programming notes from reading Donald Knuth's Art of Computer Programming
Part of the 2017 CS Study Plan.
Mathematical Foundations: AOCP/Infinite Series · AOCP/Binomial Coefficients · AOCP/Multinomial Coefficients AOCP/Harmonic Numbers · AOCP/Fibonacci Numbers Puzzles/Exercises:
Volume 2: Seminumerical Algorithms
Volume 3: Sorting and Searching AOCP/Combinatorics · AOCP/Multisets · Rubiks Cube/Permutations
AOCP/Combinatorial Algorithms · AOCP/Boolean Functions AOCP/Five Letter Words · Rubiks Cube/Tuples AOCP/Generating Permutations and Tuples
|