 So, this is lecture 15 and the last thing we saw in the previous lecture was decoding BCH codes. So, I did not really go through the entire process, but I gave you a feeling for why using this notion of error locators, you can convert the decoding problem into solving a set of equations in F2 param, so how do you efficiently solve those equations becomes the decoding problem and we saw an example where eventually at the end of the day we had a quadratic equation for which we had to find the solution by brute force by searching through all the elements of F16, that was the last example that we saw. So, we will now generalize and move on to Reed-Solomon codes and we will see the decoder for Reed-Solomon codes in some more detail, not in full detail, but some more detail. So, this lecture is going to be about Reed-Solomon codes. So, the way I am introducing it you are all going to go away thinking that Reed-Solomon codes are a generalization of BCH codes. There are so many other ways of teaching it which will look at Reed-Solomon codes in a completely different way. So, the way I am doing it is to show you the connection between Reed-Solomon codes and BCH codes, there are other ways of doing it as well. So, it is a very small modification at the end of the day if you look at it. So, how did we define BCH codes, we defined a parity check matrix and then we said all binary code words that satisfy H times C transpose is 0. For Reed-Solomon codes you simply drop the binary requirement, that is all, say all vectors over F2 power m which satisfy H times C transpose is 0. When you go back and work your proof for the minimum distance you will see the proof really did not require anything about the binary vectors, same thing will work with non-zero entries and non-binary, ok. So, this is the first time we are going to look at non-binary codes, ok or codes over F2 power m, ok. So, far we have seen binary codes always, but we have had parity check matrix over F2 power m, but we still had only binary code words. Now, we are going to have codes over F2 power m, ok, but this should not surprise you at all, ok. So, how did we define a linear code, what was a linear code at the end of the day when we looked at the vector space description, what did the linear code become, it is a subspace, it is a subspace of the, of some vector space, right. So far when we looked at binary codes, what were binary codes? Binary codes one can think of as a subspace of this F2n, ok, so some length n binary code is a subspace of F2n, ok, n dimensional binary vector space, ok. So, what will be a code over F2 power m, ok. So, very simple extension, there is another way of calling it, you can also call it a 2 to the m re code, 2 power m re code, ok, that is another way of saying it, ok. That is a very simple extension, you simply say it is a subspace of what, F2 power m n, ok, so it will be a length n code, ok. So, your basis vectors, your generator matrix, your parity check matrix, all of them will now have entries over F2 power m, ok, and you will have to do all your linear algebra over F2 power m, that is all, other than that, every other result will carry over without, without any major modification, ok. So, for instance, I can talk about a n k d code, ok, I have to talk something about distance, I will come to it over F2 power m, ok, what are its various parameters? This would be a k dimensional subspace of, of what, F2 power m n, ok, the n dimensional binary, not n dimensional, 2 to the m re vector space, n dimensional vector space over F2 power m, ok. So, how would an arbitrary code word look, some code word, if you have code word C, how will it look? Well, I do not want to say alpha, I will say C, C0, C1, so on till Cn minus 1 and all these CIs will come from what? F2 power m, ok, it is an n dimensional vector over F2 power m, ok. Each of these guys, as he pointed out, it is some alpha, power of alpha, where alpha is a primitive, primitive element of F2 power m or they could be 0, ok. So, it is either 0, 0 also belongs to that, ok. So, you see all that is possible, 0 or some power of alpha, some 0, 1, alpha, alpha part and whatever, you know, I mean all those things can show up here, ok. So, the first question is, what will I do with such a code? Ok, what will I do with all these alphas? I cannot transmit alpha on a link, right, I have to ultimately transmit, only bits, ok, what will I do with these alphas, what is the connection? Ok, so everybody knows the answer, right, so it is a very simple thing, ok. So, every alpha power whatever you know, you know it can be represented as m bits, ok. So, each thing is only m bits, I know I have a vector notation. So, I will only transmit those m bits, ok. So, when I think of this code word in practice, how many bits will this contain? m times n, ok. So, if this has a m times n bit notation, representation in practice, ok. So, you should keep that in mind, ok. So, when I say a length n code, length n binary code, I know my block length is n, ok, I will have to transmit n bits. But when I say a length n code over say g or f 256, over f 256, it is actually 8 times n bits, ok, or n bytes, ok. So, the size becomes so much larger, ok, it increases by m, ok. So, it is several times very common to call each of these CIs as symbols, just to distinguish them, ok. Sir, how do you define d and f 2 for m? I am going to come to it, come to it, please be patient, ok, I am going to come to it, ok. So, each of these CIs just to distinguish, I would refer to them as symbols, symbols over f 2 power m, ok. Do not confuse them with QAM symbols and PAM symbols and all, that is a modulation question, ok, that is far removed from where we are, ok. So, when I say symbol over g f 2 power m or f 2 power m, what do I mean? Some element of f 2 power m, ok. So, just to refer to it as something, each of these things are called symbols. Sir, like where should we go back to this? You want to do multi level type thing, yeah. If you want, you can do that also, but usually it is done by going back to bits, ok, you can do it. So, you have to see it as bits at some point, because today all communication is binary, you know. So, somebody will only give you a bunch of bits and ask you to transmit, you would not ask you to transmit a bunch of levels, right. So, you have to go back and forth, ok. So, this is how you think of an arbitrary code word, this k dimensional subspace, ok. So, how many vectors do I need to describe my code completely? I need k basis vectors, right. I can arrange them in a generator matrix, ok. So, if you think of a generator matrix, ok, g, this would be what? This would be a k by n matrix and the rows g 1 to g k, ok, these will all be vectors, this form a basis, ok, basis for the code, ok. So, I can form a generator matrix. Likewise, I can have a basis for the dual, ok. How do I define the dual now? Again, I will need a dot product. Now, the dot product also is defined the same way. How will I take dot product of 2 x and y and f 2 par m? Simply summation x i, y i, ok. So, that is the same thing, there is no difference, ok. So, all these things, same null space definition, all these things will follow from linear algebra, nothing will change. So, I can define a parity check matrix also, ok. And the rank nullity will also be true. So, rank plus nullity will be equal to n and you can define a lot of things, ok. So, all these things are true for any field. I do not have to worry about proving all this once again. So, my parity check matrix h should be what? n minus k by n, ok. And if you want to think of the rows as h 1 to h n minus k, ok. So, h 1 to h n minus k will form a basis for what? For the dual, ok. All these things will nicely carry over, there is no problem, ok. So, like we asked the crucial one minor difference is minimum distance. What is distance, ok? So, in the binary case, how did we define distance? What is the hamming distance between two binary vectors? Number of places in which they differ. Can I and can I use the exact same definition for vectors over f 2 par m? I can use the exact same definition. Number of places in which they differ, ok. There is no change in the definition. That is the definition for hamming for the distance that I am going to use, ok. There are other distances more complicated, but this is the simplest distance that we can use, ok. So, the hamming distance. Number of symbols. Number of symbols, number of places in the vector, ok, number of symbols, ok. So, if I have two vectors x and y in f 2 in the n dimensional subspace, the hamming distance, I will define it as a hamming distance between x and y, ok, is number of places in which they differ, number of positions in which they differ, irrespective of how they differ, ok. If you take there, for instance, if you take the m bit representation of each symbol, they might differ in one bit or all m bits, but still it is counted as only one, ok, number of symbols in which they differ, ok. So, the number of bits, now how they differ as symbols is relevant to me, ok. So, you might say alpha and alpha square in some way are closer than alpha and alpha par whatever, 120, but I do not care. Both of them are different, that is my definition, ok. As I said, there are other metrics which are more complicated, but we do not care about that in this course at least, ok. So, what about hamming weight, ok, number of non-zero positions, ok, again that is the same definition, ok. And immediately the same relationship between hamming weight and hamming distance will follow, ok. The hamming distance between x and y will be the same as the hamming weight of x minus y, it is minus y or x plus y in F2 par, ok, that will also follow, ok, the same relationship, ok. It should be actually x minus y in the characteristic 2 case, I can happily write it as x plus y like we did for the binary case, ok. So, that is the notion of distance now and based on this now you can see how the d and k d will come through, ok. So, the minimum distance of a code, how will you define now? It is the same definition, ok. So, you can define it in two different ways. The proper way of defining it is what? Distance is the minimum number of places in which any two different code words differ, ok. So, you can do the same derivation since it is a linear code, you can show it will be the minimum weight of a non-zero code, ok. Both of those will come, ok. So, this d will be minimum number of places in which two different code words differ, ok. This you can show is the same as minimum weight of a non-zero code, ok. And then you can use the parity check and say what? Minimum number of linearly dependent columns of h, ok. All those things will follow. Notice in the binary case we could say minimum number of columns that add to 0. In this case you have to be more careful. You have to say minimum number of linearly dependent columns of h, ok. So, all these three characterizations for d, the minimum distance of the code continue to hold even in codes over f2 power m, there is no problem there, ok. Is that clear? Ok. So, even syndrome decoding will hold, ok. For instance, you can extend all those things, ok. So, you can do minimum distance decoding, right. Given a received vector, I can look for the closest code word. I can do all that, ok. Everything will extend. There is no reason why all those things should not extend, ok. So, once I have a distance like this, everything will work, ok. Just that you will have more code words to worry about, ok. So, how many code words will I have in an nk code over f2 power m, ok? You will have 2 power m raised to the power k, ok. It is not 2 power k, ok. So, you see this becomes 2 power mk, ok. So, you have much larger number of code words to worry about, ok. So, each message symbol, ok. Now, we have to think of message as k symbols over f2 power m and not k bits alone, ok, which is actually m times k bits, right. So, 2 power mk makes sense, ok. So, you get that you have a lot more code words, ok. So, if I take one received word, ok, if I take one received word, ok, how many words are there, a distance 1 away from it, ok. In the binary case, it was exactly n, right. You can change anyone. Here will it be n, ok. Yeah. So, it see n will only tell you with symbol in which it differs, in which place in which it differs. And then for each place, you have how many choices? You can differ in 2 power m minus 1 ways, ok. It cannot be exactly 2 power m because one of them will be 0. Do not differ in that way, ok. So, it will be actually n times 2 power m minus 1. So, all your bounds will change slightly. The singleton bound will not change, but your hamming bound and your Gilbert-Vashemov bound will change slightly, ok. So, those things will change, ok. So, there is no time to go through that in great detail here. But if you see it in the book, you will see those factors will show up. You remember the hamming bound and all that picture, the geometry picture was based on number of vectors that are a distance 1 away, distance 2 away, ok. All those things will change. There will be these additional factors that are carrying over. The singleton bound continues to hold, ok. So, that is one thing which continues to hold. Remember, how did we come up with the singleton bound? Do you remember the argument? Ok, the argument I gave was, write down all the code words one below the other and look at k minus 1 positions. There should be at least 1 overlap, which means maximum distance can be n minus k plus 1. The same thing will carry over. So, you can show d is less than or equal to n minus k plus 1, ok. This continues to hold. The other bounds will differ slightly. I am not going to write down how they work out, ok. All right. So, now, let us come back to Reed-Solomon codes. What did I say? Reed-Solomon codes, they are codes defined over f2 power m, ok. So, it is parity check matrix and generator matrix, all of them will contain elements from f2 power m. It is a code over f2 power m, ok. So, I am going to give the parity check matrix for a t error correcting Reed-Solomon code, ok. So, what about error correction now? All those things we have to define carefully. If d is 2t plus 1, I am going to say it is t error correcting. The same thing holds, ok. So, let me define the other way, ok. So, the error correcting capability is defined as follows. t is b minus 1 by 2. It is the error correcting capability. Remember, is it, this is, what is this? Is this the number of bits or the symbols? Ok, but will it also be the number of bits? Error correcting capability, sorry. Will it also be the number of bits? And I think about it, ok. I will come back and comment on it later, but this is a, this is an issue that is worth thinking about. What is the actual error correcting capability for a code over f2 power m when I define minimum distance like this, ok. So, t is d minus 1 by 2 is an error, is there a correcting capability? Yeah, you are right. It is in terms of symbols. If there are so many symbol errors, I should still be able to recover, but there could be exactly so many bit errors and you would get so many symbol errors also, right. So, ultimately when we think about it in action, you will see how it works out, ok. I will come back and draw that picture, but I want to define the Reed-Solomon code before I write down how I am doing it, ok. Let us define the Reed-Solomon code, ok. Finally, we are ready for the definition. Error correcting Reed-Solomon code, ok. With length n equals 2 power m minus 1 is defined by the parity check matrix that we have been using all along, ok. The standard BCH parity check matrix, ok. Let me write that down once again, 1 alpha, alpha squared, so on till alpha power n minus 1, 1 alpha square, alpha square squared, so on till alpha square raised to the power n minus 1, all the way down to 1 alpha power 2t, alpha power 2t squared, so on till alpha power 2t to the power n minus 1, ok. Ok. So, I should be very careful here. An important addition over f2 power m, sorry. Apologize for that, ok. It is an important thing over f2 power m. What is alpha? Alpha belonging to f2 power m is a primitive element. So, what is the most important difference between Reed-Solomon and BCH code? The code words can have entries from f2 power m while in BCH codes, we define pretty much the same parity check matrix, but we said the code words will have to be binary, ok. What? So, once I have let this, let this assumption go binary, I am saying code words can be from f2 power m, right. They will have to worry about a couple of things, ok. So, first thing is the block length is given to you in the code n, n is 2 power m minus 1 that is very clear, ok. You immediately worry about the two other things, ok. Minimum distance and dimension, ok. Minimum distance I am saying it is T error correcting, which means I am saying the minimum distance is greater than or equal to 2t plus 1. I know for the BCH codes that was true. Will it be true if I relax the assumption of letting non-binary code words is the question, ok. I want you to go back and look at the proof the way it was written down. You will see essentially what did we use finally. If you had a code word of error or code word of weight w, what should happen? There should be w columns, right. There should be a sub-matrix which would have rank less than w, right. That is all. That is the only criteria, ok. So, the linear independence is the only thing. There is no nothing else I have used, ok. So, the bound and the proof based on the Vandermond matrix will carry over without any major modification, ok. So, it will work out exactly the same. So, you can easily show by the same proof, ok. Same proof as for the BCH case, the minimum distance will be greater than or equal to 2t plus 1, ok. So, that is the first thing. And the next thing you worry about is dimension, ok. So, again, what was the trick we used for dimension in the BCH case? What was the trick we used? The minimal polynomial, right. And before that, basically we viewed the code words as polynomials. Once you view it as a polynomial, we saw all that was required was alpha is the root of the polynomial, alpha square is the root of the polynomial. So, until alpha part 2t is the root of the polynomial. The difficulty we had there was these code words have only binary coefficients. We could not enforce this, we needed minimal polynomials. Here what will happen? We do not care what the coefficient of the polynomial is. It is ok. If it is f2 param, it is f2 param. I do not care. So, in fact, describing the code words will be much easier in this situation, right. How will it work? Let me see. Yeah. So, ultimately that will happen. See, you can say if c is a code word, c0, c1, cn minus 1 is a code word, if c is a code word, ok. Start by thinking of c of x as c0 plus c1x exactly as before, ok, c2x square plus so on till cn minus 1, x bar n minus 1, ok. In fact, we have a much easier situation than the BCH case, ok. So, this will happen. Then what will happen? c of alpha is 0, c of alpha square is 0, so on till c of alpha part 2t is 0. This means what? x plus alpha divides c of x, this means what? x plus alpha square divides c of x, so on till x plus alpha part 2t divides c of x. Is that clear? From here to go to the generator polynomial, we have to do LCMs of minimal polynomials in the binary case because we wanted the code word also to be binary. Now, we do not care about those things. So, what is the only thing? Just the product of all these things. Because, you know, there is no common factor here. None of these things will divide the other, right. They are all irreducible. Very easy to see the degree 1. So, obviously, the generator polynomial, ok. So, let me not immediately jump to the generator polynomial. Obviously, c of x is a code word. If and only if it goes both ways, ok, c of x equals m of x times what? x plus alpha times x plus alpha squared, so on till x plus alpha part 2t, ok. So, you mark out this polynomial and call it the generator polynomial. So, the generator polynomial is much easier in the Reed-Solomon case because I do not care about c of x having coefficients from f 2 power m, ok. So, I will go through multiply and then take any m of x I want. So, what is the degree of g of x? 2t, ok. And the degree of c of x at most can be n minus 1. So, what is the maximum degree possible for m of x? n minus 2t minus 1, which means the dimension k is n minus 2t, ok. So, this degree is less than or equal to n minus 1. So, this implies this degree here is less than or equal to n minus 2t minus 1, ok. So, that implies my k equals n minus 2t, ok. Is that clear? All right. So, now from the BCH bound we had d greater than or equal to 2t plus 1. Now that I know k equals n minus 2t, what does my singleton bound tell me? Do the computation, ok. If you use a singleton bound you will see d will be less than or equal to 2t plus 1. So, here in one case d being greater than or equal to 2t plus 1, another bound is telling you d is less than or equal to 2t plus 1. So, what is the only way? d has to be equal to 2t plus 1, ok. So, using singleton bound and BCH bounds we will get d equals 2t plus 1. So, in fact, my t error correcting rs code over t error correcting rs code is going to be what? Over f 2 power m is going to be 2 power m minus 1, right. 2 power m minus 2t minus 1, right and 2t plus 1, ok. I gave a name for codes that will satisfy the singleton bound with equality. What was the name? MDS, right, maximum distance separable, ok. So, you see easily the satisfy the singleton bound. So, this becomes an MDS code. These are MDS codes. One of the most famous examples of MDS codes. All right. So, I am sorry. I am sorry. Yes. It is correct. No, n minus 2t, ok is n minus 2t. Do you want me to write it as 2 power m minus 1 minus 2t? It means the same. What is the question? I am a little bit confused. This is n, no. This is n. I am sorry. This is not clear. This is n. This is n minus 2t. That is d, ok. I just wrote the 2t before. So, it is a little bit confusing. It is not clear on the screen, ok. So, these are the one of the famous examples of MDS codes. Ok. So, the next thing is to look at examples, ok. So, the first example we will start with, we will do, I will take RS codes over F4, ok. They are the simplest codes, ok. So, you will see it is not too many of them out there, but you can at least start with this so that we get used to the idea and then we will see how it works out, ok. So, what is my n going to be? 3, ok. Suppose I say t equals 1, then what is g of x, ok. I need alpha, no. I will take alpha belonging to F4 primitive so that alpha power 3 is 1 and alpha square is 1 plus alpha. What is g of x for t equals 1, n equals 3? x plus alpha times x plus alpha squared, ok. Go ahead and simplify it. What do you get? x squared plus x plus 1, ok. So, what is k? k also is very easy, no. n minus 2t, which is 1. You do not have to do the calculation. You do not need g, you immediately know k is 1 and what is d? d is equal to 3, ok. So, I want you to write down the code words. What is the code itself? k, your m of x will have degree what? 0, right. So, it will be only, it will only be a constant. So, how many possible values will you have? 0, 1, alpha and alpha square, 4 different possibilities. So, you multiply g of x with 0, what do you get? 0, which will be 0, 0, 0. Then multiply it with 1. You will get 1, 1, 1. Multiply with alpha. What will you get? Alpha, alpha, alpha. Then multiply with alpha square, what do you get? Alpha square, alpha square, alpha square, right. Those are my 4 code words, ok. It is a 3, 1, 3 code. Any 2 code words, different 3 places, right. k, do you see how I got this? Do you see how I got these two, these things? Is it clear? You just multiply with m of x. Yeah, m of x is just m0. There is nothing more to it. Put different values there. You will get different code words, ok. Is that clear? Ok, when you use it actually in binary, ok. Suppose you were to think of this as using it in binary, ok. How will it look? Ok, supposing I say I can only transmit bits. I cannot transmit alpha and alpha square. What, how will it look? You just gave me the idea, no? You have to replace each element with its vector equivalent. What is the vector equivalent now? 0, 1, alpha, alpha square. What is the vector equivalent? 0, 0, 0, 1, ok. Maybe I put alpha here. I put 1 here. 1, 0 and then 1, 1, ok. So, in binary this becomes what? 0, 0, 0, 0, 0, 0. This becomes what? In binary, ok. This is binary equivalent. Binary expansion. We will call it binary expansion, ok. That is a expansion or image. It is called binary expansion or image, ok. 0, then 1 becomes what? Yeah, 0, 1, 0, 1, 0, 1. Then alpha becomes 1, 0, 1, 0, 1, 0. Then alpha square becomes 1, 1, 1, 1, 1, 1. So, if you notice this, even the binary expansion will in fact be a binary linear code, ok. You add any two code words here, you will get another code word, ok. What is its block length? The binary expansion. What is the block length? 6. What is its dimension? 2, right? 2. Binary expansion, it is 2. 2 times 1. It is very easy to see that, ok. 2 times 1. And then what about minimum distance? Continues to remain as 3, ok. It does not become 3 times 2. Yes. Continues to remain 3, ok. Is that clear? What about error correcting capability now? It is supposed to be one symbol. Any one symbol error, I can correct, ok. But notice, when I actually transmit in terms of bits, this one symbol error, I can induce with just one bit error. I do not need two bit errors to induce a symbol error, right. Just go to one symbol and introduce one bit error. I will get a symbol error. Finished, I am done. So, even though I can correct one symbol error, which sounds like a major achievement, in fact, I can only correct one bit error, ok. But there are several two bit errors which can be corrected, right. As long as the two bit errors are fixed in one symbol, I can correct. What if it is spread over two other symbols, I cannot correct, ok. So, only one way, one symbol error, one bit error is correctable. Two bit errors are not correct, ok. So, that is the, that is the interplay here. So, one needs to think about that. I am sorry. Yeah, if it is within the same symbol, you can correct more than one bit error. But if you want to look at error correcting capability, how did we define error correcting capability? All error vectors of that weight should be correctable. So, you cannot say two is the error correcting capability, because there are error vectors of weight two which are not correctable, even in binary, ok. So, that is the way you define it, ok. So, that is the simplest case, ok. What do you think will happen if I put t equals 2, ok. It does not make any sense, ok. So, 2t becomes 4 and then you will get alpha power 4. You cannot do that with f4, ok. So, t equals 1 is the only reasonable case in f4, ok. So, let us move to the next example which is f8, ok. And I want to use alpha belonging to f8 with alpha power 7, 1 and alpha power 3 is 1 plus alpha, ok. You might have to do some minor arithmetic here. Suppose if I say t equals 1, what will happen? g of x is going to be x plus alpha times x plus alpha squared, ok. And k is going to be, well n is going to be 7, right, that I knew already, ok. k is going to be 7 minus 2 which is 5, ok. So, this will be a 7, 5, 3 code, ok. Do you think I should make an effort to list out all the code words? How many code words will I have? I think your instinct is always to say 2 power 5, but remember this is a code over f8, ok. It is 8 power 5, ok, 2 power 15, ok. So, it just goes off to a huge number, ok. So, 32,000, ok. I cannot, I cannot write down all the code words, but what do I know among those 32,000 code words? Any two code words will differ at least in one symbol, ok, one symbol, ok. So, now, if I do a binary expansion here, what will happen? Ok, my block length will become 21, right. I have a symbol, I have 7 symbols in the code word. Each symbol will be replaced with 3 bits. So, 7 times 3, it will become 21. My dimension will also become 5 times 3, ok, 15, ok. One might say it requires proof, but it is not too bad to, it is not too difficult to prove this. You can easily argue also why it should be 15. Why? How many different, just now I told you, right? There are 2 power 15 different code words. So, obviously, it will be a dimension 15, ok. And unfortunately, the minimum distance you can only say is greater than or equal to 3. And in fact, in most cases, it will be equal to 3. This is a reasonably, at least in the Reed-Solomon codes, the way I have constructed it, it is a pretty good bound also, ok. So, 21, 15, 3 only, ok. You do not get that much here when you go to the binary image, ok. So, this is how you would actually use it in practice. But when you think of it, you can think of it as a 753 code over f8, f21, ok. If you want, you can simplify the gfx and look at some code words just to get some, just to get the hang of how the code words would look, ok. So, it is possible to do all these things. You can do t equals 2, ok. gfx would be what? x plus alpha, x plus alpha squared, x plus alpha power 3 and x plus alpha power 4, ok. And then this would be a, ok. I do not want to go through the simple calculation. 735 code, ok. Again, how many code words does this have? 8 power 3, it is like, what is 8 power 3? 2 power 9, 512, ok. So, 512 is still a large number, but any two of them differ in five places. If you want, you can think of the binary expansion. It will be a 21, 9. Again, 5 code. In most cases, it will be 5, ok, right. Think more about error correcting capability and make sure you understand the distinction. You can correct errors in two symbols, ok. But you can induce those two symbol errors with just two bit errors, which means you can, you are only guaranteed to correct two bit errors, ok. Yes. Yeah, yeah. Yeah, yeah. Here, yeah. So, her question is a very valid question. I was hoping somebody will ask this question. Why do I have to go to some F8 and do some fancy re-solving construction and give you just a 21, 15 greater than or equal to 3 code? I know how to construct a 21, 15, 3 code. I hope all of you do, right. In fact, you can construct a 21, 16, 3 code. Can you not, right? Using the simple construction that we have been doing, what is the big deal? The big deal comes not at F8, ok. If you go to F256, ok. Suppose I go to F256, ok. That will be my third example. And this what? Let's 255. I will take alpha belonging to F256 being primitive. Suppose I say t equals 16. I want 16 error correcting capability, ok. So, what will be my g of x? x plus alpha powers so on till x plus alpha part 32. So, what is this code now? 255, 223, 33 code, ok. Go ahead and do a binary expansion. What will you get? Ok, I want you to try this. This is not too difficult. You know, multiply by what? 8. 255 times 8 is 2040. What is 223 times 8? 19. 19? It can't be that high. 1784. 1784, ok. And let's just accept 33. I don't care, you know. I mean, maybe it can be larger than 33. I will just say I will accept 33. When I think this is very tough, constructing a code of such large block lengths in binary being able to correct 16 errors and guaranteeing 33, ok. Again, another point where you should be amazed at what you have learned now. You know how to construct how many binary vectors of length 2040. 2 power? 1784. 1784. And what can you guarantee? Any two of these vectors will definitely differ in at least 33 places, ok. You can correct 16 errors, ok. So, it's that's the power. Not only that, you can describe every code word in this. How? How do you describe each code word in this? You don't need a huge 1784 by 2040 matrix. What do you need? In fact, you don't even need that size matrix. You only need a 32 by 255 matrix over f256. Look at the amazing way in which it has come down, ok. It is, you only need f256. You don't need f2048 or something. You need only f256, ok. And you only need a 32 by 255 matrix, ok. So, those things are great simplification when it comes to, simplifications when it comes to implementation and understanding. Yeah. Yeah, well, I wanted to comment about it as the closing remark for this class is brought it up. You can do the exact same systematic decoding as we did for BCH codes. What is the systematic decoding idea? Instead of associating m of x with m of x times g of x, you take m of x, multiply by x bar n minus k divided by g of x, the same division with reminder of follows. So, you can do systematic encoding also. So, in fact, if you go to most people in industry, the way they would think of reach Solomon codes is as follows, ok. So, I will simply write it down here. I say systematic encoding extents, ok. You go and talk to most people in industry. See, they would always think of reach Solomon codes over f256, right. This is the standard in the industry. Nobody uses anything other than f256. Pretty much, in most places they use that. They would say, give me a message m, ok. Give me a message m, ok. And suppose I want to correct t errors, ok. My message m can be some k bytes, ok. I love to add how many parity bytes, 2t parity bytes. This is my message and I want to correct t errors. This will be 2t bytes of parity, ok. So, this is what they would talk about as a reach Solomon code. This is what it allows you to do. Give me k bytes. I will give you, for if you want to correct 8 errors, I will have to add how many bytes of parity, 16 bytes of parity and do it. How do you actually do it? I mean you would know how to do it, right. Represent this as m of x, multiply by x power n minus k, which is x power 2t, right. n minus k is 2t, x power n minus x power 2t. Then divide by g of x, which you know from f256 and take the reminder. The coefficients of the reminder are your 16 or those are your 2t parity bytes. You would know that, ok. So, there is a relationship between, I mean you might be worried about the relationship between k and 255, right. Now, you are thinking of k as what? 255 minus 2t, right. But I can always shorten, ok. So, I can always shorten. I know if I have an nk decode, I can always get a n minus s comma k minus s comma same t, same decode, greater than or equal to d, but same decode is possible, ok. In this case it will become exactly, ok. So, you can shorten. So, this k can be any number less than 255. You do not care. So, in fact, if you look at the early CD standards, this k will be something like 28, 32, because that is the only thing that they could handle. That is the length they could handle. So, it was a very small number, but you can think of it this way, ok. So, this is how people think of Reed-Solomon codes, you should. Ok. So, this is where we will stop with introduction. I want you to do this. If you want to really understand, take some non-trivial example, try to construct some code words. I think MATLAB has Reed-Solomon encoders, decoders built into it, if you have the communications toolbox, for instance, ok. So, you can go play around with it, try to generate messages, try to generate code words, see how it looks, ok. In fact, Reed-Solomon codes are also cyclic. You shift them, you should get another one. The same property will carry over, ok. So, RS codes are cyclic as well, ok. All these things are, yeah. So, you can see all those things, the same proof as BCH, I mean just the multiplication by alpha type. It is where all these things will nicely follow through, ok. So, I wanted to get some experience with looking at these R Reed-Solomon codes. It is tough for me to do a code word over F-256, ok. So, I cannot do it in paper here, ok. I want you to get some experience. What we will see in the next class is decoder for the Reed-Solomon code. You see, you will get a similar framework like the BCH code, except that there will be some complication, ok. Remember, now we are able to correct symbol errors, ok. When you correct Reed-Solomon codes, it is not enough to find the position of the symbol where the error is. Right? What else do I have to find? The bits within the symbol which were in error also, ok. So, it will require one more level of complexity. You will see it is possible, we can have a nice algorithm for doing that, ok. That is what we will see in the next class.