 Welcome back to another screencast on induction. In this video, we're going to look at yet another variation of the theme of induction that works in certain cases where our current notion of induction doesn't work. Let's motivate this with an example. We're going to prove a basic fact in arithmetic that every integer greater than one can be factored into a product of prime numbers. By product, we mean that either the integer itself is a prime number, so it's like a product with just one term in it, or it's a bunch of primes multiplied together. So you might have thought this was an axiom of arithmetic. Something that we just accept without proof, but actually we can provide a proof for this that uses kind of a structural approach. We're going to use induction to prove this mainly because in this result, we can see that the problem can be solved using simpler, smaller versions of itself. To see this, think about how you would factor an integer like 144. You might first notice that 144 is even, so you could factor it into 2 times 72. Now what you would do is continue factoring the result. 2 splits into 2 times 36. 36 is 6 times 6. The 6 on the left is 2 times 3, and the 6 on the right is also 2 times 3. So we've reached a stopping point now where all the endpoints of this little tree structure here are primes. Then we can begin to build up the answer. So 144's factorization is 2 to the 4th times 3 to the 2nd. Because we're repeating the same operation of factoring off small numbers on repeatedly smaller versions of the problem, that makes us think that induction, which is a proof technique based on exactly that, working with simpler versions of a problem to prove a large version as well suited. In fact, this factoring method is what we call a recursive algorithm, a process that calls simpler versions of itself. And we're going to be looking into that into the next section. So let's try to set up a proof by induction here for our proposition. Induction involves identifying a predicate that's being claimed as true, and then identifying the range of natural numbers for which we think the predicate is true. In the principle of mathematical induction, the predicate is a function of n and it's claimed to be true for all natural numbers. In the extended principle of induction, which we learned about in an earlier video, we have a predicate that's claimed to be true for values of n that are greater than or equal to a certain threshold. So the first thing we need to do is identify the predicate. If you rewrite the proposition slightly, it becomes clear. Rewrite it to say for every natural number n greater than or equal to 2, n can be written as a product of prime numbers. That's the same thing as the original proposition, but the slightly rewritten. And it's easy to pick off the predicate here. P of n, which we'll call the predicate, is the statement n can be written as a product of prime numbers. And we're claiming here that P of n is true for all n greater than or equal to 2. So let's start a proof by induction. And we're going to see there's a bit of a problem in the inductive step. First, let's start the base case with n equals 2. Well, P of 2 is true because 2 itself is a prime number. And remember that we said a product, quote unquote, can mean just a single prime by itself. So the base case is established. Now onto the inductive step. We're going to assume that P of k is true for some k greater than or equal to 2, and then we want to prove that P of k plus 1 is true. That is, we're going to assume that the integer k can be written as a product of primes, and then we're going to try to prove that k plus 1 can be written as a product of primes. But here's where we run into a problem. Namely, it's not really easy to see how the inductive hypothesis can be used here. I know that if k can be factored into a bunch of primes, it may not help me to see that k plus 1 can be factored into primes. For example, suppose you knew what the prime factorization of the number 2000 was. Does this help you factor 2001? Not really. There's no natural relationship between the factorization of 2000 and the factorization of 2001. So we're not going to get a lot of traction out of our induction hypothesis here. So what we'll do instead is introduce another version of induction that can be helpful. The truth of p of k might not be helpful to prove p of k plus 1. But the fact that the predicate is true for some value of the variable would be. For example, knowing the prime factorization of 2000 doesn't help you much in finding the factorization of 2001. But knowing the factorization of 667 does, why is that? Well, 2001 is equal to 3 times 667. So you could just happen to know the factorization of 667. And you can go find that that's equal to 23 times 29. It wouldn't be hard at all to come up with the factorization of 2001, because you could just split off the 3 and then use 667's factorization to complete the whole thing. In other words, knowing p of k might not help you prove p of k plus 1. But knowing p of one or more values of the variable less than or equal to k might. So this is called the second principle of mathematical induction. And it goes like this. Suppose m is an integer and we're trying to prove that a predicate p and n is true for all n greater than or equal to m. This is the same setup as the extended principle of mathematical induction. Then the second principle says that we first prove p of m is true as a base case. Then we assume that p is true for all the integers between m, the base case, and some integer k. So again, we're assuming not only that p of k is true, but p is true for every integer between the base case and k. If you make that assumption and then go on to prove that p of k plus 1 is true, then p will be true for all integers n greater than or equal to m. So the main difference here, really the only difference between the second principle of induction and what we've learned already, is the inductive hypothesis. Here the inductive hypothesis is stronger. We're assuming the truth of the predicate, not only for just a single unspecified value of the variable, but for all values of the variable up to and including that unspecified value. Since the hypothesis is stronger, you'll sometimes see this referred to as strong induction. So in terms of our staircase metaphor, this is saying that if we can get on the staircase to begin with, and if we assume that we can step on every step from the bottom up to a certain point, then we can get to the next step. But maybe I don't need to step on the case step to get to the k plus first step. Maybe I have super jumping powers, and as long as I can get somewhere up the stairwell, I can leap from there all the way up to the k plus first step. And the jumping powers aren't so super that I can just jump onto the top without getting on the stairwell in the first place. There's still a base case to be considered. So let's put the second principle to work in our proposition. We're gonna see this as very short proof. We can keep the base case p of two because that doesn't change with the different flavors of induction we use. What is different is the inductive hypothesis. So let's pick the proof up following the base case. So let's assume that for some natural number k, every integer between two and k, including two and including k, can be factored into a product of primes. This is the strong inductive hypothesis we're making here. We wanna show that k plus one can be factored into a product of primes. We're gonna consider two cases here. Case one is if k plus one itself is a prime number, and case two is if k plus one isn't a prime number. That's a valid set of cases because every natural number is either prime or not, and no number is both. So in case one, if k plus one is prime, we're done because a single prime is just a one term product. And so k plus one can be, quote, factored into a product of primes. In case two, we're going to assume that k plus one is not prime. It's what we call a composite. It's a factor, it's a multiple of two integers. We can factor k plus one in this case. We don't necessarily know that we can factored into primes, but we can factored into say k plus one equals a times b or a and b are natural numbers. Now in this case, a and b can be chosen less than k plus one because k plus one is in prime itself. And so here's where the inductive hypothesis comes in. Because a and b are natural numbers, the inductive hypothesis says that each one of them can be factored into a product of primes. Let's say that a is factored into the product p1 times p2 times p3 and so on up to p sub x, let's say, and all those p's are prime numbers. And similarly, b can be factored into a bunch of primes. Let's say q1, q2, and so forth up to q sub y. So how do we get k plus one's factorization? Well, just simply by substitution. Just multiply those two strings of primes together. And we're gonna get k plus one, which is equal to a times b, is actually equal to all the p's multiplied together times all the q's multiplied together. And then we're done. We have written k plus one as a product of prime numbers. So just like with the example of 2001, if we knew the factorization of 667, then we can get the factorization of 2001 just by importing that factorization. I can take k plus one, and if I can split it at all, I can use the two factors, factorizations, to get the factorization of k plus one. And that finishes the proof. So that's the second principle of induction, or again, sometimes called strong induction, which allows us to use induction in cases where there's no natural connection between the k case and the k plus one case. Thanks for watching.