1 00:00:00,499 --> 00:00:02,780 PROFESSOR: So we figured out that you 2 00:00:02,780 --> 00:00:06,620 can get the book stack, the overhang of the books, 3 00:00:06,620 --> 00:00:08,940 to be half the harmonic sum. 4 00:00:08,940 --> 00:00:11,400 With n books, you can get out Hn over 2 5 00:00:11,400 --> 00:00:16,309 where Hn is this harmonic sum, or harmonic number. 6 00:00:16,309 --> 00:00:19,910 The question is, how are we going to estimate or calculate 7 00:00:19,910 --> 00:00:21,210 what this sum is? 8 00:00:21,210 --> 00:00:24,270 Now it turns out there is no simple formula for exactly 9 00:00:24,270 --> 00:00:26,610 what this sum is, but there is a simple formula that 10 00:00:26,610 --> 00:00:28,560 estimates it quite accurately. 11 00:00:28,560 --> 00:00:34,290 And we get the estimation by bounding the sum by integrals. 12 00:00:34,290 --> 00:00:37,210 And so let's look at this integral method for estimating 13 00:00:37,210 --> 00:00:38,780 sums. 14 00:00:38,780 --> 00:00:41,670 Remember what I wanted was the sum of 1 plus 1/2 15 00:00:41,670 --> 00:00:43,690 plus 1/3 down to 1 over n. 16 00:00:43,690 --> 00:00:48,170 So let's form some unit width rectangles of heights 17 00:00:48,170 --> 00:00:49,800 equal to the amount that I want. 18 00:00:49,800 --> 00:00:52,840 So here's a rectangle of height 1, rectangle of height 1/2, 19 00:00:52,840 --> 00:00:54,130 rectangle of height 1/3. 20 00:00:54,130 --> 00:00:56,230 I'm going out here, if you actually count to 8, 21 00:00:56,230 --> 00:01:00,110 but let's propose that this is a height 1 over n. 22 00:01:00,110 --> 00:01:06,100 And what I know is that the total area of these rectangles 23 00:01:06,100 --> 00:01:08,410 is actually equal to the number that I want. 24 00:01:08,410 --> 00:01:10,170 The total area of these rectangles 25 00:01:10,170 --> 00:01:11,780 is the harmonic number. 26 00:01:11,780 --> 00:01:15,970 And I'm interested in a lower bound for Hn, because I want 27 00:01:15,970 --> 00:01:19,396 to know how far I can get out. 28 00:01:19,396 --> 00:01:20,520 I want a tight lower bound. 29 00:01:20,520 --> 00:01:23,290 It says Hn is larger than a certain amount. 30 00:01:23,290 --> 00:01:27,410 That's the amount that I'm sure that I can stack out in books. 31 00:01:27,410 --> 00:01:30,520 So the way I'm going to get a lower bound on this number Hn 32 00:01:30,520 --> 00:01:32,310 is by looking at this curve that goes 33 00:01:32,310 --> 00:01:34,530 through the corners of the rectangles. 34 00:01:34,530 --> 00:01:38,190 And if you check it, that curve is 1 over x plus 1. 35 00:01:38,190 --> 00:01:48,360 That is, the point here is-- when x is 0, I'm at 1 over 1. 36 00:01:48,360 --> 00:01:52,540 When x is 1, I'm at 1/2, the height of the second rectangle, 37 00:01:52,540 --> 00:01:53,630 and so on. 38 00:01:53,630 --> 00:01:56,440 So 1 over x plus 1 is a curve that 39 00:01:56,440 --> 00:02:01,090 is strictly below the boundaries of all these rectangles. 40 00:02:01,090 --> 00:02:06,880 That means that the area under 1 over x plus 1 going from 0 to n 41 00:02:06,880 --> 00:02:11,060 is a lower bound on Hn, because it's a lower bound 42 00:02:11,060 --> 00:02:13,140 on the area of the rectangles. 43 00:02:13,140 --> 00:02:15,730 So Hn equals the area of the rectangles. 44 00:02:15,730 --> 00:02:18,560 It's greater than the area of 1 over x plus 1, 45 00:02:18,560 --> 00:02:20,950 which of course is equal to the integral from 0 46 00:02:20,950 --> 00:02:25,670 to n of 1 over x plus 1, which shifting variables is 47 00:02:25,670 --> 00:02:28,660 the same as the integral from 1 to n plus 1 of 1 over x 48 00:02:28,660 --> 00:02:34,180 dx, which of course we know is a natural logarithm of n plus 1. 49 00:02:34,180 --> 00:02:36,030 So there we have it. 50 00:02:36,030 --> 00:02:39,650 The overhang that you need for three books, which 51 00:02:39,650 --> 00:02:42,790 is Bn greater than or equal to 3, 52 00:02:42,790 --> 00:02:45,810 means that Hn has to be greater than or equal to 6. 53 00:02:45,810 --> 00:02:48,700 So by this estimate, I need log of n 54 00:02:48,700 --> 00:02:50,740 plus 1 greater than or equal to 6 55 00:02:50,740 --> 00:02:55,040 in order to get three books out, that the back end 56 00:02:55,040 --> 00:02:58,320 of the top book is two books past the edge of the table 57 00:02:58,320 --> 00:03:02,040 and the right end of the furthest out book 58 00:03:02,040 --> 00:03:05,200 is three book lengths past the edge of the table. 59 00:03:05,200 --> 00:03:08,900 So my bound tells me that I need n books such 60 00:03:08,900 --> 00:03:11,290 that log of n plus 1 is greater than or equal to 6. 61 00:03:11,290 --> 00:03:13,590 Well, exponentiating both sides, the right-hand side 62 00:03:13,590 --> 00:03:14,870 becomes e to the 6th. 63 00:03:14,870 --> 00:03:17,260 And I figure out that as long as n 64 00:03:17,260 --> 00:03:20,625 is greater than or equal to e to the 6th minus 1 books-- rounded 65 00:03:20,625 --> 00:03:23,560 up, of course, because there's only-- you can't have fractions 66 00:03:23,560 --> 00:03:27,770 of a book-- you get an estimate that with 403 books, 67 00:03:27,770 --> 00:03:32,260 I can actually get my stack to stick out three book lengths 68 00:03:32,260 --> 00:03:34,370 past the edge of the table. 69 00:03:34,370 --> 00:03:36,100 Well if you do the actual calculation 70 00:03:36,100 --> 00:03:37,641 instead of the estimate, it turns out 71 00:03:37,641 --> 00:03:40,740 that 227 books are enough. 72 00:03:40,740 --> 00:03:42,240 So this estimate's a little off. 73 00:03:42,240 --> 00:03:44,290 But for our purposes, it tells us 74 00:03:44,290 --> 00:03:48,760 a dramatic fact, which is that we know that log of n plus 1 75 00:03:48,760 --> 00:03:51,960 approaches infinity as n approaches infinity. 76 00:03:51,960 --> 00:03:53,960 And that means that, with enough books, 77 00:03:53,960 --> 00:03:56,670 I can get out as far as I want. 78 00:03:56,670 --> 00:03:59,570 You tell me how many book lengths you want to be out, 79 00:03:59,570 --> 00:04:03,120 I'll use the log n formula to calculate how many books I 80 00:04:03,120 --> 00:04:06,410 need to get that far out. 81 00:04:06,410 --> 00:04:10,460 So here's an example of some students in the class 82 00:04:10,460 --> 00:04:13,269 some years ago decided to do this as an experiment. 83 00:04:13,269 --> 00:04:14,810 Now when we used to do this in class, 84 00:04:14,810 --> 00:04:16,976 we first tried to do it with the big, heavy textbook 85 00:04:16,976 --> 00:04:17,634 that we used. 86 00:04:17,634 --> 00:04:19,800 And we kept trying to get them to balance and go out 87 00:04:19,800 --> 00:04:20,980 over the edge of the table, and they 88 00:04:20,980 --> 00:04:23,370 failed, because it turns out that textbooks are heavy 89 00:04:23,370 --> 00:04:24,770 and they compress. 90 00:04:24,770 --> 00:04:28,110 They're not the rigid rectangular cross sections 91 00:04:28,110 --> 00:04:29,600 that our model was based on. 92 00:04:29,600 --> 00:04:32,360 But CD cases work very well. 93 00:04:32,360 --> 00:04:33,760 They are more rigid. 94 00:04:33,760 --> 00:04:36,320 They don't compress easily, and they're very lightweight 95 00:04:36,320 --> 00:04:38,790 so that they don't cause problems 96 00:04:38,790 --> 00:04:41,910 with distortions because of the size of the stack. 97 00:04:41,910 --> 00:04:45,500 And so you can actually get CD cases to stick out pretty far. 98 00:04:45,500 --> 00:04:49,380 This is an example where it's 43 CD cases high, 99 00:04:49,380 --> 00:04:53,210 and the top four cases are completely 100 00:04:53,210 --> 00:04:55,090 past the edge of the table. 101 00:04:55,090 --> 00:05:01,510 The leftmost edge is about 1.81 or 1.91 case lengths 102 00:05:01,510 --> 00:05:05,260 past the table. 103 00:05:05,260 --> 00:05:09,470 There's another view of it from the guy who made the stack. 104 00:05:09,470 --> 00:05:13,270 And of course, they were right on the edge of stability 105 00:05:13,270 --> 00:05:16,910 in trying to get the CDs to stick out as far as possible. 106 00:05:16,910 --> 00:05:19,410 So if you notice these little spaces there, 107 00:05:19,410 --> 00:05:21,730 in terms of the balancing, it's really just 108 00:05:21,730 --> 00:05:23,110 on the brink of falling over. 109 00:05:23,110 --> 00:05:24,530 If you sneeze at it, it'll tip. 110 00:05:24,530 --> 00:05:27,160 But if you don't sneeze at it, it's stable, 111 00:05:27,160 --> 00:05:30,140 and you get the top CD out that far. 112 00:05:30,140 --> 00:05:32,830 So while we're at it, let's get an upper bound for Hn. 113 00:05:32,830 --> 00:05:35,270 We just got a lower bound of Hn, but the same kind 114 00:05:35,270 --> 00:05:37,890 of logic of using an integral will give you 115 00:05:37,890 --> 00:05:39,420 an upper bound for Hn. 116 00:05:39,420 --> 00:05:43,900 What I do now is I run a curve from the upper right 117 00:05:43,900 --> 00:05:45,650 corners of the rectangles. 118 00:05:45,650 --> 00:05:48,250 And that curve is simply 1 over x. 119 00:05:48,250 --> 00:05:51,950 So an upper bound for the harmonic number 120 00:05:51,950 --> 00:05:58,620 Hn is the area under 1 over x out to n plus this 1. 121 00:05:58,620 --> 00:06:02,510 And so I get an upper bound that says that the harmonic number 122 00:06:02,510 --> 00:06:04,680 Hn is less than the integral from 1 123 00:06:04,680 --> 00:06:10,580 to n of 1 over x dx plus 1, or it's equal to 1 plus log of n. 124 00:06:10,580 --> 00:06:12,860 So combining those two bounds that I 125 00:06:12,860 --> 00:06:16,150 got by looking at a curve that's a lower bound on the area 126 00:06:16,150 --> 00:06:18,390 and a curve that's an upper bound on the area 127 00:06:18,390 --> 00:06:21,400 and integrating, I discover that Hn is bracketed 128 00:06:21,400 --> 00:06:24,180 between the natural log of n plus 1 and 1 129 00:06:24,180 --> 00:06:26,670 plus the natural log of n. 130 00:06:26,670 --> 00:06:30,830 Now these two numbers, log of n plus 1 and 1 plus log of n, 131 00:06:30,830 --> 00:06:35,880 are very close, and they get closer and closer as n grows. 132 00:06:35,880 --> 00:06:38,580 So it turns out that what we can say pretty accurately 133 00:06:38,580 --> 00:06:42,160 is that Hn is asymptotically equal to log n. 134 00:06:42,160 --> 00:06:44,300 It's approximately equal to log n. 135 00:06:44,300 --> 00:06:47,040 And the precise definition of this tilde symbol 136 00:06:47,040 --> 00:06:51,470 that I've highlighted in magenta is called asymptotically equal. 137 00:06:51,470 --> 00:06:54,030 And the general definition of asymptotically equal, 138 00:06:54,030 --> 00:06:57,360 that Hn is asymptotically equal to log n, 139 00:06:57,360 --> 00:07:01,610 is that a function f of n is asymptotically 140 00:07:01,610 --> 00:07:04,940 equal to a function g of n when the limit of their quotient 141 00:07:04,940 --> 00:07:06,040 goes to 1. 142 00:07:06,040 --> 00:07:11,470 That is to say, as a multiplicative factor, 143 00:07:11,470 --> 00:07:15,480 each is within a constant one of the other in the limit. 144 00:07:15,480 --> 00:07:19,980 1 plus epsilon of-- 1 plus or minus epsilon of gn 145 00:07:19,980 --> 00:07:23,840 is going to bracket fn, and vice versa. 146 00:07:23,840 --> 00:07:28,350 Asymptotic equivalents, or asymptotic equality. 147 00:07:28,350 --> 00:07:29,360 Let's do an example. 148 00:07:29,360 --> 00:07:31,660 So the remark would be, for example, 149 00:07:31,660 --> 00:07:33,700 that n squared plus n is asymptotically 150 00:07:33,700 --> 00:07:35,120 equal to n squared. 151 00:07:35,120 --> 00:07:35,620 Why? 152 00:07:35,620 --> 00:07:40,200 Well let's look at the limit as n approaches infinity of n 153 00:07:40,200 --> 00:07:41,920 squared plus n over n squared. 154 00:07:41,920 --> 00:07:44,310 It's the same as simplifying algebraically 155 00:07:44,310 --> 00:07:46,730 the limit of 1 over 1 plus n. 156 00:07:46,730 --> 00:07:49,800 As n approaches infinity, that term goes to zero. 157 00:07:49,800 --> 00:07:53,550 Sure enough, the limit is 1, and so these two terms 158 00:07:53,550 --> 00:07:55,180 are asymptotically equal. 159 00:07:55,180 --> 00:07:58,100 The idea of asymptotically equal is that all we care about 160 00:07:58,100 --> 00:07:59,630 is the high order term. 161 00:07:59,630 --> 00:08:01,960 The low order terms will disappear, 162 00:08:01,960 --> 00:08:04,350 and we're looking at the principal term that 163 00:08:04,350 --> 00:08:08,310 controls the growth rate of the functions when we look at them 164 00:08:08,310 --> 00:08:11,250 up to asymptotic equivalence. 165 00:08:11,250 --> 00:08:14,440 So let's step back for just a moment 166 00:08:14,440 --> 00:08:15,910 and generalize what we've done here 167 00:08:15,910 --> 00:08:18,310 with estimating the harmonic sum. 168 00:08:18,310 --> 00:08:21,660 There's a general method called the integral method where, 169 00:08:21,660 --> 00:08:23,170 in this particular case, suppose we 170 00:08:23,170 --> 00:08:26,720 have a function f, the positive real valued function 171 00:08:26,720 --> 00:08:29,970 that's weakly decreasing, like 1 over x. 172 00:08:29,970 --> 00:08:36,429 Then let's let S be the sum from i equals 1 to n of f of i. 173 00:08:36,429 --> 00:08:40,700 So I was interested where f of x was 1 over x, 174 00:08:40,700 --> 00:08:44,150 and I wanted the sum from 1 over-- 1 to n of 1 175 00:08:44,150 --> 00:08:47,940 over i, which was the nth harmonic number. 176 00:08:47,940 --> 00:08:51,500 And I was comparing that to the integral from 1 to n 177 00:08:51,500 --> 00:08:55,290 of f of x, or 1 over x in our example. 178 00:08:55,290 --> 00:08:59,280 So if I is the integral and S is the sum that I want, 179 00:08:59,280 --> 00:09:02,320 what we can conclude really is that, in general, the sum 180 00:09:02,320 --> 00:09:07,020 is bracketed between the integral plus the first term 181 00:09:07,020 --> 00:09:11,960 of f of 1 in the sum, and the integral plus 182 00:09:11,960 --> 00:09:13,350 the last term of the sum. 183 00:09:13,350 --> 00:09:16,350 Remember, f is weakly decreasing, so f of n 184 00:09:16,350 --> 00:09:18,230 is smaller than f of 1. 185 00:09:18,230 --> 00:09:20,680 There's a similar theorem actually, just reverse f of 1 186 00:09:20,680 --> 00:09:23,460 and f of n, to use an integral estimate 187 00:09:23,460 --> 00:09:26,690 to get a bound on a weakly increasing function. 188 00:09:26,690 --> 00:09:30,960 And that gives us a general tool for estimating 189 00:09:30,960 --> 00:09:33,370 the growth rate of sums.