 What is the number of lecture 14? And the last thing we were saying was the definition of generator polynomial for the BCH code. So let me write down how it worked out. So if you were looking at block length n equals 2 power m minus 1, you need to know about the finite field with 2 power m elements and you need a primitive element in that field. So the whole construction is based on this finite field. You pick your parity check matrix with elements from the, with the entries from this other finite field. And finally after a lot of work, you remember how the parity check matrix would look if you want t error correcting. If you want a t error correcting BCH code, I started out by saying parity check matrix is going to look like this. You are going to actually pick, even though it is a binary code, you are going to pick a parity check matrix from, with entries from f2 power m. And how will I define my code? I will say only binary code words are possible, but it has to satisfy the parity check matrix over f2 power m. And the entries of the matrix were quite simple, alpha power n minus 1 and then 1 alpha square, alpha square, square, right? And alpha power, let me write it carefully, alpha square raise to the power n minus 1. So on till, till what power do I have to go? d minus 1 or 2t. So in this case, think of it as 2t because I mean technically you do not know what d is, right? You only have a bound for d, okay? So alpha power 2t is what we can say for sure, okay? 2t, 2t squared, so on till alpha power 2t raise to the power n minus 1, okay? So this was our parity check matrix, okay? But we saw that describing, well I think this 2t whole power n minus 1 is not showing up properly. Let me write it down properly. Alpha power 2t, the whole thing raise to the power n minus 1, okay? That is my matrix, okay? So we saw in describing the code with just this parity check matrix is not the easiest job in the world. You need to view the code words differently. How should you view the code words? Code words is polynomials. Once you think of the code words as polynomials and then you see all this parity check is telling me is the code word with binary coefficients, the polynomial with binary coefficient should have alpha as a root, alpha square as a root, so on till alpha power 2t as a root. And then we were able to simplify, do a lot of things and see mainly through the minimal polynomial. You saw once alpha has to be a root and the coefficient should be binary, then you know the minimal polynomial itself should divide this polynomial. So we saw this code word will have to be a multiple of LCM of several minimal polynomials. And that LCM of several minimal polynomials we defined as the generator polynomial. So that is the important notion. Instead of describing it purely with the parity check matrix, we find this generator polynomial description simplifies everything. So what is the definition here? It is the LCM of what? f alpha x, f alpha squared x, so on till. I hope this is the notation I used for minimal polynomial, f alpha power 2t x. You might see some books use capital M instead of f, just to say it is the minimal polynomial, but any notation is fine enough. Yeah, so there are some simplifications possible. If you do not want to write alpha to alpha power 2t, what are the things? You can drop several things. Once you bring in f alpha of x and since you are only worried about the LCM, you know easily f alpha squared, f alpha power 4 all those things will be the same as f alpha of x. So you can easily drop those terms. In practice, this LCM might be much easier to compute than the way it has been written down as a fancy LCM. So once you write down this, you notice that this g of x is in fact a polynomial with binary coefficients and all your problems of describing the code words go away. So you had problems because this alpha was an f2 power m. All those go away once you know this g of x is a binary polynomial and we had a very simple description for a code word of a code. We said c of x is a code word if and only if you can write c of x as some m of x times g of x. So we came to such a simple description. So now with this description, we can easily count the number of code words. We can easily come up with nice descriptions for what the code words are. So the counting is what I am going to do next. So we had only a bound for the dimension so far. What was the bound? n minus m times t, that was the bound. We said k has to be greater than or equal to that. So I said it is a tight bound but we can get an accurate estimate, an accurate value for k once you know this g of x. So we will do that counting now. So for that, let us suppose g of x is g0 plus g1x plus so on till g, let me say r x to the power of r. So I am going to say basically g of x is a degree r polynomial. So once I say degree r, actually what will be g sub r? g sub r has to be 1. It is polynomial with binary coefficient so it is only 0 or 1. So g sub r has to be 1. So all those things I will follow but I will just simply write it like this just for the sake of keeping it gentle enough. So g r x to the power of r. So now how does an arbitrary code word look? Any code word will have to be what? c of x which is I know a degree less than or equal to what? What is the maximum degree possible? So remember here I have said degree equals r which means g r is actually 1. Remember that. g r is actually 1 and here any code word well looks like this. This I know already but here remember c n minus 1 need not be 1. It can be any degree less than or equal to n minus 1. That is the only thing we can say. But I know this can be written as sum m of x times g of x. So let me write the g of x first g 0 plus g 1 x plus so on till g r x to the power of r and then I will say in a very suggestive way I will write it as so on till m k minus 1 next to the power k minus 1. So this degree is equal to r. So if this degree is less than or equal to n minus r what about this degree? Degree is less than or equal to n minus r minus 1. So if I write some m of x here the degree of that m of x has to be less than or equal to n minus r minus 1. Is that clear? I am sorry it is what? So maybe I will redo this. So is this clear? See g of x times m of x, g of x has degree r. I want g of x times, am I making a mistake here? I think I am okay. D of x times m of x should have degree less than or equal to n minus 1. Yes. So when I say this, this is the degree of m of x. I am sorry. This is only for m of x. So g of x I have already written here. So only for m of x. Degree has to be less than or equal to n minus r minus 1. So if I take any m of x with binary coefficients, remember all these things are binary. So the g i and m i and c i, all of these guys are 0, 1. They are all binary. So as long as I take any binary m of x of degree less than or equal to n minus r minus 1, what will I get? I will get a valid code word. Any m of x with binary coefficients and degree less than or equal to n minus r minus 1 will give me a valid code word of the BCH code. Is that correct? And if I take two different m of x's, will I get the same code word? Can I get the same code word with two different m of x's of degree less than or equal to n minus r minus 1? It is not possible also. Once I change m of x, C of x will also change. That is how polynomials behave. Two non-zero polynomials and multiplied will never give you 0. So you know that it will not happen. So since we know all that, now we can count the total number of valid code words. What will be the total number of valid code words? It is very easy. Number of polynomials of degree less than or equal to n minus r minus 1. So I am not going to write down all that argument. I think that argument was quite basic. Just based on this, this implies number of code words equals 2 power n minus r minus 1. So from my basics of n minus r, okay, I am sorry. n minus r, you are right. Degree is less than or equal to n minus r minus 1. You have n minus r coefficients to choose. So 2 power n minus r. So from my knowledge of codes, I know it is a linear code. I know BCH codes are linear codes. What will be the number of code words? 2 power k. So now this I know is 2 power k. So no wonder I picked my m of x to be m0 to mk minus 1, which will give me exactly k, which is equal to the dimension of the code number of coefficients in my m of x. So that is the idea in picking up. So in general, you see the result is as follows. The dimension of the code, dimension of the BCH code equals what? n minus what? Degree of g of x. That is the general result that we need. So this is what I have shown. So you know how to find g of x. You will see the way we do it. At least finding the degree of g of x is very easy. You do not even need to know much about the field. To find the exact g of x, you need to know the field. But to find the degree of g of x, you will see you do not even need to know much about the field. It is very easy to go through and find the degree of minimal polynomials. You remember how I found the degree of minimal polynomials in the last class. You do not need the alpha power and all that. Just take the numbers, multiply them by 2, keep doing it, modulo 2 power m minus 1, you will get different sets. Each set will correspond to the set of roots of the minimal polynomial. From there, you can quickly identify the degree. So finding degree of g of x you will see is very easy. Based on that, you can also find the dimension. Once you find the degree of g of x, I am telling you dimension is n minus degree of g of x. So doing this exercise is very, very easy. In general, I do not know. I mean, once you know the field, you could multiply and find the minimal polynomial. So large, you may not know the field, but you will know at least the irreducible polynomial. It is probably not that difficult. I do not think it is very difficult. One could do it. If you just want a listing of all the minimal polynomials, probably it will take time. Even for very large fields, see, you can find irreducible polynomials easily. So once you find irreducible polynomials, you know how to add and multiply in the field. So, right? And once you know the field exponent, alpha, power, whatever, then you can find its cyclotomic process. It is not too bad. Maybe you can do it. Maybe, I do not know. Just guessing. Maybe it is not possible. I am not sure. All right. So let us do this exercise for a couple of examples. Try to list out several BCH codes, find the n, k and g of x. So, we will try those things for several cases. Just to get some practice, you will see it is finding the exact g of x will require some knowledge, but it is doable in most cases. It is not that difficult. Let us take an example. First example I want to take is n equals 7. I want you to spend a couple of minutes to think about. Okay. I think we will just do this real quick. I will give you a couple of minutes in the next example. Okay. So we will do this real quick. Okay. So the field of interest is what? You need alpha belonging to what? gf, 2 power 3, right? 2 power 3 being a primitive element. So I will say alpha squared is, no, alpha power 3, I am sorry. Alpha power 3 is alpha plus 1 and then alpha power 7 is 1. Okay. We know that. Okay. Then I want to think about the t equals 1 or the one error correcting BCH code. Okay. So what will be g of x now? LCM of what? F alpha of x and then F alpha square of x. But what do I know about F alpha and F alpha square of x? Both of them are the same. Okay. So this will become simply F alpha x. Okay. And we did this exercise before. I went through and found out this F alpha x. What will be F alpha of x for this alpha? It is very easy. It is a primitive element. I generated it like this. Alpha power 3 is alpha plus 1. Okay. So what should be its minimal polynomial? This will work out to be x power 3 plus x plus 1. Okay. If you do not believe me, you can go back and look at your notes or convince yourself, write the whole table, find the cyclotomic cosets, right? Multiply it out. You will get the same answer. Okay. Okay. That is your g of x. Okay. So what will this be? This will be the Hamming code. No. So the generator polynomial for the Hamming code is 1 plus x plus x power 3. Okay. So will you generate code words of this? Okay. Any code word can be written as 1 plus x plus x power 3 times what? M0 plus what will be k? k will be 7 minus 3 which is 4. Right? How did I get this 3? Degree of g of x. How did I get this 7? It is just n. Okay. I already gave it. Okay. So let us do t equals 2. Okay. What will be g of x? LCM of. Okay. The only non-trivial thing is what? F alpha and F alpha power 3. Okay. Alpha squared and alpha power 4 will have the same minimal polynomial. Okay. So if you go back and look at your notes, you will see this will work out too. Right? Okay. Okay. How did I know the degree of F alpha power 3 of x will be 3? How did I know that? How did I know that? Yeah. You have to find all the roots of F alpha power 3. Okay. So how did I find all the roots of F alpha power 3? You remember we went through an exercise. What is that exercise? You have to keep repeatedly squaring it. Okay. Alpha power 3 is a root implies then what what else will be a root? You square it once again. Alpha power 6 will be a root. Then what else will be a root? Alpha power 5 will be a root. Okay. Alpha power 12 which is actually alpha power 5. And then after that if you square you will come back to the original thing. Based on that you know degree is 3. Okay. And then how do I know quickly know in this case that x power 3 plus x square plus 1 has to be there. Alpha inverse is a root of that. Right? Alpha inverse is what? Alpha power 6. Right? So you know that this has to work out this way. It has to be a shifting of reversing of the coordinates. So you will get this. Okay. If you multiply this out what do you think you will get? Okay. You can try it. You will get x power 6 plus x power 5 plus x power 4 plus x power 3 plus x square plus x plus 1. Okay. Okay. So what is k? What is k? 7 minus 6 which is 1. Okay. So what is an arbitrary codeword? g of x times m0 that is it. Okay. So m0 is only 0 or 1 which means your codewords are what? All 0s are all 1. So what is this code? The repetition code. Okay. So this becomes the Hamming code. This is actually the 743 Hamming code. This is the repetition code, n equals 7 repetition code. Okay. So you see for n equals 7 you stop at t equals 2. Can you do t equals 3? Does it make sense? You will still get the repetition code. Okay. If you do t equals 4, well you might, I do not know what will happen. Okay. So it is not even very nice to think about those things. Okay. So I will have to stop there. Okay. So let us go to the next example I want to do where I will take n equals 15. Okay. So once I say n equals 15, I am thinking of, I love to use f16 and then take a primitive element. Okay. I will once again say 1 plus alpha, alpha of 15 is 1. Okay. So that those are my, that is my starting point. And then if I think of t equals 1, I will get, okay. So I will get what? What do I get? x power 4 plus x plus 1. Okay. Are you convinced? Okay. The only the primitive, the minimal polynomial for alpha is important. So my k becomes what? 15 minus 4 which is 11. Okay. So this, this as I said before will be the 15, 11, 3 hamming code. Okay. So this we saw actually even from the parity check matrix. That is the easiest way of saying that this will be the 15, 11, 3 hamming code. Right. The parity check matrix will have only one row in f16 and that will include all the non-zero elements. And if you replace with columns, you will see, it will give you the parity check matrix, the hamming code. Okay. So t equals 2, what do you do? G of x becomes LCM of what? f alpha x and f alpha power 3 x. Okay. So I know one thing x power 4 plus x plus 1. What is this? Okay. We did this. No. What are the roots? Alpha power 3, alpha power 6, alpha power 12 and then alpha power 9. Okay. After that it will repeat. So you know it as degree 4. Okay. So you see always, even if I do not know the exact minimal polynomial, I can find the degree of f alpha power 3 x. Okay. And I know f alpha of x will not be equal to f alpha power 3 of x. How? How do I know that those two will not be the same? How do I know that these two polynomials will not be the same? How do I know one will not divide the other? Both are irreducible. See, that is the important logic. Right. Both of them are minimal polynomials. Both are irreducible. So one obviously cannot divide the other. Can one be equal to the other? How will I conclude that one will not be equal to the other? Yeah. Well, but if both of them are the same, they can still be irreducible and divide each other. Right. How do I know that this will not be equal to that? I just gave you the list of roots. Okay. What are the list of roots for f alpha x? Alpha, alpha square, alpha power 4, alpha power 8. It does not include alpha power 3. Okay. So you would not get alpha power 3 to be a root of f alpha of x. Okay. So that is the only way. That is the proper argument. Okay. You might have several feelings about it, but that is the proper argument to prove why this is not equal to that. Okay. So if you do the math and if you multiply it out, simplify, you will get x power 4 plus x power 3 plus x squared plus x plus 1. And if you have enough experience in coding, all these things will be in your head. Okay. Mug it up and then you will just vomit the minimal polynomial. Okay. And if you see many books, okay. In fact, every book in coding towards the end, it will have an appendix in which it will list all the, you will have all the minimal polynomials for all the elements. So you do not have to really compute minimal polynomials, at least for small fields. Okay. Okay. So we can do the simplification here, but it is not so crucial. What is crucial is, what is k? 15 minus 8, which is 7. Okay. So what you have here is a 15, 7. Okay. Well, technically I have to say greater than or equal to 5 code. Okay. But I want you to do this exercise and simplify this. Can you simplify and get me the, multiply and simplify and get me the g of x. Okay. It is useful. It is useful basically to get rid of the greater than or equal to. Okay. So I am going to give you some time to do that. We will see at the end of the day, just by the simplification of g of x, you can get rid of the greater than or equal to 5. x bar 8 plus x bar 7. x bar 6 plus x bar 4 plus 1. Okay. All right. So I made a claim. After the simplification, you can get rid of the greater than or equal to. Why? Just because after the simplification, I have written down this g of x, I can get rid of this greater than or equal to now. Why? Weight of, weight of g of x is what? What do you mean by weight of g of x? If you view g of x as a vector, its weight is 5. So what? So why can I get rid of the greater than or equal to? Okay. Yes. So what choice of m of x is that? Yeah, one. Yeah, that is all. You take m of x equals 1, then g of x is actually a codeword. I mean, any codeword, what is the definition? Any multiple of g of x is a codeword, which means g of x itself is a codeword. So you see this exercise, while it is totally useless, it might sound useless to you, it helps you reaffirm those things. It is one thing to hear me tell you that all codewords are multiples of g of x and another thing to actually see it in practice. What do I know will be a codeword? 1, 0, 0, 0, 1, 0, 1, 1, 1 and then what? 9, 10, 11, 12, 13, 14. This I know will be a codeword. How? This is actually g of x, belongs to the codeword. What is the weight of this codeword? 5. So that means what? Minimum distance is less than or equal to 5. I already know it is greater than or equal to 5. So it has to be equal to 5 itself. So that means I can get rid of this less greater than or equal to. So it becomes a 15, 7, 5 code. What are the codewords can I come up with just with this codeword? What else is a codeword? Any cyclic shift? Is that the only thing? Yeah, once the cyclic shift I can add. So that is the way you do it. Remember what is m of x times g of x? What happens when you multiply by another polynomial? All you are doing is well convolution but remember the degree it never spills over, right? When you multiply by x, you are actually pushing it to the right, multiply by x square, you are pushing it by one more position and then what is the plus doing finally? It is just doing a linear combination. So the m of x times g of x is doing linear combinations of g of x, this codeword and several right shifts of this codeword. You will see it will stop exactly where it becomes cyclic. You will not let it go cycle around. That is the way the g of x is defined. Is this clear? Is it kind of roughly clear? So all these things are different ways of thinking about the m of x times g of x. In a proper classical coding theory course, we would expand on all this, take a lot of time, go through this slowly. Since I am also trying to do some modern stuff, we will just quickly go through in examples and I will give you some ways of looking at it. So basically what this means is g of x and its right shifts form a basis for my code. That is what it means. So it is a very simple way of thinking about it. There are so many interesting properties. I think I will definitely encourage you to read about the theory of cyclic codes outside of BCH codes. I have only presented BCH codes. The theory of cyclic codes itself is so nice and simple and elegant. You should read it when you get a chance. So let us move to t equals 3 to see what we get. What will g of x be? LCM of f alpha x, f alpha part 3 x and then f alpha part 5. I know all of these guys are not the same. They are all distinct. They cannot divide each other. So the LCM has to be the product of all of them. So these two guys I know already 1 plus x power 4 plus x power 6 plus x power 7 plus x power 8. What is this? f alpha power 5 x square plus x plus 1. So it is a different kind of a, I know it is a bit of a pain but try to multiply it out and simplify this. Believe me, you will get something interesting at the end. And I will ask you for all kinds of interpretations after. Maybe, I do not know. I hope you get something interesting at the end. If you do not get anything, we will give up and move. So what can I conclude about k? 15 minus 10 which is 5. So this I know will be a 15 5 greater than or equal to 7 code. But let us see if we can get rid of the greater than or equal to 1. We can. What is the expression now for the plus 5 4 2 x and 1. So we did not get anything very interesting. But at least we could get rid of the greater than or equal to. It is not needed. Why? g of x itself has weight. It corresponds to a code word which has weight. 8 equals 7. So I know the minimum distance will be equal to 7. So we can get rid of this greater than or equal to 15 5 7 4. Apid, you want to try t equals 4. What do you think will happen if you try t equals 4? What will happen? Go ahead and try for t equals 4. You will need to multiply by f alpha power 7 as well and that you know has degree 4. So it will become 14. It will become degree 14. So g of x will be degree 14. Degree will become 14. So what will be k? k is 15 minus 14 which is 1. And you will see g of x will in fact be what? 1 plus x plus x square plus so on till x to the power 14. So you will see this will be nothing but the 15 1. 15 repetition code. One thing I never told you which is a very simple result to prove also. It is very easy to prove. One thing which maybe I should have proved in class but I did not prove. It might be useful for you. x plus 1 times x plus alpha times x plus alpha squared so on till x plus alpha power 2 power m minus 2. What is alpha? Alpha is f 2 power m primitive. This magically becomes x power 2 power m minus 1 plus 1. Yeah we actually found it is equal to 7. Yeah yeah so when I cut it out I meant this greater than or equal to goes away. So I still want to make it look ugly. So maybe I will make it look ugly. It goes away. So I mean if you have been reading like I asked you to do some extra reading on finite fields and all that you would have found this factorization there. Almost any book any decent book halfway decent book on finite fields will talk about this factorization. So this why did I put this factorization out? So if you see now what will be this now? This is x plus 1. This is x power 2 power m minus 1 plus 1. What do you think this will be? This will be similar to this guy 1 plus x plus x squared plus so on till x power 2 power m minus 2. Okay so that's how it will work. Okay so that's why this is very easy to find if you know what you're looking for but it's okay. Doesn't matter. Okay so this is all I'm giving you all this information so that you get some more interest in going and looking at more details on this finite fields reading up a little bit more. There's a big world out there which I'm just skimming over. Okay so we should know there's lots of stuff that we are not seeing. Okay in fact if you've been doing the problems I'm sure you would have faced many such many such many such questions. Okay so the next example I want to do the last set before we move ahead is n equals 31 which means you need alpha belonging to F 32 primitive. Okay so I I'm not going to say I'm not going to even use some further knowledge of alpha. The only thing I need is what alpha power 31 is 1. Okay so that's fine we can use that. Then let's do t equals 1. Okay I want you to find degree of g of x. Don't bother about the actual expression. Okay simply find the degree. Okay do you agree degree is 5? Do you agree alpha alpha square? Okay so that so then k becomes 26. Okay so you get a 31 26. Okay it's a Hamming code I know it's equal to 3. Okay so you take t equals 2 likewise for g of x you would have degree which is 10. Okay so we'll see you'll have 10. So you would get a 31 21. Well I know it's actually equal to 5 as well. Okay so equal to 5. Okay so let's do t equals 3. Then g of x would have degree 15. You'll see once again it'll have 15. Okay in fact every minimal polynomial in this field has to have degree 5 y. Let me see I gave a gave some detail in that class which will quickly tell you that every minimal polynomial well except for 0 and 1. 0 and 1 have x and x plus 1 right. Every other minimal polynomial will have degree 5 y. Degree has to divide 5 exactly. So see minimal polynomial the degree of the minimal polynomial has to divide 5. Okay and what's the what's the only thing that will divide 5 or two things that will divide 5. 1 and 5. Okay so it can either be xx plus 1 or a fifth degree polynomial. Okay and all of them will show up here. Okay so you see this will work out 31 16 7 I'm quite sure it's 7. Okay so likewise you can keep building. Okay if you want to find the actual g of x you'll have to go look at the tables and find what the minimal polynomials are. Okay so remember I'm able to find these things without knowing what? Without tables. Why was that possible? Because I find I can find the degree of the minimal polynomial without knowing the table. Okay I cannot find the exact minimal polynomial but the degree I can find without knowing the table. Okay so just for fun you might want to do something like n equals let's say I don't know 511. Okay let's just try. Okay n equals 511. Okay then let's say t equals okay just to pain you a little bit I'll say t equals 3. Okay can you find k? Okay what's your first guess at k if you don't have to find anything what did I tell you? What will k be? n minus mt. Okay it will work out to be that good. Okay so you'll see you can actually verify that calculation. All you have to find is what? Yeah the roots of three minimal polynomials. What are the roots of three minimal polynomials? Once you verify that each of them are 9 and number you do 9 plus 9 plus 9 is a 27. You'll see k will be you will see k can compute the degree of g of x and you can find k. Okay so find k it's not too painful. Okay so if we have to list roots of f alpha of x okay it'll be 1, 2, 4, 8, 16, 32, 64, 128, 256. Right then if I have to do for alpha power 3 it will be 3, 6, 12, 24. Right it's a little bit painful. Yeah I guess we'll stop here then for alpha power 5 of x okay 5. There's a short shortcut to this also. You can quickly find the actual number okay the ways of doing it. But let's not let's not worry about it. You'll see each of these are 27 total. Okay so you'll see that will happen. So the degree of g of x is 27 so k becomes 511 minus 27 which is what? Let's do this computation. We'll do at least one number. 484. Okay so once again if you want to be amazed at how good you've been. Okay how what powerful results this means you know how to quickly generate my goodness. Okay how many code words are there 2 to the power 484 that many code words okay and you know even how to quickly generate it right. You don't have to worry about anything right given any message you can quickly generate the code word. All you do is what polynomial multiplication. That's not very hard it can be done very easily okay. Yeah so it's a one time competition it's not an online competition right. So once you find it one time and store it somewhere it's just a quick way of doing it. It's no problems okay one can do this very very fast. Okay so one more few more things to think about for instance a linear code is usually described by a basis containing k vectors. So you would think you need k distinct vectors to describe a code but notice bch code is described just by the one g of x is one code word. The reason is all its cyclic shifts become linearly independent and they are also in the code you get the okay so those are all things to think about. Okay so so a couple of things that that one you one doesn't practice okay so first I want to remark is about encoding okay. So I want to make a couple of remarks about encoding okay. So if you remember a few things I was talking about when we started out we wanted some construction where we can guarantee a certain minimum distance. If you wanted to correct n errors you should be able to produce a code with minimum distance 21. bch codes have eminently solved that problem there's no problem. That was not enough right when you want to implement it what else do you need? Need to be able to encode efficiently and decode efficiently okay. Encoding looks like bch codes have kind of solved the problem but we would like to make it slightly better okay. The reason is okay one way of doing encoding is okay if you have a message m which is m0 through mk-1 what do you do for encoding you convert it kind of think of it as a polynomial m of x which is m0 m1x plus mk-1 x to the power k-1 and then do what? The corresponding code word is m of x times g of x is there any problem with this anything that you could see as a drawback which is not the most ideal thing in the world as far as decoding is concerned or anything else is concerned okay. So one thing that this encoding is not is it's not systematic okay the message bits do not appear by themselves in the code word right you're doing m of x times g of x there's no guarantee that m of x will appear on its own okay it won't in most cases okay. So that's a bit of a problem okay the reason why that is very desired is on the decoding side once you find a code word right if it's systematic what do we know you know immediately that what the message was you don't have to undo this multiplication otherwise in the decoder what do you have to do if you find c of x remember how do we decode we find the closest code word right we always find the closest code word okay from the code word you have to go back to the message right if you do this encoding what do you have to do you have to divide once again at the decoder dividing it's not a problem okay if you're familiar with your LFSR type circuitry you know division of polynomials can be done with a simple LFSR it's very very easy to divide binary polynomials okay in in circuitry it's not a problem but then you'll have to do it it's a problem okay it's you may not you may not like it there can be some error propagation etc etc all these weird things can happen okay so you don't want to do that okay so systematic encoding gets rid of that problem okay but the point is m of x map to m of x times g of x is not going to solve that problem for you okay so what you do is you do some other mapping okay that is some slightly different mapping which still has a very simple implementation but it ends up being systematic okay so what is that is what we'll see now okay so what you do is instead of doing this the systematic encoder in a systematic encoder you can do the following okay so you take m of x and multiply it with x to the power n minus k okay so what will you get now if you take this m of x and multiply with x to the power n minus k what will you get okay in general you'll get a degree n minus 1 up to degree n minus 1 is now possible okay so you've got that okay then what I'm going to do is I'm going to divide this by g of x okay so you might wonder this division by binary polynomials maybe it's very difficult actually as I said it's very easy there's a simple LFSR circuit for division okay so it's very very easy the same when it does basically the same long division that you do okay can be done very easily you can think about it the long division is not that tough okay suppose you divide this what will you get you'll get a quotient and a reminder okay suppose I get some quotient okay I get some quotient and then I get a reminder okay what do I know about the degree of the reminder degree of g of x minus 1 right it's less than or equal to degree of g of x minus 1 what's the degree of g of x r r is what n minus k okay so this will be less than or equal to n minus k minus 1 okay okay that I know will happen r of x will have that degree what about this guy what what will be its smallest power and largest power largest power can be x power n minus 1 to what is the smallest power possible x power n minus k no other terms are there in this polynomial there are only terms starting from x power n minus k and ending at x power n minus 1 what terms does r of x have starting from constant to n minus k minus 1 so what is done is you push this r of x to this side okay once you push this r of x to this side what do you get x power n minus k times m of x plus r of x why did I say plus r of x why not minus r of x it's all binary okay equals what is this on the right hand side now I have it's a code so I know this is a code okay so instead of mapping m of x to m of x times g of x at the encoder I am going to map m of x to what x to the power n minus k m of x plus r of x where r of x is the reminder when I get when I divide x to the power n minus k m of x by g of x okay okay so one more thing to convince yourself is what two different m of x will not give me the same reminder okay you can convince yourself it's very easy to write them down okay so okay so why is this mapping systematic yeah the m of x appears by itself in the in one place right you see that okay so in this this is systematic right oh does it matter why why it shouldn't matter no okay yeah yeah yeah actually yeah that's true what am I saying actually it doesn't matter that's not the question well what I meant was you have to make sure that it's a proper mapping okay yeah basically once you have systematic any two m of x will give you two different code words you should not get to the same code word that's the thing you should check I'm sorry yeah that doesn't matter you're right okay so what do you have to check is you don't get repetition okay so that won't happen here because m of x itself is different two different m of x will not give you the same code okay so that's the systematic version okay so this is how encoding is done in practice if at all you had to implement bch codes this is how you do it okay so maybe in some dsp implementations or software implementations LFSR is not the easiest thing in the world in that case you might want to do something else but most hardware implementations LFSR encoders are most typical okay linear feedback shift registers yeah I'm assuming most people here have seen what an LFSR is in their lifetime no you've never seen a linear feedback shift register basically a string of d flip flops with connections going back okay so division can be done by LFSR okay so let me write that down okay it's a very simple LFSR circuit okay all right so that's the encoding okay so I don't want to make more comments about encoding if the systematic encoder is confusing you just do non-systematic I mean just don't worry about don't worry about systematic do non-systematic it's okay it's not a big deal doesn't kill you doesn't hurt you too much okay the thing we want to talk next is decoding okay so which is the non-trivial issue okay so what I'm going to do with the bch code is kind of set up the problem okay and then come to a state where we'll get a bunch of equations so you'll see actually doing decoding looking for the closest code word we'll convert that into solving a set of equations we already know it can be solved but all can be converted into a set of equations right that's what the syndrome decoder does for linear codes right if you remember okay we'll do some version of syndrome decoder for this okay once we come to that we will stop there kind of for the bch codes okay then I will do the complete decoder in a slightly larger setting okay so that's what we'll do now I'll kind of set up the decoding problem with bch codes and provide a solution in a larger setting for reach Solomon codes so you'll see once you know once you can decode reach Solomon codes you can also decode bch codes very easily okay it's a smaller problem okay so that's what we'll do next but I want to set it up carefully because I want to use my parity check matrix over f2 param okay I don't want to use my binary parity check matrix okay so moment I start using the binary parity check matrix I have way too many parity checks okay so and there's all kinds of confusion we saw even before the syndrome decoder is not the simplest thing in the world right we'll have to go through and do that so the way we'll set up the decoding problem as much as possible using the parity check matrix over f2 power m okay and you'll see that's the main that's the main simplification okay it's not too hard actually setting up the decoder is quite simple okay the setting is very similar to before okay so remember the decoding setting for linear codes I think it's been a been a while maybe it's not very fresh in your memory so you have a codeword c that was transmitted how do you model what happens in the channel sorry add an error vector okay so you add an error vector okay I have a distribution for these error vectors right what's the distribution for an arbitrary error vector e what is the probability of e p power weight of e times 1 minus p to the power n minus weight of e looks like people are realizing very well for the quiz okay so it's going to be excellent okay so probability distribution for e is very clear okay what's the probability distribution for c that you assume uniform okay every codeword is uniform non codewords are zero probability obviously you don't want to transmit a non codeword okay so all those things that's a simple probability and I made some argument for why you're better off hunting for e as opposed to c because c is uniform well e is it's a very skewed probability distribution you know where to start okay this is c and e and you get r okay so what's the first step in the syndrome decoder with r you find the syndrome okay so for that syndrome I'm going to say I'm going to find s equals h times r transpose and then I try to find e cap from s okay so that's that's the next next the next block okay the most likely error okay then once the output c cap is r plus okay so that's how the that's how the syndrome decoder works we'll try to build a very similar decoder or we'll try to describe the setup of a similar decoder for bch codes okay so what do we mean now this is a codeword from a t error correcting bch code okay so all these things I'll start writing down code I'll say block length equals 2 power m minus 1 and I'll say alpha belonging to f 2 power m is a primitive element okay so that means what will h be okay you know what h is now once I say that okay right that one alpha alpha square all those things I'll take okay okay so once I start thinking in terms of bch codes it's very useful to convert everything to polynomials okay right because I have a very succinct description for the parity checks in terms of roots of a polynomial okay otherwise this parity check matrix is very difficult to write down okay so for instance instead of c I will think of what c of x instead of e I will think of e of x what is e of x now right any binary vector I can put a polynomial notation right e 0 plus e 1 x plus e 2 x but it's fine I mean I can do that okay similarly once I have these two instead of r I will think of r of x okay so let's not jump and think of syndrome as a polynomial we'll keep syndrome by itself okay I don't want to think of that as a polynomial we'll stop here okay so now I want you to tell me how many bits will there be here not bits I mean okay so let me be very careful let me take a step or slowly a step at a time what's the dimension of h 2t by n okay but it belongs to what each entry belongs to f 2 power m okay remember it's an f 2 power m matrix so if I take an arbitrary vector r and do h times r transpose what will s be now remember my matrix h is f 2 power m I'm multiplying by some binary vector what will s be in general it will belong to f 2 power m okay so this will be in fact a vector in okay so 2t by 1 vector and it will be an f 2 power m vector okay it's very clear okay it will in general be a f 2 power m vector okay right and now using the same see I gave you an argument for why it is useful to think in terms of polynomials right why because then the parity check evaluation can be written as what evaluation of the polynomial at alpha alpha square so on so when I do h times r transpose what am I actually doing I'm evaluating r of x at alpha alpha square so on so what will be if I think of the syndrome vector s as s 1 s 2 so on till s 2t okay okay what will s 1 be r of alpha what will s 2 be r of alpha square so on so s 2t will be r of alpha power 2t okay so actually you have syndromes which are in which is an f 2 power m vector okay it's not a binary vector if you go back and think about the syndrome decoder right all your syndromes are binary vectors right you had 2 power n minus k syndromes for each syndrome you had to find what the lowest weight error vector was so now you have a different kind of a problem for each syndrome which is actually an f 2 power m okay this is actually an f 2 power m vector you have to find the lowest weight error vector that lowest weight error vector still remains there's no difference there still remains okay except that you're doing it differently okay so convince yourself that this is completely equivalent to the syndrome decoding problem there's no difference right what would I do in syndrome decoding I would replace each element of h by its column vector and then do the binary instead of thinking it of thinking of the vector as a 2m times t binary vector I'm thinking of it as a 2t vector in f 2 power m I'm not doing anything different okay it's the same as the binary syndrome decoding okay so I have to go ahead and solve this okay this is clear up to this point so given my r of x I can evaluate the 2t syndromes s1 through s2t okay will s1 and s2 be independent what will s2 be in terms of s1 s1 squared right s1 squared what will s4 be s2 square which is s1 power 4 what will s6 be s3 square so you see only the odd numbered syndromes are really going to be independent even numbered ones will all be dependent on the odd ones okay but it's a non-linear dependence okay it's not a linear dependence so it's all squaring and all these things okay okay so let's try to do a few more things to write this equations in a different way okay so now I know r of x is c of x plus e of x okay all right so my si the syndromes the ith syndrome si is r of alpha power i it will actually be what c of alpha power i plus e of alpha power i and I know my i is between 1 and 2t so what is c of alpha power i 0 right it'll vanish c of alpha power i will vanish okay so the only thing you get here is e of alpha power okay so that's the next step okay remember these syndromes si I can actually evaluate I can evaluate them as r of alpha power i okay but I know it is the same as e of alpha power i okay so all these are the same type of arguments I did for the syndrome decoder right I know even though I'm evaluating the syndrome with the received vector I know it is actually the it's actually h times e transpose right it's the same thing okay any questions on this okay right all right so next let's look at this e of x a little bit more closely I'll write it a little bit differently okay so I'll say suppose e of x is see e of x usually you think of it as e 0 right what do you think of it as e 0 plus e 1 x plus e 2 x squared plus e n minus 1 x to the power n minus 1 right this is what you think of it as okay suppose what this is actually x to the power i 1 plus x to the power i 2 I'm sorry I should I should write x the same way you know sorry apologize for this x to the power i 1 plus x to the power i 2 plus so on till x to the power i w so what am I saying here when I say this what am I saying I'm saying the ones in e are at positions i 1 i 2 so that's what I should suppose suppose ones in e are at positions i 1 i 2 so on till i w okay so that implies all this will happen okay so so what else am I saying here I'm saying weight of e equals what is w okay so that's what I'm supposing is that clear okay once that happens this you can write okay so now let's let's use this form of e of x in the syndrome computation okay so you see the syndrome si for okay maybe I'll use sj here okay because I've used i 1 already for one j between 1 and 2t sj is going to be what right e of alpha power j which is alpha power j raised to the power i 1 plus alpha power j raised to the power i 2 so on till alpha power j raised to the power i w okay so the standard trick here right to get rid of these alphas right is to basically do the reverse in this exponentiation so I can do it write a write a simple well it's it's a very simple thing I don't even want to call it a trick okay so it's a very easy thing to see I'll write this as alpha power i 1 raised to the power j plus alpha power i 2 raised to the power j plus so on till alpha power i w raised to the power j okay so you notice in each of these syndrome equations i 1 and i 2 and i w do not appear by themselves they appear as powers of alpha alpha power i 1 alpha power i 2 so on till alpha power i w okay so this i 1 through i w are what actually the locations of the errors what is the aim of the decoder the decoder's aim is to find i 1 to i w okay once you find i 1 to i w you are done okay that's the aim of the decoder decoder's aim is to find e hat which is actually finding the error vector or the error polynomial once you say the error error polynomial has once only in these locations then the decoder's aim is pretty much to find those locations once you find the locations you can go there and flip that bit okay you know exactly what to do okay so now we see instead of trying to find the locations of the errors i 1 through i w we'll say we'll try to find elements of f 2 power m alpha power i 1 alpha power i 2 through alpha power i w okay so i 1 through i w are what integers from 0 to n minus 1 instead of looking for integers i look for elements in f 2 power m which are alpha power i 1 alpha power i 2 so on till alpha power i w okay so instead of thinking of error locations as i 1 through i w I will think of error locations as alpha power i 1 through alpha power i 2 alpha power i 2 it doesn't make any difference just put an alpha down below okay so it's the same thing except that the advantage in thinking about it that way is my syndromes belong to f 2 power m my equations are in f 2 power m let me also solve them in f 2 power m as opposed to solving them in integers right why do you want to complicate the thing that okay so once you think of it that way you're you're solving for equations in what in f 2 power m you want the solution to be in f 2 power m which is just an easier way to think about the problem okay so that's why you'll see one of the first step that's done is people introduce what are called error locators okay i capital x i okay i will say is okay so i think i need something else here sorry x l okay is alpha power i sub l okay for l between 1 and w once i do that i can write my syndromes x j for j between 1 and 2 t as what i'm sorry this is not x j it's s j it's getting too late in the afternoon s j is what x 1 power j plus x 2 power j plus so on till x w power j okay so my the equations these are this is the equation i need to solve okay so i'm going to write it explicitly for each j so that you can see how these equations look okay so what are these things now s 1 equals x 1 plus x 2 plus x w s 2 equals x 1 plus x 2 plus no x 1 squared plus x 2 squared plus x w squared s 3 equals x 1 power 3 plus x 2 power 3 plus x w power 3 okay so on till s 2 t which is x 1 power 2 t plus x 2 power 2 t plus so on till x w power okay so these are my actual equations that i have to solve okay what do i have to solve for solve these equations for for what x 1 x 2 so on till x w what else do you have to find there is something hidden in this i'm sorry w is also hidden right you have to find w also okay that's also hidden yeah so you could do that yeah minimum possible value for w right why do i want to look for the minimum possible value for w that's my most likely error vector so that i can do my ml decoding over the binary symmetric channel okay so it's useful to keep all these things in mind so once i write these equations down there are several things you can infer immediately from these equations first of all are these linear equations no right these are equations with variables and constants in which field f 2 power m okay s 1 through s 2 t remember they are from f 2 power m okay and these are clearly non-linear equations they involve power sums okay and are they all independent can you quickly identify some dependence yeah for instance if you square the first equation what do you get the second equation right remember you're in characteristic 2 right when you square you'll get that and then likewise you'll see all the even equations can be thrown out so at best you can expect only how many equations t equations okay only t equations are there okay so once can guess that if w were to be less than or equal to t then you could probably you will probably get a unique solution okay since you have t equations which are supposedly dependent up to t equations and w is less than or equal to t one can hope for unique solution if w is greater than t you can only hope to do a list of all possible solutions in fact those things are very very difficult okay for w greater than or equal to t finding the solution is very tough okay so it's been there are all kinds of ideas about how to exactly find it there is no easy way of doing it okay so what we'll do to attack this is I mean it's it's quite a nasty equation right I mean it's not a linear equation it's tough to solve okay but if we can solve it if we can solve it look at the benefits okay if we can solve it we actually have a reasonably implementable decoder remember this is only two t equation or t equations if you want to correct 20 errors you have to solve only 20 equations okay so it's not see you never had that situation before you just have to solve 20 equations that's all previously when we were looking at it we had we never had this problem it's such a simple issue okay the problem was always you have to try out so many things so many things so many things because we did not have a nice algebraic form for those equations so finally when you get these algebraic forms you can maybe solve for it without any problem okay so if we have an efficient method for solving this set of equations we have an efficient decoder okay that is the message that I want to give you by this by writing it down okay but beyond this we won't proceed in the bch case okay we will actually do something called Reed-Solomon codes which are a generalized version of bch codes and for that decoding you'll see you'll also end up with an equation which is actually a general case of this it's more complicated than this and we'll see how to solve those once you see that this can also be solved okay so that will be the way in which I'm going to approach this decoding issue at least okay any questions on how these equations worked out clear okay so as usual we're going to see an example for n equals 15 seeing how these equations are and I'm going to ask you to solve it for n equals 15 it's not that difficult you'll have to solve it and only have 16 you can try it we can do decoding okay kt equals 1 is really trivial okay it's the Hamming code you know how to decode the Hamming code you can do it even in the binary case right should do you want to try t equals 1 or not how many of you here want to try t equals 1 okay we'll try t equals 1 I think you should try t equals 1 okay so we'll start with the alpha belonging to f 16 satisfying alpha power 15 is 1 and then alpha power 4 is 1 plus alpha okay so I'm going to try t equals 1 I'll give you r of x okay when I give you r of x I'm actually giving you r the entire received vector you have to give me what c of x is is that clear that's the problem okay I'm going to say x plus x power 4 let me see you will get stuck believe me the w is a problem okay so to deal with w best way for dealing with w is try to start with w equals 0 if that doesn't work go to w equals 1 that doesn't work go to w equals 2 etc okay so we will not see if t equals 1 we'll only go to w equals t we won't go beyond that okay so that's the logic here start with first w equals 0 which means what no errors which means what all syndromes must be 0 okay so once you compute the first syndrome you'll know whether w equals 0 is valid or not and all you have to do is okay in the Hamming code actually w equals 1 will always work so it's not a problem okay you can go back and refer to your tables I think I've written down this table several times or you can use many of these relationships in this case it's very easy so what's the first step in the decoder finding the syndrome right in this case you're finding s1 and s2 okay s2 you don't really have to find what is s1 1 okay so obviously w equals 0 is ruled out okay so now if you say w equals 1 what should s1 be equals x1 okay so you take w equals 1 right so what is x1 equals 1 that's all which is alpha power 0 which means there was an error in the 0th position right is that clear okay error in the 0th position and c of x became 1 plus x plus x power 4 okay so it's very simple okay is that clear okay so it's a very easy case maybe it's too easy for people to try out okay that implies i1 equals 0 and e of x equals 1 and e hat of x okay remember that and c hat of x is 1 plus x plus x power 4 okay so try another case I'll give you some complicated one which will make you look for x power 10 plus x power 7 even though it looks fancy you won't need the tables if you're smart you can just use okay so what is s1 you mean see I need s1 as a power of alpha okay it's the only thing alpha power 6 okay so there is a there's an easier way to figure it out if you haven't it's okay this equals x1 assuming w equals 1 that implies what i1 is 6 okay is one error and you've nicely solved it e hat of x is x power 6 and c hat of x is x power 6 plus x power 7 plus x power 10 I don't know man you tell me alpha power 4 plus alpha equals 1 you multiply that by alpha power 6 you'll get alpha power 10 plus I don't know I'm using such simple tricks to give you examples okay so t equals 1 as you're saying is very easy okay usually it's really nothing much okay it's just a hamming code and you know decode it in binary the non-trivial thing is to do t equals 2 okay so that's the first time we'll do a t equals 2 okay I'm going to just throw out an r of x okay I have no idea of how the solution is going to work out okay maybe maybe I have some idea maybe I'll write down something which is okay so okay that's my r of x okay for t equals 2 you need what s1 and s2 well s3 all right yeah s2 will be very easy s1 and s3 you need what is s1 let me see alpha power 11 everybody agrees okay what is s3 okay well what will be s2 let's compute everything what will s2 be alpha power 22 which is the same as alpha power 7 what will be s3 alpha power 10 okay how many of you agree if you disagree let me know then s4 will work out to be alpha power what will s4 be square of s2 right which is alpha power 14 okay again let's let's say there are two errors okay I know we can correct up to two errors so maybe I'll start with assuming there were two errors okay so there's a way to properly do it assuming zero error one error two error we'll see later on just for now we'll say let's say there are two errors and then what is x1 s1 should be x1 plus x2 what will s2 be x1 squared plus x2 squared what will s3 be x1 power 3 plus x1 power 4 oh I'm x2 power 4 I'm sorry and what will s4 be x1 power 4 plus x2 power 4 okay I know these two are dependent right okay oh yeah you're right sorry okay I know those two are dependent so I won't get anything useful out of it can you solve these two equations is the question x1 plus x2 equals alpha power 11 and x1 power 3 plus x2 power 3 equals alpha power 10 if you can solve it in f16 if you can find two elements of f16 right they have to be elements of f16 right obviously alpha power something okay two elements of f16 which solve this equation what have you done you've actually done decoding okay go ahead let me see who's going to give me the two elements five instead of 10 now okay somebody has to check and tell me can anyone check this what is s3 so you got six okay looks like this alpha power 10 is in doubt yeah I think I believe five okay I think five is the right answer I've done a back calculation in my head which tells me five should be the right answer it could be wrong but looks like five is the right answer okay okay so you see the problem here right immediately you see it's a non-linear equation x1 power 3 plus x2 power 3 you don't know what to do with it okay what would be your first instinct what will you try first if you see two equations like this different people are different first instinct that's the problem okay one easy thing is first equation is linear no so I can say x2 equals alpha power 11 plus x1 right and then maybe I'll plug that in here then what will I get I'll get a degree 3 who knows maybe a degree less than 3 who knows I mean maybe I'll get a quadratic equation maybe something will happen you know right but even if you get a quadratic equation how do you solve that in in f16 it's not very clear right right why is it difficult to solve a quadratic equation in f16 so maybe square root you can define you have powers but what can you not define there's a division by two which you cannot do in a characteristic two field okay so right what's your formula for this quadratic field the solution for quadratic equations minus b plus or minus all that is fine but divided by 2a so you can't you can't do that two will two will kill you can't divide by two so that's the problem so you can't directly solve also but what's the only way what else can we do how else can we solve yeah just substitute and try why because f16 has at the end of the day only 15 elements right what's so hard I mean you're able to solve the reason why you need all those things because you can't substitute just substitute and check you'll get it okay there's nothing and in fact even in the most complicated implementations that is what is done you simply substitute one element after the other to check if it's the root okay well it's done in a more slightly different way but pretty much that is what is done that's the only thing you can do okay so let's try that okay i'm going to take two more minutes hope it's so i'm i have to teach 430 you know i'm doing fine okay so let's do x2 will be alpha pa 11 plus x1 i'll put that back in here so i get x1 plus x1 pa 3 plus what will i get if i raise it raise this to the pa 3 okay i'll do it in two steps i'll say alpha pa 11 plus x1 squared times alpha pa 11 plus x1 can i do this so why did i do this square first square is very easy no i know i know how to square okay so then try to do a simplification here you'll see the x1 pa 3 will cancel it cancels and you'll get a quadratic what's the quadratic you get alpha pa 11 x1 squared am i right plus alpha pa 7 x1 plus alpha pa 18 plus alpha plus alpha pa 5 what is that alpha pa 3 okay so i'm being told this is my equation maybe i can clear out 3 here okay i can multiply throughout by alpha pa minus 3 so that i'll get some alpha pa 8 x1 squared plus or maybe multiply throughout by alpha pa minus 11 do one of those things okay did i get that right oh plus alpha pa 5 yeah simplify and tell me what the final thing is alpha pa 11 everybody is convinced okay so the equation that i'm actually getting is x1 squared plus alpha pa minus 4 which is actually 11 no x1 plus 1 equals 0 is this the equation okay yeah i think go ahead substitute tell me one x1 which couldn't possibly solve this try numbers between well between 7 and 8 alpha pa 7 and alpha pa 8 okay do you get that do you get x x1 equals alpha pa 7 is okay okay you will get two solutions one will be x1 equals alpha pa 7 other will be x1 equals alpha pa 8 do you get that you agree or did you check you get that yeah then 7 will also be a solution okay so those are the two solutions and what will be what do you think will be the x2 corresponding to each of these things alpha pa 8 and alpha 1 okay okay so what are the two error locations then 7th and 8th position so what's my e hat x pa 7 plus x pa 8 so what's my c hat x pa 9 plus x pa 8 plus x pa 7 plus x pa 5 plus x okay that's my c hat okay so if you go back and think about how i started off defining decoders for linear codes and optimal decoders right what did we do imagine that picture star picture okay so i have two power seven code words in this case it's a 15 seven code right the two error correcting one two power seven code words this is actually what 128 code words of length 15 from the received vector the closest code word will be this c hat of us okay in this case it will be no i mean there is no code word at distance one away this this code word at distance two okay it will be this okay so we have not done it by brute force we have done it by solving an algebraic equation which came from looking at the syndrome over f 60 okay so that's the that's it okay so we'll stop here