integral method
play

Integral Method n n th Harmonic number for Sums B n = H n /2 - PowerPoint PPT Presentation

Harmonic Sums Mathematics for Computer Science MIT 6.042J/18.062J H n ::=1+ 1 2 + 1 3 + + 1 Integral Method n n th Harmonic number for Sums B n = H n /2 Albert R Meyer, April 10, 2013 Albert R Meyer, April 10, 2013


  1. Harmonic Sums Mathematics for Computer Science MIT 6.042J/18.062J H n ::=1+ 1 2 + 1 3 + ⋯ + 1 Integral Method n n th Harmonic number for Sums B n = H n /2 Albert R Meyer, April 10, 2013 Albert R Meyer, April 10, 2013 integralsum.1 integralsum.2 Integral estimate for H n Integral estimate for H n 1 H n = area of rectangles > area under 1/(x+1) = 1 n n+1 1 1 x+1 1 ∫ ∫ = dx = ln(n +1) 2 dx 1 x +1 x 3 0 1 1 1 1 2 3 0 1 2 3 4 5 6 7 8 Albert R Meyer, April 10, 2013 Albert R Meyer, April 10, 2013 integralsum.3 integralsum.4 1

  2. Book stacking Book stacking for overhang 3, need B n ≥ 3 H n ≥ 6 log(n+1) →∞ as n →∞ , integral bound: ln(n+1) ≥ 6 so overhang can be so ok with n ≥   e 6 -1  = 403 books as big as desired! actually calculate H n : 227 books are enough. Albert R Meyer, April 10, 2013 Albert R Meyer, April 10, 2013 integralsum.7 integralsum.8 CD cases over the edge stack of 43 CD’s 43 cases high --top 4 cases completely off the table --1.8 or 1.9 case-lengths see 6.042 Spring02 demo page for credits Albert R Meyer, April 10, 2013 Albert R Meyer, April 10, 2013 integralsum.9 integralsum.10 2

  3. Upper bound for H n don’t sneeze 1 1 1 x 2 1 3 1 1 1 2 3 0 1 2 3 4 5 6 7 8 Albert R Meyer, April 10, 2013 Albert R Meyer, April 10, 2013 integralsum.11 int egralsum.12 Upper bound for H n Integral Sum Bounds f : ℝ + + → ℝ Let be a weakly  n 1  decreasing function.  ∫ H < dx  + 1 n S :: = ∑ I :: = ∫ f(x)dx n n  1 x  f(i), 1 i = 1 = 1 + ln(n) + f(n) ≤ S ≤ I + f(1) I Albert R Meyer, April 10, 2013 Albert R Meyer, April 10, 2013 integralsum.13 integralsum.14 3

  4. Asymptotic bound for H n Asymptotic Equivalence Def: f(n) ~ g(n) ln(n+1) < H n < 1+ ln(n)   f(n) lim =1 H n ∼ n →∞   ln(n) g(n)   Albert R Meyer, April 10, 2013 Albert R Meyer, April 10, 2013 integralsum.15 integralsum.16 Asymptotic Equivalence ~ Example: (n 2 + n) ~ n 2 pf: 2   n +n 1 = lim 1+ = 1 lim →∞   2   n n →∞ n n Albert R Meyer, April 10, 2013 integralsum.17 4

  5. MIT OpenCourseWare http://ocw.mit.edu 6.042J / 18.062J Mathematics for Computer Science Spring 20 15 For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.

Recommend


More recommend