 Although the codes we've discussed so far in this lecture have utilized the binary operation of plus, you know, addition inside of z2n, we really haven't utilized the full structure of this thing. So first of all, when you take z2n with addition, this is going to be a group. So let's start to use the full strength of the group theory we've developed with these code, for these codes so far. So this actually leads to the main idea of this video, what we call a group code. A group code is a code, which remember by definition, a code is just a subset of z2n, right? A group code is gonna be a subset of z2n that is itself a group, aka subgroup. So a group code is a code that is also a group. And since it sits inside of z2n, it needs to be a subgroup of z2n. Let me give you an example of one, okay? So consider the following code C, which lives inside of z2n7. You'll notice of course it does have the identity element that's required to be a subgroup. We have these other 15 elements, right? 001111, 001010, did I say that one right? 0010101. Anyways, I'll leave it up to you to kind of verify that this in fact does form a subgroup of order 16 inside of z2n. So this is gonna be an example of a group code. Now, just so we connected with what we saw before, right? So these are binary sequences of seven bits. So the first parameter here is a seven. How big is this thing? Of course, 16 is two to the fourth. So this is an example of a seven for group code. Okay, and we'll talk about the importance of it being a group in just a second. But some things to pay attention to, like I said, how do you know it's actually a group code? Well, again, here it has the identity that's easy to check. What about inverses, the inverse axiom? Well, the thing is when you're in the group z2n, every element is its own inverse. So being closed under inverse is actually a trivial statement for these codes. And so then the next thing to check is addition. Is it closed under addition? Well, there's a little bit of an argument that has to be made here. Again, with this example, you could check by trial and error that is in fact closed under addition. But I also wanna mention that you actually don't even have to check to see if it has the zero vector in there or not. Because of the following idea, if your code is not empty, right, then it contains some code word in it, okay? If it's closed under addition, that means w plus w, which will equal zero is inside there as well. So really to show that a code is in fact a group code here, we have to show it's not empty, which is nearly always the case. I mean, how could you ever have an empty code? And you just need to close under addition. That's all we have to check to see that if it's a group code or not. But the thing is one of the great advantages of group codes is in the simplicity of computing many properties in particular, the minimal distance. So in this theorem right here, suppose C is a group code, remember the minimum distance is the smallest distance between any two code words inside of the code here. Well, in a group code, so well, we saw the significance of the minimum distance. The minimum distance told us something about how well can the code correct errors or detect errors and things like that, right? So if your minimum distance was D, remember we could detect up to D minus one many errors and we could correct basically up to half of D minus one. And so this minimum distance is important. We would want to be able to, for a good code, we want this minimum distance to be big and we also wanna be able to calculate it. In a group code, turns out the minimum distance is very trivial to calculate. The minimum distance is simply just gonna be the minimum weight, the minimum norm of vectors inside of the code. So that is the minimum distance, you just take the smallest weight of any non-zero. Clearly, if it's a group code, it will contain the zero vector, that weight will be zero. But if you take the minimum weight of a non-zero vector, that's gonna give you the minimum distance. And this, the reason we can throw it zero is the same reason with the minimum distance that we don't take the distance from a vector to itself, that's always zero. We need to take the smallest positive distance and in a group code, that'll coincide with the smallest positive weight. And so to see that, well, remember the definition of the minimum distance, like I just explained a moment ago, is we take the smallest positive distance between two vectors where they are distinct vectors because we don't want the zero distance. We proved in a previous video in this lecture series that the distance between two vectors is equivalent to the weight of the sum of the two vectors. All right? So if X and Y are not the same vector, that means their sum will not be zero. The only way the two binary sequences add together to be zero is if they were the same identical sequence right there, all right? Well, since we're a group code, like we mentioned on the previous slide, if it's a group code, it's closed under addition. And therefore, these two sets are measuring the exact same thing because of this connection, right? So we wanna look for the minimum distance. Well, the minimum distance can be written as the minimum weight of the vector X plus Y, but as it's closed under addition, X plus Y is equally arbitrary. For these, if you look at all the combinations with like the Cayley table and such, you're gonna get all of the elements are gonna be shown up here actually in multiple ways, but the weight of X plus Y needs to be minimal in which case we just have to look at the minimal weight of the group code here. So let's go back to our seven four group code that we saw, well, we can see it again right here. So what is gonna be the minimum weight? So let's just go through it. Clearly we don't count the zero vector. So we have this one. This one right here is of weight four. This one's weight three. So that's our winner so far. If we're playing like King of the Hill, here's one that's weight three. And so we go through it. This is three, three, four, four, three, three, three, four, four. Looks like they're mostly three or four, four, four, three, and then this one's a seven, right? That's way too big. So our winner, ding, ding, ding, ding, ding, was three. So the minimum weight was three. And so the minimum distance here is gonna be three. Which remember, three can be written as two plus one. Therefore that tells us we can detect up to two errors. I should probably, we should probably say that's a two error detection level. And then likewise, three can be written as two times one plus one. So this code has the ability to correct up to one error in transmission. So we can determine these specifics of the code by looking at the minimum weight. And so the connection between minimum weight and minimum distance comes from the fact that it's a group code. For an arbitrary code, we would have to go through a lot of checks to find a lot more. Basically we'd have to go through 16 squared, 256 calculations. For this one, since it's group code, we only have to go through 16. So I mean that's a scale of magnitude, simpler calculation there. So this is just the tip of the iceberg. Group codes are gonna be the, that is codes which are themselves groups are the tool we wanna use and hints why we're in this algebraic coding theory lecture right now.