 which will be comprehensive. So one test on this exam will come from the second test, okay? Solutions are online. You guys really should have any real great excuse for missing it, okay? So look back over that stuff. And of course this stuff with the GCD, which was covered on the last test. These ideas are still kind of fundamental to what we're doing with congruences and such. So I think it's going to help you build intuition even for this stuff to look back over that. So one question will be coming directly from the second exam. The other thing I will tell you is that and the problems will be written so that you don't need one. Don't worry. No calculator on this test. No calculator. I don't want you computing 8,000 digit numbers and such trying to solve these congruences the old fashioned 13-year-old way. I don't want that, okay? I want you to be able to do it. You've seen, I haven't used a calculator in these and you should be able to do all these without a calculator. Really, you should be able to. Well, that's almost worse. But that too. Yeah, true. Yes, yes. I see your point. Yeah, you're right. So just keep that in mind. You really need to get these techniques down. You need to get them down, okay? Don't think you're going to cheat by typing in these big numbers on a calculator. I'm not going to let you cheat. That's essentially cheating in some sense. You're missing the spirit of these sections when you do that, okay? So we're going to do more problems. In fact, I'm spending, as you know, I mean, some of you maybe are even getting sick of this, but I'm spending tons of time on this stuff now. And I'm going to talk about even more problems today. So this probably more so than any other exam. I mean, I will have really done a lot of stuff for you to help you with this, okay? So it's just up to you to practice and get these things down. You really just need to practice it. But after today, you really should be in very good shape for completing the majority of the homework problems. And then anything left that you want to ask about, of course, we can clear that up on Tuesday. But we'll definitely be done with this section today. And then Tuesday will be reviewed just like normal. And then we'll, you know, have the exam next Thursday. So last thing I want to say, and I do apologize for this. This is really my fault, but I didn't quite finish up the grading of the homework. I thought I was going to get it done, but I didn't. And this one took a long time to grade. A lot of just numbers are getting big with the congruences and stuff. It takes a while. So I will try to have solutions posted though before Tuesday. You definitely get the homework back on Tuesday for sure. So you'll have it for the exam. And I'll send out an email to everyone when I have the solutions posted. So if you want to get a head start, I'm looking over some of these for the studying for the exam. I'll try to have that done over the weekend or maybe tomorrow. Okay. All right. Any questions about the test? Just generally speaking. We'll talk more on Tuesday. Okay. Well, why don't we go ahead and get started? So some of you, I already had a couple of people ask about this. And I know probably still maybe the majority of you haven't really started the homework seriously because you still have a week before it's due. But I would suggest you start before Wednesday. I really would strongly encourage you to do that. So this is going to, again, just be a continuation of course of 4.4. The last thing we're going to talk about is congruences in two variables. And don't worry, we're going to spend some time on the Chinese remainder theorem. We'll talk about a couple of problems. So not a lot of new stuff. Those of you that have started on the homework, number three, if those of you that looked at it, I'm guessing maybe a lot of you would have no idea where the solution comes from and have no idea what to do with this one. It's actually easy, but you won't know that because the book hasn't told you how to do these kind of problems. But I will tell you today. So it's not actually that bad. Okay. So here's what we're going to do is we're going to, the last thing I'm going to talk about is, and I'm not going to spend a lot of time on this really, we're going to look at congruences of the following form. AX plus BY now instead of just X, we have an X and a Y, congruent to C, mod N. Okay. And we're really only going to be interested in kind of a special case of this. I will just tell you in general that it's kind of similar to what happens with the one variable congruence. So this has a solution only if, i.e., if and only if. So if you remember in that one variable case, if you forget about the BY term, this has a solution if and only if the GCD of A and N divides, of course the C was a B, but A and N divides C. The C in this case is the one sitting on the right-hand side of the congruence. If and only if the GCD of A, B, and N divides C. Okay. Of course, you might say, well, what is this? We haven't talked about the GCD of three numbers. We only talked about the GCD of two numbers, but you can talk about, I mean, it's the same idea, right? It's the largest positive integer that divides all three of them at the same time. Okay. And in fact, this isn't even really going to come up very much. In what we're going to be doing. So what is relevant is this lemma and the book just sort of states this and it really is just a special case of what we've already done, but I'm going to pay a little bit more attention and emphasize this a little bit more. Okay. So let's just consider this congruence, AX plus BY congruent to C mod N. Okay. So there are two things that are relevant. This is actually going to be useful in doing number three in your homework, which I'm not going to do for you, but I'm going to do the problem. The book gave you a problem like number three, and they just sort of said, here's one specific or two specific solutions, but they never told you how to solve it in general. I'm going to solve that in general. And then that idea, you just do the same thing with number three. Okay. So the first thing is that if the GCD of ANN equals one, then the congruence has a unique solution. It is a little more complicated in this case though. So let me just be clear here in X for every value of Y. Okay. And the second part is that if the GCD of B and N is the same kind of idea here, if the GCD of B and N is equal to one, then the congruence has a unique solution in Y for every value of X. So here's what I'm going to do. Part B is the same. And this is very, very short. It just uses what we already know. We'll talk about part A. Yes. Maybe just the wording, but I'm not quite clear what you mean by solution in X and in Y. So okay, replace in with four. Okay. So what I mean is plug in any number you want in for Y, then there is a unique solution for X corresponding to that value of Y, modulo N, modulo N. So for example, if I plug in 10 for Y, then this congruence here has exactly one solution for X mod N. And that's true for any value of Y I plug in. So if I plug in 50 for Y, there's a unique solution for X. Plug in 1000 for Y, unique solution for X. Okay. So let's suppose that the GCD of A and N is equal to one. And so we're just going to let Y be arbitrary. Okay. So I'm going to be, again, a little bit informal here, because I want to spend the time on problems. So here's the way to think about it. Okay. And those of you that took Calc, maybe Calc 2 or Calc 3, where you had double and triple integrals or partial derivatives, right? Partial derivative of, with respect to X, you treat Y as a constant, right? You'd imagine Y is like 6, and then you just differentiate with respect to X unless you probably remember this. It's the same kind of idea. Just imagine that Y is just some number that you don't know. It makes it easier. Imagine Y is 10 right now and everything I'm about to say. Okay. Just imagine it is a fixed number. So what we're going to do is just note that AX plus BY congruent to C mod N. Okay. Forgive the notation here and not writing this out, but I just want to squeeze this in. If and only if. We can add and subtract from both sides and it preserves the congruence. There's no problem with that. If and only if AX is congruent to C minus BY mod N. Okay. Now, here's what I want you to think about, and this should make sense if you follow what we've done before. Again, imagine that, of course, A, B and C are just constants given to you in the beginning of the problem. These are numbers, okay? And imagine that Y is also just another number you don't know. Well, then this is just a number, right? So this is just like now we're in the realm of what we've already been talking about now, right? 5X is congruent to 20 mod 30, right? We've done things like this before. So if you think of it this way now, now we're in the realm of things that we've already studied. Okay? So now how would we solve this? And again, what I want you to do in your mind is imagine, this is a number, this is a number. All right? So what does it we do first? We check the GCD of A and N and see if it divides B. My B is this entire thing right now, right? You guys remember what we did before? It's the same question now. It's just we do the same thing we did before. Well, the GCD of, and it's as simple, the GCD of A and N is assumed to be one, right? And so of course it divides, right? That's what we always check, right? We check the GCD, we ask ourselves, does it divide B? This is B now. And it does because it's one. One divides everything. How many solutions are there? The number of solutions is equal to the GCD, which is one. So there's a unique solution. That's it. That's all there is to it. It's nothing deeper than what we've already done. In whatever word makes more sense to you, 4x, right? Modulo N. That's all I'm going to say. B is the same. It's the same thing. It's just now you've got B and so you're just going to subtract the AX over to the other side and then it's the same argument. It's exactly the same argument. And this is the only case that the book really focuses on. And so this is, for the sake of time, the only thing I'm really going to worry about too is just the class of congruences for which one of these two conditions holds. And when one of these two conditions holds, as you'll see in a second, it is really just a problem like we've done before. It just looks harder, but it's not really. It really is just the same thing. OK. Are we OK with this? OK. So like I said, I'm not going to do number three. Number three involves congruences like this. I'm going to do the problem that the book talks about, although they don't actually tell you how to solve it, which is kind of weird. I don't know why they did that. They give you this problem and they could have easily just solved the whole thing, but they didn't. I don't know why he did that, but anyways. So let me do an example. And I really want, again, of course, I want to encourage you to pay attention to this because problem three is you're going to do the same thing. And by the way, the book's solution to problem three is one way of expressing the solution is not the only way to express the solution. And maybe in linear algebra, maybe you remember that there's actually often multiple ways to express the same solution. So I'm going to give, so if you do it the number three, the way I'm going to do this example, you were going to get something different than what the book says, but it's the same, it's equivalent. It's the same solution, really. Okay, so let's see. I hope I brought, okay, yeah. So let's do this. Let's do this problem. Solve the congruence 7x plus 4y congruent to 5 mod 12. So here's what you're going to do. Now the same rules apply here in the sense that we're only interested in solutions that are modulo 12. We don't care about finding all possible integers that satisfy this. We were interested in that with the diophantine equation that I did for you on Tuesday. We actually wanted to find all of them. That's where that parameter t came into play. But here we don't care about that, okay? So we really only care about finding solutions that are between 0 and 11, for example, okay? So here's what you're going to do. So first, again, this is just one way of going about it. Note that 7x plus 4y is congruent to 5 mod 12. Again, this is kind of like what we did in the proof of the lemma, if and only if. 7x is congruent to 5 minus 4y mod 12. Now, this satisfies the first condition of the previous lemma, right? So the GCD, so my A in this case is 7, my N is 12 relative to the notation in the last lemma that I just gave you. The GCD of 7 and 12 is 1. They're relatively prime, right? So since the GCD of 7 and 12 equals 1, this congruence has a unique solution in x for each integer y, okay? That's just from the last lemma, right? And so here's the way I'm going to present the solution. What you're going to do is just kind of what I alluded to in the proof of the last lemma. It's just you're just going to let y be arbitrary and you're just going to imagine it some number you don't know. Imagine it's a constant. Don't imagine it's a variable. Imagine it is a constant. And then solve it, this congruence, just like we did on Tuesday. That's all you're doing here. That's it, okay? So I'm just going to write it this way, okay? So let's just let y and z be arbitrary. For now, we don't really care what it is for now. You might say, oh, wasn't it just between 0 and 11? Well, yes, we're going to get to that later. But for now, it's just going to be an integer and we'll figure out how to solve this. Okay, so, and now the technique is nothing more than what we've already done. So 7x congruent to 5 minus 4y mod 12. So what is it that we want to try to do? Well, what we want to do if possible is, and in fact, you can always do this. You can all, I'm going to be very clear on this. If this number is relatively prime to this number, you can always find something to multiply both sides by so that this coefficient becomes 1, always. Okay? You might want to write that down. If they're relatively prime, you don't have to. But, you know, this and this are relatively prime. You can always multiply by something to get 1. Modulo, the modulus, of course, is what I mean. I don't mean 1 seventh, of course. I mean an integer so that modulo, you get 1. Okay, so let's just, and I'm going to do this longer. This is going to be a little longer than necessary. But let's just kind of think about this. Okay, well, 1, okay, so 7 can't be reduced to any more mod 12. Of course, you can write it as minus 5, but that's not 1. So let's see where we can go with this. Well, if you multiply both sides by 2, you get 14. Well, that's 2 mod 12, so that's not quite what we want, right? If you multiply by 3, you get 21. Okay, still, even if you use negatives, you're not going to really be able to get a 1 that way. If you multiply by 4, same thing, 24. You're going to get 28. That's 4 mod 12 or minus 8 mod 12. Still, we're not getting 1. What about 5? Okay, 35 is minus 1 mod 12, right? Because 12, 24, 36, subtract 1 down to get to 35. And that's really all we care about. Because once we've got the minus 1, just multiply both sides by minus 1, we can shift the negative on the other side. Then we're done. It's easy. It's really not that hard. It isn't. Okay? And we're not done right away, but we've got to do a couple of things. Yeah? I understand what you're trying to say, but it's easy. But some of us are not exactly fast and basically correct what's in it. Well... And you've been testing all of those. What if it wasn't 5, but it turned out to be 11 and we started with 0? That's too bad. But I mean... Wow. Yeah. I mean, it's... Okay, this sounds a little bit cold, but I mean, it's sort of like, you know, well, it kind of sucks because there are lots of diseases out there and you have to suffer, but you just do. I mean, that's just the way it goes. So, you know, I mean... But no, really though, I mean, this really should still... Even finding the appropriate number really shouldn't take more than 5 minutes. Really, those are these problems. But he's saying in general, if the numbers are bigger, you know... Yeah, but really, all the ones that we've done so far, you know, and I'm going to do some more, you really can... That really isn't happening, really. And I'm going to talk about a couple more problems even. This... I know I understand your concern, but I don't think that really that's going to happen in this homework. Okay? Okay, so do you ever see what I did? I just multiplied through by 5? Right? Okay, now, I want to be... Let me be very clear here, though. There's something I want to say. In general, notice this is an if and only if. So in general, only one implication holds. If you have a congruent to b mod n, then ac's congruent to bc mod n. If ac's congruent to bc mod n, remember, you can't always cancel the c, but you can if it's relatively prime to the modulus. I multiplied by 5 here. I can go back the other way because 5 and 12 are relatively prime. That is an important thing to notice, though. It's not always if and only if I multiply. No. Multiplying... You can always multiply to go this way. You can cancel to go backwards only if what you're canceling is relatively prime to n. You guys clear on this? This is a subtle point, but it's important. That's why I can say if and only if because it's relatively prime. Okay? So what's 30... Yes, Carrie? What's the 35? No. I'm getting to it. 35 is minus 1. I'm just writing all the steps down. No, 35 is minus 1. Oh, yes. That's right. Yes. That is definitely a typo. Sorry. Okay. Oh, great. Now I'm going to... There we go. How's that? Okay. Okay. Yes. Thank you. Okay. So this is... 35 is the same thing as minus 1, mod 12. Right? Because again... So if anyone's not sure about this, about where I'm getting the minus 1, if you're... You can go two different ways, right? So 35 is... has a remainder of 11, mod 12. 35 is also 11, mod 12. But 11 and minus 1 are the same thing. And the way to think about this is... I mean, there's... Yeah. I mean, you can think of it a couple of different ways. But if you have to go up to get to a multiple, then that becomes negative. Right? So you have to go up by 1 to get to 36. It's negative. Okay? So that's one way. But again, if you're not sure, just think about 35 is minus 1, mod 12. Just think about the definition. What does it mean? 35 minus minus 1 is divisible by 12, which it is, 36. Okay? So this is minus 1 congruent to 5 times 5 minus 4y, mod 12. Okay? Well, we can multiply through by minus 1 on both sides. Yes. Sorry. Yep. I keep doing this. What is wrong with me? Okay. Sorry. I just want on both sides to get x congruent to minus 5 times 5 minus 4y, right? Mod 12. Almost done. Okay. So, now the question is, what is minus 25 mod 12? Okay. Here's the way you want to think about it. Okay? I could explain this a lot better if you had abstract algebra. But really, what you're doing is this. The negative of 25 is, think about just regular numbers. What's the negative of a number? It's the number you have to add to get 0. Okay? It's the number you have to add to get 0. So how do I get 0? What do I have to add to 25 to get 0 mod 12? I have to add 11, right? Add 11 to 25 because you get 36, which is 0 mod 12 because 12 divides into it. So minus 25 is 11 mod 12. Okay? So, this is 11 plus and 20 is positive. So what's 20 mod 12? Okay. I hope you guys are, if you don't know what that is, right away you're in trouble. You need to start on the homework tonight. Okay? Eight. Thank you. Okay. Now we're done. That's it. I mean, I have to write the solution out. But that's the work. That's it. That's all you have to do. Mm-hmm. 20. Mm-hmm. Minus 12 is 3 and 8. Mm-hmm. Sure. You can keep going down as many times you want to. Yeah. Absolutely. Mm-hmm. Until you get to something smaller than 12. Well, I find out what it is that makes a lot of time. It does. But so, I mean, what you do though is just think about, I mean, really all this is, is third grade long division. Take a big number divided by 12. Just do the long divisions. What your remainder is, that's it. That's it. You don't want to keep subtracting 50,000 times. Just do the division like you learned when you were 8. The remainder is, is it? That's it. Okay. Okay. So now, how do I, okay. So this is, I guess this is an important point I want to glass over. So how do I write the solution? Well, this is one way to do it. Okay. Now, and we came across this before. If, just suppose instead of 11 plus 8, why just don't, so this isn't as abstract. So suppose this was just the number 7. What's the canonical solution here? X is 7, right? Because then 7 minus 7 is 0, divisible by 12. So your canonical solution is X is 11 plus 8 Y, because when you subtract off the right side, you get 0, divisible by 12. You see that? That's it. That's all there is to it. Now, the, now how do you write Y? Well, if you're, and I think you've, all of you have taken linear algebra calculus you've dealt with parameters. Y can be whatever you want. So we're just going to let Y be T, and then X is going to be 11 plus 8 T. That's it. You're done. You solve it. This, in some sense, this is no harder than the other problems. It's the same. It's just that now you have a Y that you just don't know, but it's solved exactly the same way. Okay? So what you're going to do is you're going to say, okay, well, remember, Y was arbitrary, right? So we're going to say, well, Y, we'll let just, you know, Y is just going to be T mod 12, and X then is going to be, since Y is T, correct. Okay. Sorry. 11 plus 8 T. Mod 12. Yes. It seems like gone the other way and had the, you know, had the other parameter. Can we be, or is it good for us to be strategic? Okay, well. It's basically the same problem. So you have, actually, you have to be careful here, though, because 7 and 12 are relatively prime, but 4 and 12 are not. Okay? So in general, yes, you can. If it's relatively prime, you can just do everything the symmetric way. But in this case, it's important to choose the 7, because otherwise you can't apply the theorem, because 4 and 12 aren't relatively prime. Yeah. In a sense, solving for X. Oh, okay. Well, yeah. I mean, no. So X is, okay. So you, okay, yeah. Here's, I think this is kind of similar to the question you asked after class on Tuesday. So the point is that all we care about is, we just, all we care about are solutions mod 12. And the reason is because once you have a solutions mod 12, then you automatically get all the solutions, because you just add a multiple of 12 to, any multiple of 12 to them. So, you know, really, if you wanted the general solution here, then you would just add a, you know, just kind of like when you're solving sine X equals 1, you got something plus 2 and pi or whatever. It's the same thing here. It's sort of periodic in some sense. Oh, okay. Yeah. I mean, really, what you want, you want the mod 12 because the mod 12 sort of, in some sense, sort of captures all the solutions. What you're saying, because, yeah, because you're saying really now it's everything of this form mod 12. I would still capture all the solutions. Do we need to, like, approve or approve? Well, I will, okay. No, I will, I will just say this, because this is just an easy, easy, it's sort of a cop out of answer, but that's just simply not going to happen here because the problems that you're going to be dealing with, one of these guys is going to be, they're going to be relatively prime, so you're really not going to be able to divide through by anything in this case. Okay. Yes. The second, whether your last step was just to simplify your second to the last step, right? Yes, yes. Sure, you could have. You could have. I would prefer that you reduce everything down to the small. So if you have something, you know, anything mod 12, I'd like the numbers to be smaller than 12. Just because, then it's easy for me to know if you're right. If you write 50 billion and nine, then I have to divide it out because it's just a lot more work. So I would like you to reduce everything as small as you can. Okay. So this is it. Now, you might, okay, I'm going to spend too much time on this, but you can look at this and see if, you can actually check a couple of values to see if this is right. So for example, suppose I choose t to be 0, then x is going to be 11. Now let's see if that actually works, right? So if I choose t to be 0, then y is 0 and x is 11. Plug in 0 for y and 11 for x. So you get 77 congruent to 5 mod 12, so that reduces to just 12 dividing 72, which it does. That's right. Okay. And so, you know, similarly, if you plug in, we'll just, I'll just say this, but 1 for t, y is 1, then what's x? 7 mod 12, right? So what do you get? 53. This becomes 53. 48, when you subtract 5, total divides that. And in fact, you can generate every solution mod 12 with this parametric solution. That gives you everything. Okay. Is this okay? It's not that bad. It's not. It really is not that hard. You can do number three just by doing exactly what I did here. So we're okay with this? Yes? Yes. So with solutions mod 12, if that wasn't the modifier, would there be others we have to worry about? Oh, yeah. I mean, depending on how the problem was given, I mean, the, I think the author does a decent job. The problem with the diafantine equation is saying, you know, find all solutions to 5x plus 7y equals 20 or something like that. There's no modulus. In that case, you really are looking to find to express everything. These problems, all of the congruences that have a mod, a modulus in them, you are only worried about finding the solutions, modulo, that modulus, and that's all you have to worry about. But you can get all the solutions regardless just by adding any multiple of 12 to your solutions. Okay? So, for example, I mean, just imagine you have a solution for x. Well, suppose you replace x with x plus 12. Well, the 12 is 0. So you really haven't changed it. When you reduce mod 12, you haven't changed it at all. You know, right? It's just like taking the sign of 0, the sign of 2pi. You end up at the same spot. Right? I mean, 12 and 24, 36, these are all identified mod 12. So, yeah. Is that okay? Okay. All right. I'm glad you guys are asking questions. I want to move on just so we can make sure that we get through everything else here. Well, if you don't want to, that's fine, but you're going to miss out on some stuff that I think will be helpful. You're going to miss a lot better, by the way. Thank you. I appreciate that. If you saw my notes, actually, look how neat this is. I told you. Yeah. I have about the neatest handwriting you're ever going to see, except on here I can't do it. I know. I wish I could. But I can't. Okay. So, let's go ahead and move on here. What do I want to do? Okay. Here's what I want to do. Another example. Example two. Okay. So, we finished off with the Chinese remainder theorem before. Let's actually go through a specific problem using the Chinese remainder theorem. It's actually, this is one that's in the book. X is congruent to two mod three. X is congruent to three mod five. And X is congruent to two mod seven. Okay. So, really, in this case, what I want to do is use the Chinese remainder theorem. Okay. So, this, unfortunately, again, for the sake of time, I'm not going to have time to go back and rewrite the theorem because it's going to take too long. It's kind of long and messy. So, the Chinese guys did this a long time ago. There's the history. That's all I know. I don't know anything else other than that. Oh, right. Yeah. So, yeah, I'm not going to go into that. Actually, it didn't, now it's cool now. It didn't used to be. Okay. So, here's what we're going to do. Basically, and I'm just going to have to do this for the sake of time, you go back to your notes and look the statement of the Chinese remainder theorem was x is congruent to a1 mod n1, x is congruent to a2 mod n2 all the way down. So, I'm just going to identify those in the solution to this system of congruences that the Chinese remainder theorem gives us. Okay. So, if you remember, it was a1n1x1 plus a2n2x2 plus a3n3x3. We're just going to identify those. I mean, it's just going to be following the algorithm. That's all we're going to do here. Okay. So, in this case, what we have is n1 is 3, right? n2 is 5, n3 is 7. Okay. Hopefully, you guys know what I mean. Just relative to what I've set up when I actually gave you the Chinese remainder theorem, right? The module I. Okay. So, of course, to solve this, if you're going to apply the Chinese remainder theorem, first you should check to see that the hypotheses are satisfied, right? One thing we need is that there's no coefficient other than one in front of the x, right? If we have something else, we can't immediately apply the Chinese remainder theorem. It's only stated when you have one coefficients, right? On the left side. The other thing you have to check is that pairwise, the module I are relatively prime. 3 and 5, 3 and 7, 5 and 7, and they are relatively prime. You have to check. You should check these first. Okay. So, also a1 is 2, a2 is 3, and a3 is 2, right? You guys all with me so far? Okay. If you look back in your notes, it's just, okay. Okay. Now, remember the last, well, no, the second to last thing we need are these capital Ns, right? Capital N1, capital N2, capital N3. And remember, this is actually really easy. Whatever index you're on or subscript you're on, it's just the product of the moduli of different index than what you're at. So, N sub 1 is the product of the second and the third modulus. So, it's 35, right? Capital N sub 2 then is the product of the first and the third. So, that's 21, and capital N sub 3 is the product of the first and second, which is 15, right? So, there's only one other thing we have to find, and we have to solve these. There are three congruences we have to solve. These are actually very, very simple congruences. They're not going to take long. And once we've got the solutions, then we just write everything out and we're done. Okay. Okay. So, the first one is capital N1, X1, congruent to 1, modulo the first modulus given in the system, mod 3. Again, this is all given to you also in the statement or in the sketch of the proof that I did on Tuesday. Okay. So, when we know what capital N1 is, it's 35, 35, X1, congruent to 1, mod 3. Okay. So, what is, and there's a couple of reasonable answers here, what's 35, mod 3, minus 1, right? And that's also 2, right? So, again, if you think of it just from the definition, what is any number, modulo, whatever the modulus is. It's the remainder upon division by that modulus. What's the remainder when you divide 35 by 3? Three times 11 is 33, remainder of 2. Okay. Also, if you go down from 36, it's minus 1. And that's going to be the most convenient way to write this now. It's minus 1. So, we'll just write this as minus X1 is congruent to 1. I'm going to run out of, well, no, I can get this in. Okay. Mod 3. Okay. And if we multiply both sides by minus 1, we get X1 is congruent to minus 1. I'm doing, I'm writing out all the steps here just so hopefully I don't lose anyone. And again, as we said, right? What's minus 1, mod 3? Okay. If you're really struggling on this, if anyone's just not asking me, how's he getting the minus 1? How's he do this? Well, it's got to be one of three things. It's either 0, 1, or 2, mod 3. Is minus 1, 0, mod 3? In other words, it's 3 divide minus 1. No. Is minus 3, is minus 1 congruent to 1 mod 3? In other words, it's 3 divide minus 1, minus 1, which is minus 2. No. You can figure it out. I mean, it's not that bad. Just use the definition. If you're having trouble with intuition, just use the definition. You'll get it down. You will get it down. Okay. So we've got x1 now, right? So I'll box this in. So we can just take x1 to be 2. Okay. And I might not go through the details of all of these congruences, but the next one is n2 x2 congruent to 1 mod 5. Remember, from the sketch of the proof, it's always congruent to 1. All these congruences are congruent to 1 mod whatever it happens to be. Okay. So again, remember n2 was what? 21. 21 x2 congruent to 1 mod 5. Okay. So I'm not going to go through all this other than just to say, okay, well what is 21 mod 5? What's the remainder when you divide 21 by 5? 1. You guys should all be getting this. I hope you guys are all getting this. 1. It's not hard. So 21 is 1. So we can just take x2 to be 1. We're done. Okay. And the third one, n3 x3 congruent to 1 mod 7. Okay. So again, n3 is 15. So 15 x3 congruent to 1 mod 7. What is 15 mod 7? So we can also take x3 to be equal to 1 as well. Right. Okay. Okay. So here's the actual solution then using again the notation that I set up for you. x bar is a1 capital N1 x1 plus a2 capital N2 x2 plus a3 capital N3 x3. And I'm going to, you can all do this of course. We already have all these now. We have all the numbers. They're staring at you on the screen. Just plug them all in. Okay. So you're going to get 233. Okay. Now the last thing that you want to do is you're expressing it. So the last part of the Chinese remainder term says that the solution is unique modulo, the product of all the moduli. So what we're really doing now is we're interested in the solution modulo. I'll write this out for you. 105, which is 3 x 5 x 7. So really what we want to do is we want to reduce modulo, the product of the moduli. And so 233 is actually the same thing as 23 mod 3 x 5 x 7, which is of course 105. So there's your really how you want to write your solution. You would say the solution to this congruence is 23 mod 105. There's your solution. Or x is congruent to 23 mod 105. Yes. You said x of 1 is 2 and x of 2 is 1. Are you really saying that x of 1 can be 2? Yes. Yes. That's exactly what I'm saying. But that statement is still valid even. It seems like that statement is insinuated that it has to be 2 but it can't. It could be like 5. Yes. It doesn't actually have to be 2. But I'm always just going to take the solution, the smallest value that I can. So the reason why I'm taking it to be 2 is just that it's the smallest and it's just easier to work with smaller numbers. Is that really mathematically accurate? No. I'm just saying when I say x of 1 equals 2, I'm not saying that x of 1 must be 2. I'm just saying x of 1 equals 2 is a solution to this congruence. And it is the unique solution to the congruence, modulo 3. So there's this distinction between, is it the unique integer that satisfies the congruence or is it the unique integer mod 3 that satisfies the congruence? Of course it is not the unique integer that satisfies this congruence because as you said, 5 will work, 8 will work. There's an infinite number of integers that will work. It is not the case that there is a unique integer x1 that satisfies this. That is not true. But modulo 3, there's a unique one. In other words, any two solutions are the same mod 3. So when I write x1 equals, that does not imply that it's unique. There's no logical contradiction here. It's just that it is a solution that works. And all we care about is getting one of them. That's all we care about. So again, remember, in this case, the coefficient here is 1, 1 and 3 are relatively prime. So this has a unique solution mod 3. This has a unique solution mod 5. This has a unique solution mod 7. Okay? Are we okay with this? Then you write your final solution with these Chinese remainder theorem problems, modulo the product of the moduli, when the Chinese remainder theorem applies. That's how you want to express your solution. And again, I would prefer you reduce it down so that it's actually a number smaller than the modulus. Are we okay with this? Okay. Let's see. So there's... I want to say something about... There's another problem here. Yes, okay. It's 4D. Does everybody have this down? Are we okay with this? Okay. All right. I'm not going to do the whole problem for you, but this is one I want to call your attention to. 4D asks you to solve the system. Okay. 2x congruent to 1 mod 5. I'm just going to write it vertically here. So 3x congruent to 9 mod 6. 4x congruent to 1 mod 7. And 5x congruent to 9 mod 11. Okay. Because they're trying to make you do it. You could actually ask the same kind of question really about all of these in some sense. Okay. I think I copied this, right? So question. This is not a trick question. Can I directly apply the Chinese remainder theorem to this? Why? The coefficients are not all one. Okay. I would expect all of you to see that. Okay. So you cannot do that. Now, are the moduli pairwise relatively prime? If I take any two of them, are they relatively prime? Yes. Moduli are okay. Fine with that. So what is it that I need to worry about? Well, how can I remedy this? You might say, oh, well, this sucks. This is going to be too hard. I can't do it. I hate it. I'm not going to do it. Well, it's not that bad. What's the trick? Multiply through so that you can get the coefficients to become one. That's it. Then you can apply the Chinese remainder theorem and you're done. Okay. So I'm not going to do all of these. But you know, you have the idea now. Okay. So let's look at the first congruence. 2x congruent to 1 mod 5. Okay. So what I want to, you're all with me here. What we want is to get the coefficients in front of x to become one. So what can I do with this first one? Okay. So, yeah. I'm just going to stay with positive values. Something that would just be easier. Multiply through by 3. Six is one. Mod 5. Done. Okay. I mean, there's nothing wrong with what you said. I'm just going to do it this way. So if you multiply through by 3, you get 6x congruent to 3 mod 5. And again, I want to be clear on this. The reason why I can use this if and only if arrow is because 3 and 5 are relatively prime. If I multiply through by 10, I have to erase this part of the arrow. In general, you have to. But you can go both ways because it's relatively prime to the modulus. So it's equivalent. And then, of course, at this point, we just reduce. And this is just the same thing as x congruent to 3 mod 5. Okay. So now I've got the one that I want. And so I can replace, let's say if I call this one prime. I really can replace one with one prime because I have the same solution set. It's the same thing. Okay. Now, this is maybe a little bit trickier. And I'm going to stop at this point with this one. But how do I deal with this one? So 3x congruent to 9 mod 6. I will tell you something right now. You cannot multiply through by something to get a 1 in front of the x. You can't do it. And actually, the reason for this is because 3 and 6 are not relatively prime. And in fact, this isn't if and only if. These two numbers are not relatively prime. You cannot multiply through to get a 1. You can't. Okay. So you can multiply through to get a 1 if and only if the two guys are relatively prime. Yes. Can you divide by 3? Yes. You can divide by 3. And then, luckily, when we divide by 3, we get a 2. And we still have all four of the modules pairwise relatively prime. If you divide it through and you've got a 5, then you're still in trouble. Everything. Everything. So remember, there are lots of techniques that we've learned. One thing that you can do, and this preserves this is an if and only if. If you have a number that divides all three of the numbers, you can divide everything through by it, including the modulus. And you have the same set of solutions. Okay. So I'm not going to write that. But what I'm doing is, as she said, we're just dividing through by 3 everywhere. Everywhere. So this is if and only if x is congruent to 3 mod 2. So there is now my second one. And we're good because we have a coefficient of 1. And again, even though we changed the modulus, all of the moduli are, we're not going to end up having to change the modulus for 7 and 11, because 4 and 7 are relatively prime. 5 and 11 are relatively prime. And remember what I said. That means you can always multiply through to get a 1 when they're relatively prime. What do we multiply 4 by? Well, 2. Right? Multiply 2 by 2. You're done. What about 5? Okay. So yeah, there's a couple of ways that you can think about this. I'm actually just going to leave this to you to do. I'm not going to go through it. Okay. But that's what you do. That's what you do here. And then once you've got it, then the hypotheses of the Chinese rheumatoid thermostatified, then you can solve it just like I did the last problem. Okay? I'm too old. I'm not allowed to do that. I'm too old to say that. No. I would feel really weird if I started saying that. You can do it for me if you want to. But I'm not going to. Yes. Then you're like, yeah, because you get 2. Yes. Yes. I mean, so yeah, they definitely do. And you want the, any two of them need to be relatively prime. So for example, if you had the same one, for example, 10 and 10, they're not relatively prime because 10 divides both of them. So yeah, you definitely need them to be different. And if you pick any two, the GCD should be 1. That's what you're looking for. Yeah. And in a way, to seek around it. Is that a problem? Oh, well. Does that mean that there's not a mutually impregnable solution that could be multiple? It depends. Well, it all depends on what the problem is. I mean, it's certainly possible that they can be solvable at the same time. But it's also possible that they will be, it all depends. But I don't, that's, that really shouldn't come up. I'm just wondering, you know, just like go back and try to go a different way so that doesn't happen anymore. That means something about it. It means, yeah. I mean, if you're, if you're, it all, but yeah, I mean, it all depends. I mean, this really should not happen to you. So, I mean, you know, for, I'll see if I can, I mean, I don't think I want to spend the time on this. I mean, I can give you, I can give you examples where the system has solutions. I can give you an example where it doesn't have any at all. But I'm just wondering, you know, just like go back and try to go a different way so that doesn't happen anymore. That means something about it. It means, yeah. I mean, if you're, it all, but no, this really shouldn't come up in this, in Elmer, so that's not really something you really need to worry about. No, I'm not going to do that. And then it's going to be recorded forever. And then, I don't know. Oh, I've done, oh, believe me, I have done a lot of embarrassing stuff. In fact, I do a lot of stuff that you probably would not ever guess that I would have done, but I'm not going to go into that right now. Okay. So let's see. What else do you want to do here? Oh, yeah. Okay. This is probably the last time I'm going to have time to talk about. But let's see. Let's talk about number six. Okay. Now you have a few other homework problems that are sort of outside the box type problems. This is one of them. Number six says, find the, oops, sorry. Okay. Find the smallest integer A bigger than two such that. Okay. Let me, all right, I've got to find this. Let's see. Okay. So there are a bunch of conditions here. So two divides A. Three divides A plus one. Yes. They just forgot the other one. Yeah. No. Five divides A plus three. Six divides A plus four. Okay. Now, okay. Now this, this, you know, first glance you might think, oh, well, this is just some weird problem that they're just throwing me out of nowhere and I'm just going to just hammer on it and just not use anything I've already known. No, no, no. Your default should be, I need to translate this into a congruence problem. That's what you should be thinking. Okay. And that's exactly what we're going to do. And then we're just going to, in fact, this is going to end up being a Chinese remainder theorem problem. It's all it's going to be. Really, when the smoke clears, that's what this is going to turn into. Okay. So the corresponding, okay. I'm going to do this kind of slowly. Kind of slowly here. This corresponding congruences, and of course, this is again why I'm spending so much time on this section because maybe you wouldn't think to do this. Two divides A, then that's just another way of saying that A is congruent to zero mod two. Three divides A plus one. I'm going to, okay, like I said. And I want you to think about this. It's not that A is congruent to one mod three. That's not right. A is congruent to minus one mod three. Right? Think about what the congruence symbol means. This is the same thing as saying, asserting that three divides A minus minus one, which is A plus one. That's why you have the minus one there. You guys seeing this? Just think, just go back to the definition of congruence and you'll know if you got it right or not. Okay. And then the next one then is, what's the next congruence? Minus two mod four. And the last two then, of course, then will be A is congruent to minus three mod five. And A is congruent to minus four mod six. Okay. Well, here's what I'm going to do and this actually will make sense to see where we're going with this. Let's get rid of the negatives. Okay. Let's replace them with positive values here. So this is the same thing as A is congruent to zero. Of course, we don't have to do anything with the first one. A is congruent to zero mod two. A is congruent to, what's the second one become two? Right? Mod three. And again, remember what I said about how to think about the negatives? Negative one. You're thinking, what do I have to add to one to get a multiple of three? Two. Two to one to get a multiple of three. Right? You get three times one. What does the next one become? What's minus two? Oops. Sorry. What's minus two mod four? What do I have to add to two to get four? Two. Right? What's minus three mod five? What's minus four mod six? Mod six. Sorry. Okay. Well, now, so first question is, okay, well now the A sort of serves as the X in this case. Can I use the Chinese remainder theorem right away to solve this? I mean, then when I say right away, I mean, can we just go right into it immediately? No, why? They're not all relatively prime. Two and four, right, are not relatively prime. In other words, the GCD is not one. Two is the GCD of two and four. I cannot just immediately apply the Chinese remainder theorem here. Here's what I want to do. I want to, and this is what's going to happen. So in cases like this, you might say, okay, well, how do I do this? Solving all these congruences, okay, well I have an A, i.e., an X, same thing. So it kind of fits the form of the Chinese remainder theorem. So your gut instinct should be, I should be able to use it somehow. I just have to do something first. So what we really would like is to have these redundancies, the ones that aren't relatively prime, have a couple of those congruences implied by the rest so we can just throw them away. Okay? So think about this for a second. If A is congruent to two mod four, we'll think about the possibilities for A, right? A could be two. A could be six, right? A could be 10. All of these are divisible by two. So the fact that A is congruent to two mod four implies that A is congruent to zero mod two. So we don't need it. It's redundant. We don't need it. You guys getting what I'm saying here? We can throw it away. We can throw it away. Because it's implied by the rest of them. And we can do that, and maybe I'll say a couple more things. We can do that so that the ones that are implied, again, they're redundant. We don't need them. We throw them away. Well, we have left. They are pairwise relatively prime to moduli. Now we can solve it. We're done. Okay? So what else? Yes? I'm sorry. Which of those did you say if you throw away? That might be from the way others, but that you just said... So... I think the throw away A is congruent to two mod four. Okay. That's covered by A is congruent to zero mod two. Okay. So I'm not even going to say that these... Here. Let me label these before I get to that. One, two, three, right? Four, five. Okay. So, yeah. I mean, I think there are a couple of ways you could go about doing this here. I'm just going to tell you one way. Yeah. There's possibly other ways you could mix and match here. So let's look at the fifth congruence. Okay. So I'm just going to... I'm not going to go through all the details for how to solve this, but I'm going to let you kind of do what you want to do here. But I'm going to just tell you one example of how you can throw some stuff away here. Yes. So, yeah. You can multiply by three, but it's not an if and only if because three and six are not relatively prime. So it's not equivalent to it, though. You have to be really careful about that. Well, here. Let me show you... Just hang on one second. Does everybody have this down now? Okay. Here. Let me show you, for example. Okay. This is just for example. The fifth congruence is implied by... Let's see. What was it? Two and three. Okay. So this is just for instance. So remember congruence two, if I labeled this right, was what? A is congruent to two mod three, right? And the third one was A is congruent to two mod four, I think. Someone please tell me if I didn't... Okay. So what does this mean? What does this mean? This means that three divides A minus two and four divides A minus two, right? Now, there's a theorem that we did back in the GCD section which says that if you have two numbers that both divide the same number and those two numbers are relatively prime, then their product divides it. Right? You guys remember this? So now you know that 12 divides A minus two and of course if 12 divides it, of course six divides it, right? Because 12 times X is A minus two, so six times two X is A minus two. But that just means that A is congruent to two mod six. Which is the final congruence, right? You see what I did here? And I already told you that we can also throw away one, right? It's implied by three. And if we get rid of one in five, what we have left, the moduli are pairwise relatively prime. When we throw away the redundancies, what we have left can be solved at the Chinese Remediatown. Yes. That's all I have to say about this. You guys see what I did here? Okay. So you got to be a little clever sometimes. You got to think about, you know, okay, well, I can't apply the Chinese Remediatown. Can I do something else first? What can I do? And in this case, this is something that you can do. So, you know, some of these, again, and you know this now being in this course for as long as you've been in this course, some of these things you have to think about. Some of them require some creative problem solving. This is one of those problems. So I've done, I've helped you out now with quite a few of these. You have a few left. I can, you know, address a couple, maybe give you a hint or two on Tuesday. But, you know, I've really given you a really good, maybe more help than I should have, really. But now you have a lot to go on to finish the homework up. Okay. So I think I would just go ahead and stop there for today. I want you to think about the ones I haven't talked about. Think about them. Work on them. Okay. And you'll, like I said, I'm sorry about the homework. You will get the homework back, the graded homework. It will be graded this time. I'll give that back to you on Tuesday for sure. Okay.