 Okay, so this is lecture 36 in the last regular lecture for this course and let me see I think we were looking at the tutorial sheet problems where we finished all these things. So I think the interleaving we have kind of come to a conclusion problem 13, right? So the row column interleaving people enough people have looked at it and looks like the answer is, answer is what? T mm minus m plus 1, am I right? This seems to be the answer for part B. Okay, so you might actually get something else which looks like T minus 1 into mm plus m times m minus 1 plus 1. So you see these two are the same things. Am I right? No, I made a mistake somewhere. Small m and capital M minus 1. So these two are the same. So apparently in this form it's easy to derive. So you do that, you get the answer for part. Okay, so that completes that question. I want to go back to question 12 which is an interesting question. I have a tendency to ask some version of it in every final exam, okay? So I think every time I've taught error control coding in this, at least in IITM when even outside I've had a tendency to ask some version of question 12. So take a look at it for a while might be interesting. Okay, so let's try to copy this in. This is a picture. I think the picture is the most important thing. I'll try to copy that. It's question 12, okay? So what's happening here is it's an interesting little combination. You do a concatenation in a slightly different way, okay? So have I described it there? So I've described it here. Oh, this doesn't look right. Something wrong with this. This picture is wrong. I think I don't know why this happened. I'm quite sure this is not the encoder that I had in mind. It can't be the 15.9 RS code over GF16. Yeah, it's actually, I'm sorry for this, so this is wrong. So there's something wrong with this sheet. It has to be the encode. I think it has to come in a reverse way. Sorry for this. I think I have not looked at the latest version carefully. So this figure is wrong. Okay, so I can't draw on top of this. This figure three is wrong. Let me replace that with the correct figure in the notes. Okay, so let me, let me delete it. I'm sorry. Yeah, I'm sure there's a more efficient way of doing it. I'm not patient enough to try it. So 12th question, the way the picture is wrong. Okay, so that picture might be for some other question that showed up in some other finals. I don't know. Maybe I have to go look it up. I don't know where I got this picture from. Seems interesting. I think that picture is for maybe some other question down below. Let me see. I think it looks like I don't have it. It's sad that I don't have it. Okay. Okay. So anyway, so figure three is wrong. Let me draw the right figure three. So the way the description goes, imagine every set of four bits entering the encoders first encoded and encoded using the seven four hamming code. Then each seven bit code word is treated as a symbol and then every 121 symbols is encoded using the 127 121 RS code. Okay. So the picture has to be very different. The picture looks like this. You have the hamming code coming first. Okay. So the seven four hamming, okay. So the number of input bits here is 121 times four bits. Okay. This gets encoded. You would get 121 times seven bits, right, or 121 symbols over, over what, GF128, right. That's two plus seven, okay. And then what am I doing? I have a 127 121 RS over GF128 and that gives me 127 times seven bits. Just the same as 127 symbols. This is the encoder. Okay. Okay. So imagine systematic encoding in each stage. Okay. So we won't think of all kinds of encoders, systematic encoders just to simplify situations. Okay. And what about the overall code? Can I say the overall code is linear? Can I say the overall code is linear? Yes or no? Maybe. It is linear or not? Yes. What are you thinking? It should be linear. What is the only thing? See, look at the output that you're getting here, okay. So each of these will be a code word of the reach Solomon code and the reach Solomon code is linear. There's no problem. Right. So if you add any two binary expanded versions, you will get another binary expanded version of the reach Solomon code. In addition, though, there is a constraint here. These are not all code words of the reach Solomon code. What are the only code words that we will be considering? Right. The message symbols, each of the message symbols, you have 121 message symbols, right? Out of the 121 message symbols, each symbol has to be actually a code word of the hamming code. You see that it cannot be an arbitrary symbol, right? There are two par seven symbols, right? But we don't take all two par seven of them. You only take two power four of them, which are the hamming code words. Okay. So you only take those, right? So in any code word that you write down here, you will have M1 to M121 and then P1 to P what six, right? This will be the code word. Each of these guys are hamming seven, four hamming code words, right? And this is, this is an arbitrary symbol. I don't know what these are. This can be anything. Whatever that Reed-Solomon code gives you, but each of these guys are hamming code words. So what happens when you take two such code words and add them? You will get another code word which definitely belongs to the Reed-Solomon code. I know that for sure. In addition, what else will be true? First 121 will still continue to be hamming code words. So I know for sure that I'll get another binary expanded code word from here, okay? What if I view these things purely as symbols over GF128 and ask the question, is it linear over GF128? Then what else should be true? It's not enough if you only add. You have to multiply by an arbitrary symbol over GF128 and still get another code word and that's not going to happen. I'm sure you can have something that you multiply which is not a hamming code word. You can easily get that. So this will not, if you just look at it as a code over GF128, it will not be linear over GF128 but once you view the binary expanded version in the systematic form, it will continue to be a linear binary code. So this overall code is 127 times 7, I don't know whatever that number is, 121 times 4 binary code, okay? So I don't know what the question asks you, block length and dimension of the overall binary code and maybe the question is to ask you to prove that it's linear, okay? So it's again an important thing to prove, okay? All right? Okay, what can you say about minimum distance? Let me see. Who can look at this code word structure and give me some bound on the minimum distance? What do you think about the minimum distance problem? Look at the code word form, that's the only thing that saves you, okay? So what happens in a Reed-Solomon code? Okay, what do we know about the Reed-Solomon code's minimum distance? The Reed-Solomon code is 7, right? That you know. Minimum distance for the Reed-Solomon code 127, 121, Reed-Solomon code is 7. So even when you expand it, most likely it will remain 7, who knows? Maybe it will increase, I don't know, depends on so many other things but let's assume it's 7, okay? Without a good bound is 7 when you expand it, okay? Now you have the additional constraint that each of your message bits has to be a hamming code word in the F, right? It has to be a hamming code word, okay? Which means once I make one of the messages non-zero, okay? If all the messages are zero, the code word itself is zero, right? Right? I know the code is linear so I only have to worry about the minimum weight of a non-zero code word. So if I make any one message non-zero, what will be the minimum weight of that message itself? In the hamming code, it has to be 3, it cannot be less than 3, right? So you'll have 3, right? And when one message is non-zero, how many of the parities will be non-zero? Based on read Solomon code, what do I know? If one of the, only one of these message bits is non-zero, message symbols is non-zero and every other message symbol is zero, what will be the parity? Can I say all six parities have to be non-zero, right? If only one message is non-zero, what is the minimum distance of the read Solomon code? It's 7. Only one message is non-zero, how will it be 7 minimum distance? Even all the parities are non-zero. So all the parities have to be non-zero if I make only one message non-zero, okay? So in this construction, if I make one message symbol non-zero, all the seven, all the six parity symbols have to be non-zero. Now when I look at the binary expanded weight, what can I say? It is lower bounded by 3 plus 6 which is 9, okay? So is that the automatic, is there automatically a bound on the minimum distance? Okay, you have to be slightly more careful. What if two of the messages are non-zero? Then only how many parities need to be non-zero? 5, okay? But if two messages are non-zero, what is the weight now? 3 plus 3, 6 plus 4 which becomes 10 which is greater than 9, okay? And if three messages are non-zero, automatically that weight becomes 3, you don't have to consider anything else. So if you eliminate all these cases, you see clearly you can say minimum distance is greater than or equal to 9, okay? So it's an important thing, okay? So the fact that it's non-zero, only assumption I'm making is when you expand, the expansion will be at least weight 1, that's all. I'm not taking anything greater than that, okay? Just that's a simple bound, okay? If you have a non-zero symbol, when you expand it to binary, it will have at least 1, 1, that's all, that is all I'm taking, okay? But you have to carefully look at all those three cases and conclude that minimum distance has to be greater than or equal to 9, okay? So concatenation in this way can be very interesting. So I always like concatenation in the final exam, okay? So it's, you have to make a lot of arguments, you have to know a lot about the codes, you have to know what the minimum distance is, what reach-solven means, what where linearity comes from, what does it mean to multiply by a symbol, what does it mean to be linear in binary expansion as opposed to linear in GF128. All those subtle differences will play a nice role in these concatenated questions. I usually like them, okay? I usually like giving questions based on that, okay? So you said D is greater than or equal to 9, all right? So that's fine, okay? So that's all we can say based on the encoder. I don't want to beat about the point way too much. So the next thing the question asks you to is to move towards the decoder. So in the decoder you do a multi-stage decoding like before, okay? So you don't want to decode the overall code, you want to decode the outer code first and then inner code first and then the outer code next. Suppose you do that, how many errors can you correct as the question, okay? So that's the decoder for you. Consider the decoder shown here over a BSC. Both are bounded distance, okay? Well, you can say hamming is syndrome or bounded distance. All of those are same, right? For the hamming code is a perfect code. So it works out very nicely. So what's the error correcting capability of the overall code under the above decoder? Okay? So remember you get 127 symbols here at the input to the decoder. You do the decoding and you only send the 121 systematic part to the next decoder. You don't send the parity part. That's completely irrelevant for the next decoder, right? So all those things are assumed, okay? So you assume that 121 message symbols come here and then they are further hamming decoded to get you the 121 times 4. Message symbols that you actually have, okay? So that's how it works in sequence, okay? So think about it, stare at it for a while and tell me how many errors can I correct? How many bit errors can I correct? Okay? So when you make, so some further assumptions are required, okay? So when I say bounded distance decoding, what does it mean? So the assumption I'm going to make, this will be useful to think about. When I say bounded distance decoding, if there are T or fewer errors, in this case, T is 3, right? If there are 3 or fewer errors, the read Solomon code will accurately correct it. If there are 4 or more errors, what will happen? It will detect that there is a failure and it will send whatever was received as it is to the next decoder, okay? So those are all assumptions that are built into this simple statement, right? What will you do if the first decoder fails, right? If there are 4 or more errors, first decoder will fail, then what do you do? You send just whatever you received to the second decoder, okay? So that's the strategy we are employing, okay? So that's not stated explicitly here. That is kind of understood. Do you see what your, can you visualize what's happening? Okay, so now we want to tell me, I want you to tell me how many errors we can correct. One bound you can get is 3. If there are 3 or fewer errors, you will correct, right? Am I right? How will you get that bound? Yeah, the RS code itself will correct it. You don't have to worry about the Hamming code. What will happen if there are 4 errors? 4 errors also will work. So what are you saying? Or not? Yes, maybe 4 bit errors. I'm sorry, depends? Tell me, yeah, depends. Think about how it can be, if there are in 4 different symbols, will fail, then what will happen? Hamming code, and then what? One error in each thing. Yes, so it will correct. 12 errors, right? 12 errors. So in each symbol, there will be only one error, and the Hamming decoder can correct it. So it will be fine. But in what other way can the 4 bits distribute? If they distribute among 3 or fewer symbols, what will happen? RS code itself will correct it. There's no problem. The only way in which it can distribute over 4 symbols is what? If there is one error per symbol, in which case it will fail, and it will give the exact same thing to the next decoder, which is going to accurately decode. There's no problem. So I may write if I say we're achieving error correcting capability 4. 5, what about 5? 5, it won't correct, right? 5, you'll have a situation where you can have 2 errors in one symbol and 3 errors, single errors. That will fail. That will make the outer RS decoder fail. And then there will be a 2 error symbol, a 2 error code word which goes into the Hamming code, which will make that also fail and it will fail. So you can't say 5 is the error correcting capability. And once you make both the arguments, right? You have to make both the arguments. When I say error correcting capability is 4, what are the 2 arguments necessary? All errors of weight 4 or less can be corrected. And then what? There is an error vector of weight 5 which cannot be corrected. We have shown both, which means error correcting capability is 4. So I didn't write down all the arguments, but for part B, this is part A, part B, say T equals 4. So it's achievable in this concatenation. Maybe we should look at this encoder right here and see what we can say about it. Maybe this encoder is also interesting. Okay, maybe actually this is not for problem 12, but take a look at this encoder and tell me, answer part A of the question. Find out block length dimension and some bound on the minimum distance, some reasonable bound on the minimum distance. Okay, block length, start with block length dimension. What do you see? I'm sorry. Yeah, binary expanded version of each symbol. It's what you... So you see how it will work, right? So what is the K? How many bits will be at the input? Nine symbols over GF 16 or 9 times 4 which is 36 bits. 36 bits will be at the input. At the output, what will you get? 15 times 4. Okay, so that's going to go through a Hamming encoder, which will become 15 times 7. Okay, so it is the 105 comma 36 code. Okay, can you bound the minimum distance? 15 9 RS code as minimum distance, what? 7. Okay, and then what will happen? Can I say 7 times 3? It'll be just 3. Remember, all everything is Hamming encoded. Not only the message or anything like that, right? See, all the 15 times 4 are Hamming encoded. Can I say 7 times 3 is the lower bound? Yeah, can I say 21 is the lower bound? Right? Yes, any non-zero code word for the reach Solomon code will have at least 7 non-zero symbols. Right? When each of these 7 non-zero symbols is encoded by the Hamming code, you will get weight 3 for each of those symbols. So I can say 7 times 3, 21 is a bound. Am I right? Okay? So go back and think about why it didn't work in the previous case. In the previous case, we did Hamming first and then we did some bigger reach Solomon. Okay? So that is different while this is different. Okay? Okay? So this works. This is very similar to Forney's concatenation. Right? What happened in Forney's concatenation? Something exactly like this. Do you remember? Is this a case of Forney's concatenation or not? The first concatenation we saw, you have an N1K1 code over Gf2 power K2 and then you have a N2K2 code. This is exactly Forney's concatenation. Do you agree or not? Go back and look at your notes. Concatenation idea one. So it matches perfectly. So the minimum distance will multiply. Okay? Okay? So this is for this guy. So let me just cut and paste this guy. Do you agree that this is exactly the case of Forney's concatenation? How many of you agree or disagree? Go back and look at the concatenation one. It's exactly the same. Right? Let's just put some numbers here. So you can say 1.05, 36, greater than or equal to 21. Okay? So now I want you to consider a similar decoder like before. Okay? A similar decoder which is a multi-stage decoder. So what am I going to do with the decoder? I will have a first, I'll first I'll have a decoder for the Hamming code. Okay? Hamming decoder. Okay? Its output will be passed on to a Reed-Solomon decoder. Okay? Bounded distance decoder for RS code. What is the error correcting capability here? First get some large bounds. You know, I mean get some crude bound and then try to refine it. So that's a useful way of proceeding for these problems. For instance, try to make the Hamming decoder fail at four symbols. Or why will the Hamming decoder fail at four symbols? If there are greater than one error in each of those four symbols. Am I right? Right? Okay? If it fails in four symbols, then what will happen? See, the thing about the Hamming decoder is if there is more than one error, it will definitely fail. Okay? It will, there is no way it can, right? If there are two errors, it will definitely fail. Yes, if there are three errors, it may not maybe four errors, very large errors, it can go back and do some crazy things. But usually it will fail, right? Once it goes outside of the thing, it will fail. Okay? Hamming code is a nice and perfect code. It corrects all one errors and doesn't correct anything else. Okay? So how do you make the Hamming decoder fail in four symbols? You should have at least two errors in each of those four. So if you have eight errors, right? Distributing into four Hamming code words, all four will fail, right? So one can say that will result in four symbol errors at the input to the RS decoder which will make that RS decoder fail as well. Okay? So I should be able to find a weight eight error which is, which is what? Which is not decodable by this combination. Okay? What about weight seven? Can I find a weight seven error? What do you think? Can I claim t equals seven? How many of you like t equals seven? Okay? So to get an actual example might involve some work. Okay? So it's not, it's not very trivial but it looks like t equals seven is an answer here. Okay? Well, the minimum distance is what? 21. So you can correct three more errors which this multi-stage decoder is not correcting. Okay? So it's suboptimal in that way. Okay? If you were to do the optimal decoding, t equals seven is a problem. Okay? So some simple things to think about is can you modify this structure to be able to correct eight errors? Those are things to think about. What's the question? All right. So I think we're running out of time. So is that the last question or do we have more questions? Okay. So there's puncturing and shortening. I think I'm going to skip those things. It's quite trivial. I think you know what shortening is, what puncturing is, right? What is shortening? Set some message bits to zero and don't transmit them. Message symbols of bits to zero and don't transmit them. What is puncturing? You simply drop parities. Okay? So it's easy to describe in terms of generator matrix and parity check matrix. One can easily describe this. This remains the same. Yes. How do you get the generator matrix from GFX? Yeah, you can just shift, right? You can shift and do that. Okay. So well, there is some rate half convolutional encoder, which is again a very simple question. Question 16 is something we have seen before, right? There's nothing in question 16. Okay. And big deal. Question 17. Yeah, question 17 is a little bit interesting. I don't know if I want to go into it. Okay. I've not done union bound estimate at all, right? So it's very unlikely that you'll see a question like this. So did I do union bound estimate in this class? Okay. So I think we'll skip question 17. We'll consider question 17 as being outside of syllabus. Okay. So don't worry about question 17. Okay. Cool. So I think that's that pretty much brings to an end this whole thing.