 Okay, so we've been talking about binary BCS codes, okay, and we saw how it comes to properties, we saw the priority check matrix description, we saw encoding, okay, so from here we went to the generator matrix, right, so that was quite important. Then we saw encoding, in particular we saw systematic encoding, we saw came up with a very simple way of doing systematic encoding, then what else did we see? Then we saw decode it, okay, so one thing that comes out from all of those is that both these can be implemented with practical constraints, okay, some things are very much implementable, both can be implemented, hopefully I convinced you of that the algorithm is not too hard, in today's PLSA it's quite easy to do it, you can just follow the algorithm and implement both, okay. So what I'm going to point out today is some important remarks connecting these binary BCS codes to other kind of codes called cyclic codes, so one thing I should say is what I've defined as binary BCS code is actually not, rigorously not the binary BCS code, it's a shortened version of it, okay, but this is good enough for practical reasons, I'll come back and I'll fix that and tell you what the actual binary BCS code is, what we saw is very closely related to it but it's not exactly that, okay, so before we proceed to that I want to point out about something called erasure, erasure and reverse decoding, okay. So this will influence particularly going towards future decoding algorithms which are much more complex than what we have today, you have to first understand erasures, if erasures are an important step in the muddy, so the idea of erasure is the following, okay, so you have, so you typically when you have an encoder, you have a message M which gets encoded into a code word C, so what I wrote down in that model so far is that to C you add an error vector which is binary and you get R, okay, so actually in a practical communication system that's not what will happen, okay, so something more crazy will happen, so one more level of sophistication is to say that the C gets converted into some modulation alphabet, then that goes through a noisy channel, say add it across a noise, okay, and then you decode that, okay, so that's a slightly more sophisticated way of doing the communication channel, so actually the receiver, okay, the receiver on the receiver side will not only get bits 0 or 1, it will actually get some more information that often about the grid, okay, so what you can do at a very, very simple level is that the receiver will receive three possible things, okay, it either receives 0 or 1 or some additional symbol which we will call an erasure, okay, so what does that symbol represent, it represents the fact that the receiver is, has really, is not really sure whether what was received was 0 or 1, okay, so it's very, very uncertain, so it simply erases that and puts an e-bar and conveys to the rest of the decoder that I really don't know what I received in this position, it could be a 0, it could be a 1, that's why I call it erasure, okay, so if you can use this information, you use this information and improve your decode, okay, so that's the idea and the binary erasure channel, okay, so that's called erasure and error model, erasure plus errors, okay, on the receiver side, you'll receive a vector r, okay, all right, so the way to model this r is basically r is now not a binary vector, it's not 0, 1 anymore, okay, it can have three different values, okay, so r is say r1, r2, rn, ri takes three different values, it could be 0, it could be 1 or it could be an erasure, okay, so several things can happen here, okay, so if you are transmitting a 0, the noise could have been very negligible that you got 0 itself, okay, if you transmit a 0, noise could have been so strong that you got a 1, okay, so transmit a 0, 0 and then you get some median noise, it's maybe a very strong or not very weak, so that the receiver can somehow figure out that I'm really confused, I don't know if this is 0 or a 1, at that point, we'd like to put this e, which we call as an erasure, okay, so if you want distinguishing from e, e and the error, but then maybe we'll call them epsilon, okay, so we'll say, so we'll say, okay, epsilon is a symbol that denotes that the receiver is totally consistent, okay, so the decoder will receive r1 through rn and each ri is already a 0, 1 or epsilon, okay, and there is a mapping between how 0, 1 goes to this, remember here this code word belongs to 0, 1, n, okay, so how does this happen, there is a probabilistic thing here, so input is 0 or a 1, the output would be 0 with probability, let's say, let's put some probability here, so let's say 1 minus p minus e, okay, and the probability e, it can go into this erasure mode, okay, epsilon to probability e, and the probability p, it can become 1, okay, so that's the model here, because I'll have a symmetric thing for 1, the probability 1 minus p minus e, it will remain as 1, the probability e will become this epsilon erasure, and the probability p, it will become c, so this is my errors and erasures model, okay, that's the idea, so this goes from the erasure, alright, so now the question is, how can the decoder use this information, so that's the idea, that's the point of it, the decoder should be able to use this information, the decoder can't use this information when it's useless, but it should be able to use it, okay, so the location of the erasure is kind of a hint to the decoder, it knows that in those places things are bad, okay, so let's first connect with some general theory, if there is no erasure, if the probability of erasure is 0, there is no erasure, then we know if d min is the premium distance, p erasure can be corrected, p is expected to be plus 1, that's when i equal to d erasure can be corrected, right, this d min, right, if the minimum distance is d, the code can correct, 2d plus 1 erasure, so this is under no erasure model, okay, no erasure, okay, if there are erasures, it turns out, if there are, let's say, let me have you speak here, if there are u erasure, what should we call it, let's say u erasure and v erasure, okay, writing erasure again, u erasure and v erasure are correctable, whenever 2 times u plus v plus 1 is less than or equal to, okay, so this is the erasure plus 1, okay, so how did we picture this, so we saw this big little space here which had all the code words, and we said any two code words are separated at least by a distance d, distance is greater than or equal to d, so if you make t errors and 2d plus 1 is greater than d, it will always be closest to the code word that you transmitted, so the decoder what should you do, you should do this nearest neighbor decoder, because you find the code word that is closest to you, and then you decide that, that is the transmitted code word, that will always correct v errors, okay, so now we have a problem where we have u errors and v erasures, okay, and in claiming there is a decoder for a code with minimum distance d, which can always correct u errors and v erasures as long as 2 u plus v plus 1 is less than or equal to d, is that clear, so that is the meaning of the statement, I think we did that way, so the nearest neighbor decoder, the maximum likelihood decoder can correct t errors as long as 2d plus 1 is less than or equal to d, that is something that we know already, okay, and now I have a situation where there are some errors, there are some erasures, okay, of course I do not know where the erasures are, I know where the erasures are, so what is the problem with the erasures, I do not know if it was 0 or 1, okay, so that is the problem, and I am claiming that if in the received block somebody tells you that there were u errors and v erasures, you can always correct it by designing a suitable decoder, how will I do it, any ideas, how can I go about doing this, okay, so I do not want a decoder explicitly, I just want some ideas on how to approach this problem, I mean I think there are some, see for instance we did not have an explicit decoder for the 2d plus 1 also, we just said there exists a decoder, all you have to do is go to the nearest code word, I mean it is not very implementable, it is some big maximum likelihood decoder, okay, but now I have errors, errors as well as erasures, so I cannot define distance and all that, from erasure I will do distance, I cannot do distance usually, so that is the question. If you convert an erasure to an error, some crazy things can happen, look at this condition, in this condition if u is 0, suppose u is 0, v can go as much as v minus 1, so if they keep converting errors to 0 and 1, I might go closer to other code words, I might get many versions giving me the correct answer, right, so I may not be able to control it that way, okay, okay, so that is the idea, so that is important, so what we do is we simply drop the bits that were erased from your code, so what is that operation called, it is puncturing, okay, so you puncture your code at the positions of the erasures, you know the position of the erasures, right, so you puncture your code in those positions, okay, now for the punctured code, what is the minimum distance? d minus v, okay, and I have u errors in the punctured code, as long as 2 u plus 1 is less than or equal to d minus v, I can correct the u errors, okay, so you go to the punctured code, dropping the erasures positions, do a maximum likelihood decoding, correct your u errors, and then what will you do? you are still not done, right, what will you do next, okay, so that is the first step, the first step is here, right, what do you do next? how do you know that there will be only one code word? okay, how do you know that there will be only one code word? it can be more than one code word, so she is saying, okay, so I bottomed up the errors in the non-erased part, there are no errors on that side, right, this is the procedure I told you, we will get rid of that, right, go to the punctured code, correct the u errors, the u is done, okay, now she is saying, for the erased part, you try every single possibility and see whether you get the code word, my point is how do you know that you will get only one code word, the answer is correct, you will get only one code word, how do you know? yeah, exactly, so because you have 2 u plus v plus 1 is less than or equal to d, you know that if there are 2 different code words that refer inside only that v, the minimum distance will be less than d, think about how you might want to show that, it's not really hard to show that, okay, get rid of the u also, you will have to have that, okay, another way to think about it is, okay, so v is definitely less than or equal to d minus 1, right, v is less than or equal to d minus 1, so you know those places so if you go to the parity check matrix, right, so you can solve for the missing positions, I'll show you how to solve for the missing positions, okay, so let me prove this statement to you guys, first step is what, puncture c, puncture the code to remove the erased positions, erased positions, right, the minimum distance of puncture code is what, minimum distance of puncture code greater than or equal to d minus v, okay, since 2u plus 1 is smaller than or equal to d minus v, u errors can be corrected in the punctured path, okay, you're okay, so u errors can be corrected in the punctured path, now the only problem is figuring out the erased path and I'll show you some, two different ways of doing it, the second step is to correct the errors, I'll show you a very simple way of doing it, the other way is to exhaustively try everything and argue that there'll be only one, I'll argue that there'll be only one in another way, okay, so we'll take the parity check matrix for the overall code, it'll have several columns, okay, so convenience I'll list the erased columns in the first position, it can be in any position and I'll list it in the first position, let's say the first column are erased, okay, so these are the erased path, so h1, h2, h3, whatever you know about me, okay, and then we'll have all the columns, okay, whatever you know about h times, so remember that this path I've corrected errors, I've already corrected, okay, so here instead of this new unknown path, let me put some variables, x1, x2 through xmu, so h times x1, x2 through xmu and the remaining path I know should be equal to 1, should be equal to 0, right, so that's a valid code, right, it should be equal to 0, so that gives me a set of equations in the unknown variables, right, the corrected path I'll multiply this guy, so I'll get one right answer, so I can get an ah equals b, the only thing I have to argue is ah has full column run, how do you know that ah has full column run? you know, it's less than or equal to b minus 1, so obviously that's full column run, so it's a lot of unique solution, I can solve it, it just starts with a solving a linear equation, so it's very easy, okay, you want to adjust it if I have to solve a linear equation, it's a fixed complexity, how do we get points? is that clear? did you see what I did? okay, so if you want, so let's say the corrected places are c mu plus 1 hat so I have to c and hat, okay, so for unknown ones, I'll call it x1, x2 through x2, okay, what do I know for sure? I know that h times x1 through xmu c mu plus 1 hat all the way down to c and hat should be equal to what? should be equal to 0, okay, so what do I do? I split this in terms of two parts, okay, so let me call this first these are columns, okay, so what I call this h1 through h2 are all columns, okay, so this sub matrix, let me call it some a, okay, so what I can do is I can split this multiplication as a times x1 through xmu equals what? the remaining part of it multiplied by c mu plus 1 through c and hat, I know all those bits, so this sum vector, so let's say sum, I don't know, sum vector, so let's say a1, a2, a2, a3, a4, okay, a and minus a, sum vector, okay, so if you know this vector, okay, you know this, these are unknown to you, okay, when can you uniquely solve it when the column rank of a equals mu, the column rank of a equals mu, you can uniquely have a solution for this, we can have only one solution, we cannot change it. For any a1, a3, a and minus k, we'll have a unique solution as long as the column rank here is equal to mu, okay, so how do you know that the column rank of a will equal to mu? That comes from the minimum distance, mu is less than or equal to t minus 1, so clearly column rank of a equals mu so that's the idea, mu or vi, right, we're saying v and v became mu, looks like that, is that okay? So that's the idea in claiming that as long as you have u errors and v erasures, 2 u plus v plus 1 is less than or equal to t, they can be corrected, okay, so this is the idea, so this is independent of dch codes or anything, this is a more generic idea, but there is an important idea here, the idea that is crucial here is by giving your receiver more information than just 0 or 1, okay, you can do something more, you can do something more, you can do something more here, so for instance if u is 0, you can correct up to d minus 1, errors, assuming that you know where the errors are coming, so if you give your receiver more information about what happened to each bit on the channel, you can do something more, so that's an important idea which is exploited in today's communication systems, in today's communication systems for each transmitted bit 0, we'll at least give 6 or 7 bits to the receiver, so it's not just 0, 1 and epsilon, it is 6 or 7 bits of, what is called soft information, so we'll do a very granular detail, so we'll say 0 can be received in any of these forms, so you just basically provide much more granularity to your received value, and that can be very much used by the receiver and you can really get very good performance, so this is just like a baby step towards that, but anyway, so this principle is used very much in today's communication, so if you're doing the next course, you'll see how that is really exploited, so if you give more information to the decoder on every bit, then it is much more useful for decode, so let's come back to BCH codes, so suppose I say in a BCH code, I'm decoding BCH code, I know how to correct a 2T errors, as long as 2T plus 1 is less than 2D, I can do that, I have a very efficient algorithm for it, now suppose I say, I want to use the bounded distance decoder, but now I have URS and D erasure, I want to use the bounded distance decoder, I don't want to do, not some likelihood decoding in the puncture coordinate, I don't want to do any of that stuff, I want to use the bounded distance DCS decoder, because I know it's very easy to do, otherwise it becomes complicated, so the question now is, how do you implement errors and erasures decoding in DCN codes, in the bounded distance decoder for DCS code, how do you interpret it, so that's the idea, so let me talk about that briefly, so in DCS decoding, suppose you have URS and D erasure, and let's say 2B plus B plus 1 is less than or equal to B, so how to adapt a 2B bounded distance decoder, so that's the question, I want to prove, any ideas, how can I do this, how will you do it, let's say the problem is complete, you can't drop, how do you compute the syndromes, you can't compute syndromes, you can't drop, I'm not dropping, you see, when I say drop, I'm puncturing, I'm not making it 0, so it's a completely different thing, so yeah, you have to answer, how will you compute syndromes, let me ask you, so in the previous case, you go to those positions, you go to a punctured code, and do maximum likelihood decoding at a punctured code, it's everything you can do here, except that it's only theoretical, you can't implement it, so you're not going to be able to do any easy decoding with the punctured code, it will do maximum likelihood decoding, same method, no problem, yes, that is exactly the problem I'm posing to you, so here we have some dots in the app, what do you do, you don't have the received values, how do you do it in the first step, because with the syndromes, you can't do it, without the syndromes, you can't do the algebra decoding, so that's my question to you, how will you do it, there is a very smart and slick method, this will be available, that's why I'm presenting it to you, so you'll see it's a very slick method, so when I describe it, you'll see that it's a very clever method, it's not a very fundamental, or conceptual method, it's just a clever method, so what is that clever method, so I'll give you the first step, is to rewrite this in this form, 2 plus b by 2, it's less than or equal to t, let's say d is odd, so that t is even odd, that's the first step, so u plus b by 2, I know, is less than or equal to the order correcting capability of my code, can you use this now, come up with a clever idea, what can I do with erasure, suppose I don't know the erasure, what's the first step that you are always suggesting, what do you try, are you trying, what can we try, let's just give me one simple thing that you can put the erasure to, start off with, all 0, let's say I try all 0, right, u plus b by 2 is less than or equal to t, I know that, so b by 2 is less than or equal to t, right all 0, let's say something happened, then is there anything else I can try, all 1, so in fact that is enough, so you put, erase position equal to all 0, you do one decoding, then you put erase position equal to all 1, you do another decoding, it turns out at the output of these two decodings, you can combine the output of decoding, these two decodings smartly to get the actual decoder, as long as u plus b by 2 is less than or equal to t, okay, so you think about why that works, it's not very hard, just a clever method, so what you do is, you put, here's the method, you put erase plus erase plus equals 0 and do down the distance decoding, do the algebraic decoding, okay, now once you put it is equal to 0, you can do the decoding, so it's just a question of computing the syndrome and running the decoding, you do algebraic decoding, okay, and then what we do, next step is, do the first step, second step is, you put erase plus equals 1, all of them equal to 1, then again repeat the algebraic decoding, okay, so you might say that okay, only one will succeed, whatever succeeds can be the output of the decoder, so you can think about why it is true, it's a very slick little idea, you will see that, if one succeeds, it means, well, other will definitely fail, because the number of others within that would exceed where, exceed t, okay, because b by 2, if you put all 0, b by 2 has to be, because it's very nicely, see, if you put all 0, the actual error vector will have some weight, that weight is either less than b by 2 or greater than b by 2, it can't be both, so if it's less than b by 2, then when you put all 1s, the number of errors within greater than b by 2, so that's the way you control it, so you have to prove it, I'm not going to prove it, but this is the idea, so what's better than b by 2? no, no, no, so when you put all errors bits into the 0, how many errors will actually be there in the new, in the new received word? okay, the received word, some portions are erased, you put all of them as 0, how many errors will there be in the new received word? it will be u plus what? weight of the error vector in that part, okay, when you put all 1s, what will it be? it will be u plus b minus weight of the error vector in that part, okay, one of these two things has to be smaller than b by 2, the other will be definitely greater than b by 2, okay, so it will work out better, okay, so if both succeed, then you have a problem, both succeed what happens? you pick the one with the number of errors, so that's it, okay, if either one succeeds, you pick one, depending on b is high enough, then only other one will succeed, if b is very, very low, b is 0 for instance, when u is less than t, then both will succeed, both may not succeed, so you have to think about what will happen, b is very small, yeah, b is 0, both will succeed, right, so both succeed, then you have to pick the one that gave you the lower number of errors, okay, both give you the same code, both will do it at that time, it's not a problem, okay, that will be the correct answer, okay, so you just combine the output of these two decoders in a smart way, you get the answer, okay, and prove that it works, okay, so that's about BCH decoding with errors, and now we're going to move to the other part that I was talking about, this is the BCH code stuff, okay, so like I said, the codes that I designed for you are not really binary BCH codes, they are sharpened versions of the binary BCH codes, the actual binary BCH codes are found in this class of what I call cyclic codes, and I'll tell you what they are, okay, so first let's look at a special kind of BCH codes, let's look at BCH codes, okay, for which n equals the order of beta, okay, so this is the special condition that I'm going to import, okay, so far what did we want either of beta to be greater than or equal to m, so now I'm going to say I want it to be equal to m, okay, so of course now n has to be odd, okay, so if I'm going to look at, if I'm going to want beta to be in 0 to bar n, n has to be odd, only then it will work, okay, so n is even, there's no way order of any element in g of 2 bar m is going to be even, okay, why can't it be even? It has to so the order of any element has to divide something, okay, so we have to divide 2 bar m minus 1, clearly an even number is not going to divide 2 bar m minus 1, so there's no way order can be even, so n will have to be odd, okay, so let's take n odd, and then we will ask for n, beta such that n equals order of beta, okay, then there is a very, very curious property that is satisfied by the four words of the quote, okay, so let's go back to the barbecue check matrix, what is that barbecue check matrix? 1 beta beta square all the way to beta bar n minus 1, 1 beta square beta square all the way to beta square all the way to beta square, it's still done, okay, so we're going to 1, we've got 2p, for some reason it will be equal to 2p plus 1 all the way to the standard, now we're going to 2p plus 2p plus beta, so this is what I'll just check matrix, suppose I tell you c which is, it says c0, c1, c2, all the way around the cn minus 1 belongs to the code, what does it mean? h times c transpose equals 0, okay, this implies, and we reply by for instance, that a cyclic shift of c, what is a cyclic shift of c, I move to the right, and then bring the last one back, the cyclic shift cn minus 1, c0, c1, cn minus 2 is also in the okay, so where is that to? well, it's not question of swapping, how will I show that if c belongs to the c0, cn minus 1 belongs to the code, the cyclic shift is also in the code, what is the way to show a code word belongs to the code, an actor belongs to the code, you have to check the distance between the cn cc transpose, okay, what will be the cn c transpose and cc you take the cn c transpose, you multiply by the beta, what will you get, look at the first equation, 1 plus, so the first equation multiply by beta, okay, what will be the first equation, 1 c0 plus beta times c1, with beta squared c2, plus beta power n minus 1 c n minus 1 equals 0 you multiply the beta what will you get yeah so it will become it will give you this the equation corresponding to the first first equation corresponding to the second vector and that is also 0 what will I give you the second one? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . codes for which you take a code word and do a cyclic shift, you again get another code word called cyclic. Linear codes, there to be linear, but also you can think of non-linear cyclic code, but you should know everything about it. So, linear codes that a cyclic right shift, I can say right shift without any ambiguity, left shift is any number of right shift put together. So, cyclic right shift also gives you another code word, it is called a cyclic shift. So, this makes the code cyclic. I mean this will not happen is n is not equal to order of beta. If order of beta is cyclic greater than n, you have a gap, so you can't do that. So, only when n equals order of beta, I can do it. So, this leads us to this area of cyclic codes. So, these BCH codes are special cases of cyclic codes. So, in fact, suppose order of beta greater than n, let me show you what happens for n order of beta greater than n. Suppose if your order of beta is strictly greater than n. So, what you should do is, you should define a BCH code with length equals order of beta. So, you define a BCH code with length equals order of beta. That code will be cyclic. And then how do you go from that code to this gate? How can you go to this BCH code from that code? You shorten it. So, you have to set some of those things to 0. You cannot puncture. Puncturing is different from shortening, right? Puncturing is drop the bits. Here you cannot drop it. You have to set those bits to 0. Only then the clarity set matrix will drop out. It will become the shorter one. So, you can shorten it to go to that. So, all BCH codes are shortened versions of cyclic codes. So, cyclic codes are in a way more fundamental than the BCH codes. So, you might say, I can say cyclic, but it is very common to say cyclic. Everybody says cyclic. So, I am also cyclic. If you want, you can call it cyclic. So, apparently I am called in English the right way to pronounce, for instance, by cycle is to say by cyclic lesson. Because apparently maybe it is a lesson in pronunciation. So, we say cyclic just to keep it common with our algorithm. So, it makes sense to look at cyclic codes fundamentally. So, what codes can be cyclic? So, what is the definition of cyclic codes? Linear codes, closed under cyclic, right? So, what do I mean by closed under? So, this right shift can also be replaced by left. So, but they are not equivalent. Closed under means I have a code, I do an operation, I do not leave the code. So, if that is the thing, then that operation is said to be closed under that. I mean the set code is said to be closed under that operation. So, here the code is closed under cyclic, right? So, such codes are interesting fundamentally from various reasons. They have a very nice rich algebraic structure. And interestingly, VCH codes are special cases of it. A shortened version of it in general. So, maybe we should look at it. So, we will see it real quick in a couple of classes. It is not too crucial. Like we saw I mean the cyclic property was not really used anywhere. We never used it. We only used one property which also is true for the cyclic one. We used this notion of a generator polynomial, right? So, that is quite, that we come from the cyclic code in a very nice way. So, that is a very nice characterization except for that nothing else we used. So, let us see some theory. The first thing is we need a nice mathematical notation for our conceptual understanding of the cyclic right shift operation. The cyclic right shift we know what it does, but how do we describe it in algebraic structure? So, this is the way to do it. We will first define some ring which we will call Rn. Ring Rn is basically, we will only do binary. So, we will only do binary. So, before I do that, we will only do binary cyclic codes. So, binary cyclic codes you will usually set n to be odd. So, just fix these things. We are only dealing with binary codes and n odd. So, this ring Rn is basically polynomial as did we less than or equal to n minus 1 with binary coefficients. So, this is a ring Rn. Addition is trivial, right? Addition is very, very trivial. If you add two polynomials, you will get another polynomial in the ring. I have to define multiplication. Why should I define multiplication? So, I do a polynomial multiplication. What can happen? Can this be a ring? No. I mean, you will go outside of this set, right? So, you take two polynomials of degree n minus 1. You multiply. You will get a polynomial of degree x bar 2 and minus 1. I mean, there is no way that is going to be in this set. So, what can I do is multiplication is 1 modulo x bar n minus 1, okay? All right? So, I could have picked any other polynomial of degree n. I will pick this x bar n minus 1. Well, minus 1 is the same as plus 1. So, I will say x bar n plus 1. Because I am dealing with just binary stuff. Everything is gf2. So, I will say I will do multiplication modulo x bar n plus 1. Okay? The reason why I am saying that is if somebody tells me that I have cfx, which is c0 plus c1x plus so on to cn minus 1 x bar n minus 1, it turns out this definitely belongs to Rn, right? No problem. If I multiply cfx by something in Rn, I will get a cyclic ratio. Okay? What is that thing I should multiply by? By x. By x. So, multiply by x. So, x times cfx equals what? cn minus 1 plus u0x plus c1x bar all the way down to cn minus 2. So, in this ring that I have, multiplication by x nicely captures cyclic ratio of operation. So, what do we do for multiplication of cyclic ratio by 2 positions? x square by 3 m. Okay? I can even multiply by x inverse if I like. Honestly, I define x inverse suitably. I can do that. Okay? Do a left shift. Okay? I can do that. I define. I will do my ring. x bar n is equal to 1. So, x bar x inverse is the same as x bar n minus 1. I can define that. Okay? So, I can do a shifting very nicely in this ring. Okay? So, that's the first thing. Okay? So, we will interpret cyclic codes. Okay? Cyclic codes are linear codes. Codes are also subsets of this ring. Okay? So, codes. So, this ring is also a vector space. Okay? So, I can also think of the codes as a subspace of this ring. Okay? So, I can do a loose terminology, mixed up terminology. Then, a cyclic code. If I define a cyclic code of length n, somebody gives me a cyclic code of length n. Every code word of that cyclic code belongs to R. Okay? So, I can think of my entire code, cyclic code, as coming from R. Okay? It comes from R. Every code word comes from R. Okay? Okay? So, using this ring, I'm going to study the cyclic codes. Okay? So, we will not use too many properties of this ring. I'm just defining it for completeness. Then, we will see what we do there. Okay? So, now, the next thing that is defined. Okay? So, let's go back. So, vector spaces, we have subspaces. For groups, we have subgroups. For rings, there is something called an ideal. Okay? So, that is what is contained in a ring, and it utters the properties of the ring. That's called an ideal. Okay? So, subspace, we define a vector space. Okay? So, we define the linear code. We add a vector space. We define a subspace for it. And, for group, we add a subgroup. Subgroup and subspaces satisfy only the vector space properties. A group here, only one operation. In the ring, you have two operations. Okay? So, if you have a, you can have a subring, but that's not so interesting. An ideal is much more interesting. So, what's an ideal? If we define an ideal as a ring. Okay? So, I'll define it with respect to Rn. We have to strictly define it with lots of intricacies here. So, let's just define ideal as Rn. Okay? A subset of Rn. Okay? Okay? It's an ideal. Okay? So, there are two conditions that need to be sub-spaced. So, let me write down both of them. Let me write down both of them. The first condition will be very easy. So, we'll do C. If we have A-effects, B-effects in I, then R-effects plus B-effects should also be in... That's a very simple condition. It's just a standard addition. So, it's like a subgroup of the additive groups. If you view Rn as an additive group, it's a subgroup. If you view Rn as a vector space, it's a sub-space. Okay? So, that's the first thing. Second property is if you have an A-effects in I and the B-effects in Rn. So, remember that. If I have an A-effects in I, I have a B-effects in Rn. Then B-effects times A-effects should actually belong to I. So, this sounds like a very, very strong requirement. So, I'll motivate this a little bit later. This is what's needed. Is that okay? It's a bit strong. You might... First time you look at it, maybe I made a mistake or something you might say, but no, this is correct. A-effects belongs to the ideal. And B-effects is any other polynomial in the entire ring. So, multiply B-effects to the A-effects. That's what I go to. So, come back to the ideal. I should not bore it. Okay? So, for instance, the integer ring is something that is very common with them. So, if I take all the multiples of, say, 3. Okay? So, if I look at the subgroup of the integers, which consists of all the multiples of 3, that will form an ideal. Okay? Because if I add any two multiples of 3, I get a multiple of 3. So, take any other integer and multiply it by a multiple of 3. What do I get? I get another multiple of 3. Okay? So, in a way, these ideals are multiples of... Ideals and integers are multiples of a number. Okay? There is an interesting converse to this statement. Okay? If somebody tells you that there is an abstract ideal for an integer, you can show that there is a number such that that ideal equals all multiples of that number. Okay? There are no other ideals other than multiples of numbers and integers. Okay? So, it's a very intriguing aspect. There is a very simple statement which is true for R and N also. Okay? So, that's what we will prove. Okay? Now, let me just unpack this for you. So, what is bfx times afx belonging to i? Now, the bfx is some arbitrary polynomial from R and N. What form does it have? b0 plus b1x plus b2x plus so on till bn minus 1, x bar n minus 1. Okay? So, somebody tells me that i is an ideal. Clearly, that implies that afx and i, okay, x times afx will be what? What? x times afx will be an i. That's no problem. x bar times afx will also be an i. So, any power of x times i afx is also an i. Okay? So, instead of requiring that bfx times afx is an i for every R and N, what can I simply require? Like, x times afx is an i. That's enough. Okay? Okay? If x times afx is an i, what will happen? x bar times, so that's enough. Okay? So, that's what I'm trying to say. So, even this power i would only, okay? If I just require x times afx is an i for every afx, that, in fact, implies this condition. Why is that? You take an arbitrary dfx and multiply by afx. What do you get? You'll get an x times afx here, which is in the ideal. You'll get afx here. Then you take x times afx and multiply by x again. You'll get x bar times afx, which is again an i. Like this, all of these days are in i. And then you multiply it in scalars and add them up. What will happen? You'll never realize. Okay? So, maybe I should be capital S and say I'm in binary. Well, good. So, if I'm not binary, I have to add some scalars here and say... Okay? Okay? So, the second requirement in Rn can be replaced by just this requirement. Okay? If I have afx and i, x times afx belongs to i. I introduce cyclic codes. Now, what's the connection between binary, linear, cyclic codes and ideals of Rn? They are one and the same. So, once you see this, you can easily see that binary, linear, cyclic codes or binary, cyclic codes are ideals of Rn. Okay? So, this is the first and interesting result as far as cyclic codes are concerned. So, once you understand ideals of Rn, you understood all possible binary cyclic codes. There can be no other technical cyclic code other than... Okay? So, how do you think of ideals of Rn? Okay? So, it turns out, like I said, the crucial thing is this idea of multiples. Okay? So, in fact, in Rn also, that is true. Suppose I take... So, here's an example of an ideal. An example of ideal. Suppose I took some gfx from Rn. Okay? And then I can generate an ideal with it. How do I generate an ideal with it? Define id to be set of all multiples of gfx. Okay? So, you take all possible overfax times gfx. Then, overfax is in Rn. Okay? This will be an ideal. Okay? How do you assure that this is an ideal? Okay? So, you fix some gfx. And then you do this. This will be an ideal. How do you assure that this is an ideal? Okay? You take any two sum... Sum it up. We'll again get an element in the ideal. You take gfx and gfx multiplied by some other polynomial in Rn. We'll again get an element of this ideal. Okay? Because all possible multiples will be included. Okay? Multiplication is associated. It's a problem. We can do all the simple properties and see that this will be an ideal. Okay? It turns out, again, interestingly, a converse kind of statement is true for such a statement. Every ideal in Rn looks like this. So, for every ideal in Rn, somebody comes up with an abstract ideal in Rn. Somebody gives you an ideal in Rn. You can ask him to provide a gfx or you can compute the gfx such that the ideal will be equal to this. So, these kinds of ideals have a name. These are called principal ideals. Okay? The reason is they are generated by a single element. Single element from Rn generates the entire ideal. Such ideals are called principal ideals. The statement that is true for Rn is every ideal in Rn is principal. Okay? Every ideal in the integers is principal ideal. It is just one way to generate the whole thing. Likewise, Rn is also what's called the principal ideal domain. So, it has every ideal being principal. Okay? So, that's the first thing we'll prove. Okay? So, that's the first thing we're going to prove. Okay? So, let's try to prove that statement. So, here's the result. Okay? Suppose you have a cyclic code C. Somebody gives you a cyclic code of length n. Remember, n is what we are. C is the binary code, all that we'll assume. Okay? All that we'll assume. Okay? So, clearly, this is an ideal of Rn. Okay, that we know. So, instead of calling ideal of Rn, I'm going to say cyclic code. Both of them are equal. Nothing good. The first result is that it exists. Okay? So, let me go step by step. The first result that I want is that g of x be, be, be, be, be, be, be. Non-zero polynomial. Non-zero element. Okay? So, let me just say non-zero polynomial. Polynomial in C with minimal degree. Okay? Okay? So, zero polynomial really doesn't have a degree. Okay? So, I don't have to say non-zero polynomial. Once I said the polynomial has a degree, it was non-zero. Okay? So, anyway. So, suppose I say g of x is a polynomial in C in the cyclic code with minimal degree. The degree is minimal. Okay? Then g of x is minimal. Okay? It's very easy to prove it. Okay? So, I do a prove this. If I say the non-zero polynomial in the cyclic code with minimal degree has to be unique. Why is that? How do you prove it? Yeah, if there are two of them, you subtract the two. Again, you are in the cyclic code. But that will have a degree strictly lesser than either of them. So, it cannot be proved. Okay? So, it's a very easy to prove this, for example. The next statement is C itself. So, there's a notation here. For such principal ideals, these are denoted g of x. Like this. Okay? So, what do I mean by this? Basically, this way is denoted as the ideal generated by g of x. It's just a short-hand notation to denote principal ideas. Okay? So, it turns out C equals two of x. Okay? Is it okay? Fine. So, how do you prove this? Okay, I prove this. Any ideas for proving it? There's a non-zero polynomial. Doesn't that take any code for that? Yeah. So, how do you use the division algorithm? Okay? So, you take, let C of x pull out to C. Okay? Then you go right. C of x right. C of x. Okay? Where? Where will you divide this? So, don't divide in Rn. Okay? Rn is a crazy thing to divide in. So, you have to divide this in g of 2 x. Okay? So, this is a regular division. Okay? So, then we'll get a quotient and then a micro. Okay? So, now, if I do, if I push this to this side, what will happen? I get C of x, put C of x to C. And then I get it. C of x plus g of x. What does this belong to? If I do, say, model x minus 1, 5 minus 1. So, I don't have to do it because C of x has a degree, less than or equal to n minus 1, right? So, if I divide by g of x, which also has a degree, less than or equal to n minus 1, I will not exceed degrees in any way. Okay? So, this will be fine. Both of these case belong to C. Why does this also belong to C? C of x belongs to C. Any multiple of g of x also belongs to C. Both of them belong to C. So, what about the sum? Both of them also belong to C. Okay? Now, I know a degree of r of x is what? Strictly less than degree of g of x. And this will not be the contradiction only if r of x is equal to 0. Okay? So, this, why? Because degree of g of x is minimal, right? You see that? Okay? See, I have a model. Suppose r of x is not 0, what will happen? R of x has a degree strictly less than the degree of g of x. And r of x also belongs to C. Okay? So, that is the contradiction of the minimality of the degree of g of x. So, that implies r of x is 0. Okay? So, every c of x in C has to be a multiple of g of x. Because we are going to various other ways of showing it. Please go and pick this one. Is that okay? I think about that. So, I mean, I will take just two more minutes and give you the last property which is again interesting. The third property is g of x provides x star n minus 1 in g of x. So, this polynomial that we have, which was my polynomial at minimal degree, minimal degree in basically code. Okay? Not only generates basically code, it also has to derive x star n plus 1. How will you prove it? Whenever something has to be derived, you always use the remainder. Take x star n minus 1 derived by g of x. Okay? You will get q of x times g of x plus r of x. Degree of r of x is strictly less than degree of g of x. How will you do not even x star n plus 1? What will happen? x star n plus 1 will go away. So, you see that q of x times g of x belongs to the ideal, belongs to the cyclic code. Okay? And it is equal to r of x. And r of x is degree strictly less than what g of x is supposed to be. That is the contradiction. So, that cannot happen. So, r of x has to be 0. Okay? So, this polynomial of minimal degree in a cyclic code is a power cell polynomial. Once you get a handle on it, you know everything about the cyclic code. Okay? So, that polynomial is called the generator polynomial of the cyclic code. Okay? All right? So, the generator polynomial for the BCH code that we had is also the generator polynomial of the cyclic BCH code when n equals order of beta. If n is lesser than order of beta, then you have to go to that cyclic code which is the full cyclic code. So, that it will be the generator polynomial. Okay? So, that is the connection. Okay? So, BCH code, the ocean you defined only when n equals order of beta. If people will not define BCH code, so n less than order of beta. If you want n less than order of beta, you have to shatter me. But I think they are just saying BCH code mostly for it. So, hopefully that is clear. Okay? So, we will stop here for today. If the people who want to do projects have some time now, we can have a quick chat. Okay?