1 00:00:00,820 --> 00:00:03,620 PROFESSOR: So now we start on a new unit called counting 2 00:00:03,620 --> 00:00:05,329 or combinatorics. 3 00:00:05,329 --> 00:00:06,620 And it's about counting things. 4 00:00:06,620 --> 00:00:08,911 Now one of the things that happens when you're counting 5 00:00:08,911 --> 00:00:13,090 is your typically adding up a bunch of numbers 6 00:00:13,090 --> 00:00:14,920 that you've counted along the way. 7 00:00:14,920 --> 00:00:17,736 And so you wind up needing to deal with sums a lot. 8 00:00:17,736 --> 00:00:20,110 And so let's start with those mathematical preliminaries. 9 00:00:20,110 --> 00:00:22,360 We're going to look at three kinds of sums, arithmetic 10 00:00:22,360 --> 00:00:24,730 sums, geometric sums, and harmonic sums. 11 00:00:24,730 --> 00:00:27,430 All of which come up very regularly. 12 00:00:27,430 --> 00:00:30,390 And they all have reasonably nice formulas 13 00:00:30,390 --> 00:00:33,330 that explain what they sum to. 14 00:00:33,330 --> 00:00:36,820 Let's begin with the simplest ones of arithmetic sums. 15 00:00:36,820 --> 00:00:38,910 So there's an example. 16 00:00:38,910 --> 00:00:42,200 This supposedly is the kind of problem 17 00:00:42,200 --> 00:00:45,530 that was assigned to children in the the 18th century 18 00:00:45,530 --> 00:00:47,610 to keep them busy in class. 19 00:00:47,610 --> 00:00:53,170 And the great mathematician Gauss, Carl Friedrich Gauss, 20 00:00:53,170 --> 00:00:56,180 whom you know for magnetism and from probability theory, 21 00:00:56,180 --> 00:01:00,530 but also in fact the inventor of congruence 22 00:01:00,530 --> 00:01:03,520 and the number theory that we've studied, 23 00:01:03,520 --> 00:01:05,710 showed his brilliance as a child prodigy. 24 00:01:05,710 --> 00:01:08,570 When he was nine-years old, supposedly, he 25 00:01:08,570 --> 00:01:12,640 noticed that in that short of numbers, that we just saw, 26 00:01:12,640 --> 00:01:14,840 there were 30 numbers, and each one 27 00:01:14,840 --> 00:01:16,900 was 13 greater than the previous one. 28 00:01:16,900 --> 00:01:18,499 The idea being that the tutor didn't 29 00:01:18,499 --> 00:01:20,790 want to go through the effort of summing everything up. 30 00:01:20,790 --> 00:01:22,880 He knew the trick to get the sum quickly, 31 00:01:22,880 --> 00:01:25,420 but he kept his students busy for hours 32 00:01:25,420 --> 00:01:27,220 doing that kind of problem. 33 00:01:27,220 --> 00:01:28,740 I don't know whether that this is a true story or not, 34 00:01:28,740 --> 00:01:29,656 but it's a good story. 35 00:01:29,656 --> 00:01:31,850 So let's go on with it. 36 00:01:31,850 --> 00:01:33,880 So in other words, what Gauss noticed 37 00:01:33,880 --> 00:01:38,010 was that the numbers on that page looked like 89 and 89 38 00:01:38,010 --> 00:01:44,170 plus 13 down through the 30th number 89 plus 29 times 13. 39 00:01:44,170 --> 00:01:49,300 And then he saw how to get the sum of a simple expression 40 00:01:49,300 --> 00:01:51,290 for the value of this sum. 41 00:01:51,290 --> 00:01:53,830 And the logic is that let's call the first term F 42 00:01:53,830 --> 00:01:58,050 and then the next term is F plus 2 d-- F plus d, where d is 13 43 00:01:58,050 --> 00:01:59,540 and F is 89. 44 00:01:59,540 --> 00:02:03,530 Next one would be F plus 2 d down to the end. 45 00:02:03,530 --> 00:02:05,910 And I'm going to call the last term L, 46 00:02:05,910 --> 00:02:09,169 which is 89 plus 29 times 13. 47 00:02:09,169 --> 00:02:14,430 And this would be L minus d or 89 plus 28 times 13. 48 00:02:14,430 --> 00:02:17,720 And let's call that sum A. We don't know what it is yet, 49 00:02:17,720 --> 00:02:20,070 but we're very quickly going to derive it. 50 00:02:20,070 --> 00:02:24,000 One of the standard tricks to find nice formulas for sums 51 00:02:24,000 --> 00:02:28,120 is to find a arithmetic relation between the sum 52 00:02:28,120 --> 00:02:30,140 and a slight perturbation of the sum. 53 00:02:30,140 --> 00:02:33,950 In this case, I'm just going to write the sum backwards. 54 00:02:33,950 --> 00:02:37,300 So it's the same sum A, but written 55 00:02:37,300 --> 00:02:40,310 where the first term is last and the last term is first. 56 00:02:40,310 --> 00:02:46,380 And now notice what happens when I add up these two sums. 57 00:02:46,380 --> 00:02:48,190 I get 2A of course. 58 00:02:48,190 --> 00:02:51,450 But every one of these terms-- this is a F plus L. This 59 00:02:51,450 --> 00:02:56,000 is a F plus d plus L minus D. It's F plus L. This last one is 60 00:02:56,000 --> 00:02:58,540 an F plus L. 61 00:02:58,540 --> 00:03:02,400 Every one of these pairwise subsums 62 00:03:02,400 --> 00:03:04,070 comes out to be F plus L. And now 63 00:03:04,070 --> 00:03:07,280 we have a formula for the whole series in my simple formula 64 00:03:07,280 --> 00:03:10,810 that A is equal to the sum of the first term 65 00:03:10,810 --> 00:03:16,160 plus the last term divided by 2 times the number of terms. 66 00:03:16,160 --> 00:03:19,216 By the way, the first term plus the last term divided by 2 67 00:03:19,216 --> 00:03:20,840 maybe is more memorable if you remember 68 00:03:20,840 --> 00:03:22,360 that it's the average term. 69 00:03:22,360 --> 00:03:25,240 It's the average size term times the number of terms. 70 00:03:25,240 --> 00:03:29,230 And that's how you sum up an arithmetic sum. 71 00:03:29,230 --> 00:03:32,870 So we can wrap up with a familiar example, namely 72 00:03:32,870 --> 00:03:34,840 the sum of the integers from 1 to n. 73 00:03:34,840 --> 00:03:37,270 This is an arithmetic series, starts with one. 74 00:03:37,270 --> 00:03:39,540 And the d, that is the difference 75 00:03:39,540 --> 00:03:45,110 from successive terms is simply 1, 1 plus 1, 1 plus 1 plus 1 76 00:03:45,110 --> 00:03:45,680 down to n. 77 00:03:45,680 --> 00:03:47,780 And according to our formula, it's 78 00:03:47,780 --> 00:03:52,160 the first plus the last over 2 times the number of terms. 79 00:03:52,160 --> 00:03:54,680 And we have that familiar formula 80 00:03:54,680 --> 00:03:57,830 for the sum of the first n integers.