 Okay, so I've been talking about the majority logic these days, the freedom of codes. So let's do one thing now. So what I'm going to do is I'm going to take an example and try and work out the equations and the multiple step algorithms that will come out. And with that, I think that's pretty much all we'll do in this class. Okay, and I think this evening's class we won't have since we're planning to do something in the evening so it's not going to work out because we won't have a class in the evening. Okay, so let's take an example. So let's take a slightly non-trivial example. Maybe we'll take the two-length 32. Let's take a slightly bigger example to see how this is going to come up. So like I said, it's enough if you show some kind of multiple step decoding algorithm for let's say the 0th position. That's what I'll do. That's the easiest. And do it for other positions also. To do it for the 0th position, you can always do it for any other position because it's going to go through. I'm going to use flats through the origin. So if you think flats through the origin, you use flats through whichever point you want and you'll get the same. Okay, so I'll do it for the 0th position. So what is the error correcting capability here? What are the minimum distance? 8, right? So you know that this parameter J is going to be 7. Okay, so this implies what is this J? J is the number of equations that you'll get, octagonal on either a bit, or a flat, or a 2 flat, etc. So since R is 2, this is going to be a 3-step algorithm. But instead of starting with the first step, I'll play and start with the third step first and then go towards the first step. So that's easier because we can come up with the equations in a slightly better way. So in the first step, so 3-step is possible. We know that 3-step is possible. But we'll start with the first step. In the first step, you're going to find E0, but you'll need 7 equations involving E0, right? So one of the 7 equations. So you can take it as any 7 you like. So you might take E0 plus E1, E2, E2, E0 plus E7. So this could be my 7 things that I want to get as input in my first step. So from here, if you do a majority on this, I'll get E0, right? Then what do you need? So let's say I only take E0 plus E1, but other things I'll repeat the same thing. I'm going to take, this is a line, right? 0 and 1 is a line. So you can remember what I mean when I say 1. What do I mean when I say 1? It is 0, 0, 0, 0, 1. What I mean when I say 2? It is 0, 0, 0, 1, 0. 7 would be 0, 0, 1, 1, 1. So it's 5 bit, guys. It's about the zeta, gamma 3 and dealing with those. 5, 2. So 0, 1 is a line, right? Line is just 2 points. Now I need flats that pass through 0, 1. How do I get that? All I have to do is find one more point and then XR it with this 1. So it's very easy to do that. So now I'm going to do is 4A2 plus E3 and then what? E4 plus E1 plus E4 plus E5, right? Anything I take, I XR it with 1. I'll get one more point. That will be the setup for the 2 flats. So this is one flat. This is for 2 flats. So like my other way down too, you can take E0 plus E1. What can I take here? 2 times 7, right? So 14 plus E15. So that will once again give me 7, 2 flats. All of them check E0 and E1, E0 plus E1. But then no 2 of them will have anything in common. So that's not enough. I have to go to 3 flats. So I'll take only the first one and show you the 3 flats. The other ones also you can do something similar. So I'll take only the first one. I'll show you the 3 flats. So I'll do that. We'll have E0 plus E1 plus E2 plus E3. I have to take one more guy and then XOR it with all the 1, 2, and 3 here. So I'm not going to take 4. If I take 4, I'll get E4 plus E5 plus E6 plus E7. At this point, I know this will do the first thing. Why do I know? Why do I know I can evaluate this sum? How do I know I can evaluate this sum? This is basically equal to R0 plus R1 plus R2 plus R3 plus R4 plus R4 plus R6 plus R7. What is that? This is a valid, see, this is a 3 flat. Incidence vectors of 3 flats are valid code words of the dual code. What is the dual code? Is that correct? Did I get that correct? Did I get it right or do I need to go one more step? Is this fine? So what's the dual of 2, 5? It's 1, 5, right? So I need 2, 5 itself? Oh, okay. Yeah, it's been subtraction wrongly. So 5 minus 2 minus 1 is 2 again. So 3 flats will go through 2, 5. So once I get the 2, 3 flats, I know this is a valid code word of the dual. So I will get those. So in my case, I can find other things. So I will give up R1 plus R2 plus R3. Once I get 4, I can take, see, 5, 6, 7, I should not take. I can take 8. Should I take 8? What happens? I give up 8, 9. 8 times equals 11. And this would be equal to some S2. I can evaluate S2 as the R0 sums. So I place it all the way down to 0 plus R1 plus R2 plus R3. The last one you might want to take would be what, I don't know. Maybe it's 28 or something. So we go to 28. It's going to be 28 plus 29 plus 30 plus 41. That would be S7. Alright, so this way. So it's a quick and easy way of coming up with all the equations that you need. So once you have equations like this, you evaluate S1 through S7. Take a majority. Majority will give you what? Majority will give you an estimate of E0 plus E1 plus E2 plus E. In case of a tie, there will be no tie here. There's no tie. After that, what do you do? You repeat the same process for E0 plus E1 plus E4 plus E5. All the way down to E0 plus E1 plus E14 plus E15. After the first step is over, you will have estimates for all these things. And then you take a majority on that. What will that give you? That will give you E0 plus E1. Now you repeat the same thing for E0 plus E2, E0 plus E7. You will get estimates for all these things. And you take a majority of this. That will give you E. This is where you proceed. So if you want to go to the last equation, it makes sense to start with the third step first. And then go through and go to the last. If you start with the last step, it's a bit confusing as to which flat I should take and all is confusing. So if you start with the third step first, it's much better. Any questions on this decoding algorithm? Does it seem okay? You're okay? All right. So that's all I wanted to cover in Read Miller course. So as far as Read Miller course is concerned, this will be the last class. And up to here is going to be included in your second course, which will be right in Tuesday. And what I'm going to ask is I'm going to ask that everybody write it. Whether you're doing projects or not or anything else. I'm going to ask that you write the exam. Okay. So don't skip the exam. Write the exam. I think it's important. Your evaluation, not that I'll do that later, but I want everybody to write the exam. Is that okay? Okay. So make sure you show up and write the exam. You don't have to necessarily do well. Just show up for the exam. I would like to see the performance. So what I'm going to do is I'm going to discuss some questions from the Read Miller course assignment. Okay. Did anybody have any chance of seeing it? You have a printer? Right. So I didn't have one. So hoping somebody would have a printer. Okay. So there's an assignment on Read Miller course. Okay. So I'm going to go through some of the problems today. Okay. I mean that. And the only other assignment that's missing, I think, is the BCH needs element code assignment. And that, I think, I'm hoping I can arrange for somebody to do it over the next week, but I'm not here the next week in case it's not possible, I'll do it on that Monday. Okay. On 24th, I'll do it and then on 25th, we'll have it. Okay. So the first question is quite easy. It says, given the block length of Read Miller course, we'll find all the dimensions and minimum distance. Okay. So that's a very standard formula for Rn of R command. n equals 2 Rn. k equals 1 plus n plus 1 plus 4 2. And 2 Rn equals 2 Rm minus R. So remember, we need the exact equality here. It's not like a bound in the BCH case. Okay. So it's an exact equality. Minus equal to 2 Rm minus R. That is the minimum weight that there is. So the second question asks you to fill out the table. And that's also a very similar question. The same thing except that it's arranged in the table. And you'll see some nice pattern in the table. It'll be like a possible triangle kind of table. So maybe you'll like that. We're going to look at that. Okay. Third question. We have to find generator and parity check matrices for Rm 2 comma 4. Okay. So I'll do you answer this question. I'll do you find a generator matrix. That is easy, right? Rm 2 comma 4. I'll do you find a parity check matrix. Yeah. So where is the dual? Where is the dual? Dual is Rm 1 comma 4. And we find the generator matrix for the dual. That will give you the parity check matrix. Okay. Find generator. So you don't have to really find any dual vectors or anything like that. Simply find the generator matrix. Okay. And the fourth question. It's two codes. It's for C1 plus Rm 1 comma 3. And C2 is for 8 comma 1 repetition code. Okay. Remember what? 8 comma 1 repetition code. It's also a read me letter 0 comma 3. Okay. And the question asks you to find C here. It is the U into plus B. U from C1 and B from C2. Okay. We know the answer to this question, right? What is the answer? C is going to be Rm 1 comma 4. So that's the standard Rm perception. Okay. So R comma m is given by R plus 1 comma m is given by R comma m and R plus 1. Okay. So something like that. I think I got it right. Maybe there is a mix up here. Okay. So what will be the minimum distance? Yeah. It's going to be 8. B2 2 D1. Okay. So this is quite a standard result. It's not anything like that. Okay. The first question is an interesting question. I'll urge you to try it. It's called the randomization lemma. If you have S of Vm to Vm being any Boolean function. Because it's an arbitrary Boolean function. What do you mean by a Boolean function? You know that, right? It takes values 0 and 1. It has 2 prime inputs, 1 output. Okay. It's a Boolean function. You have to show Vm or it could be any other V. Okay. Vm is just chosen for just one example. Plus, what's for V1 to Vm? Okay. It takes values 0 and 1 equally output. Think about whether that makes sense or not. Okay. Right? It's called the randomization lemma. So you have a Boolean function which maybe is not uniform. It doesn't take 0s and 1s equally like this. How do you make it uniform? Simply add any one Vm to it and you become uniform. Okay. So it's not a very difficult proof. Think about how you might want to prove it. Okay. So there are various methods of proving it. Yeah. See this plus is X up. Okay. What will happen? So you're saying V1 to Vm, this is a function which is? Only for the last one. Only for the last one, no? So what happens when you add Vm? When you add Vm to that, what happens? Oh, that's interesting. I didn't know. I mean I took this from the group. I thought it was true. I think it's true. Let me think about it. And of all these things. So it will be 0 all the way except for the last one where it will be 1. Now if you exert it to Vm, what happens? Wherever Vm is 0, it will again be 0. If Vm is 1, what is the Xr with this? It's going to be 0 for the last alone. Maybe this plus is not an Xr one. You have to go back and see what the... I'm sorry? If it is Vm itself. So it cannot be Xr. I think Xr is wrong then. Plus interpretation. I should go back and look at the book and figure out what the plus is exactly. What if the plus is R? Is it R? Yeah, but maybe it's R. Maybe the plus has to be interpreted as R. It could be wrong. I saw in the book it was going at plus. I just assumed it's Xr. Maybe the plus is R. I don't know. I'll check it and correct the question. So there is this motion of adding a Vm to make it equally likely. Sorry? Whenever Vm is 1, the R is 1. So whenever Vm is 0, the R is f of V1 moving Vm. Which means it has to be 0 whenever Vm is 0. I don't know. So let me go back and check this and come back. I know there is an equation like this. I'm trying to think why is this not working out? It's supposed to be... I think maybe this is Vm minus 1 or something. I don't know. Maybe here I made a mistake or something. Maybe in the popping I made a mistake. There is a version like this. There is a randomization lemma which works definitely like this. You take any boolean function and you add Vm. Yeah, I think it's Vm minus 1. I think that's why I made a mistake. Let me check this. Yeah, there's a very easy way to prove it by just saying the number of values it takes is the same. It's not very hard to prove it. Yeah, maybe this is just Vm minus 1. So that will work. I think that's... It's an easy proof. It's a proof like that. So it's not very hard to visualize it. So I was confused as to why it's not working out. I think this is true, right? This is true. So when Vm is 0, it takes the same number of constants. 1 also it takes. And then it's 2 power m and then you go to minus that and it will be the same. Is it okay? This is okay. I think this is correct. Here is XOR, yeah. This is XOR. Okay, that's the m minus 1 problem. All right, so this is the randomization. Let me use it sometimes. And actually I used it in one application. We need a good Boolean function. It's just random. This is how you make it run. Okay, so the next question... I'm going to skip. It's not a very difficult question. It's a very easy question. So maybe I'll just quickly state it. So it says Rn of r plus 1, m. That's all. u plus v. But u always belongs to equal to r, m. And then v, when it's 0, each term, degree, is equal to r plus 1. Okay, this is a very easy statement. You know, I mean, you take... What is Rn of r plus 1, m? It has all polynomials of degree less than or equal to r plus 1. Take all the terms inside degree equal to r plus 1. Keep it separately. Then look at the remaining guy. Obviously that's going to belong to Rn of r plus 1, m. Okay, so you either have no degree r plus 1 terms or you have only r plus 1 terms. So v is basically the r plus 1 degree terms in your code polynomial. And u is the remaining term. The remaining term will belong to Rn of r plus 1, m. And this will belong to r plus 1. Okay, so it's very easy to show. So sixth question I'll leave out. Seventh is interesting. I wanted to think about it. Okay. So you have a code of block length n. And you want to do one-step majority-magic decoding. Okay, n is the block length. One-step majority-magic decoding. Okay? So number of errors... Number of... Okay, so error-correcting capability. This will be right back there. So at the end of the story, we have to show error-correcting capability is less than or equal to n minus 1 by 2 times d prime minus 1 where d prime is the d min of the dual code. Okay? So you have an nk4c and you're doing one-step majority-magic decoding. Okay? If you do one-step majority-magic decoding, the error-correcting capability is less than or equal to n minus 1 by 2 times d prime minus 2. Okay? So think about it for a while. I'll give you both. Any ideas? How do you do something like this? Okay, so when I say error-correcting capability is bounded, what is bounded? Something is bounded, right? There is this... Before you go to the error-correcting capability, what should you start with? In majority-magic decoding, what do you start with? J, right? What is that J? Number of orthogonal private sets on any one coordinate. Okay? So that J has to be bounded. What should be the bounded J? The number of error-correcting capability is n minus 1 by 2 times d prime minus 1. J should have an upper bound. What should be the upper bound on J? 2 times 1 minus 1 by d prime minus 1. Okay? So that should be the bottom one. Okay? So if you have J orthogonal private sets on side with 1, then J has to be less than or equal to n minus 1 by d prime minus 1. So how do d prime enter the picture? Which is minimum distance if you do it. Why does it enter the picture? Yeah, the private checks are co-brows of the dual. Okay? So the number of ones in each parity check has to be at least greater than d prime. One of them will be there, will be 1, right? The remaining ones will be at least d prime minus 1. And I want no two of them to have anything in common. So what's the maximum I can have? n minus 1 by d prime minus 1. Can't have more than that. Okay? So it's as simple as that. Very simple argument. You see that? Okay? So if you want, you can write it down very precisely. Suppose I'm looking for, so these are my two positions. Okay? I'm looking for code words, dual code words, up to the middle on the first bit. Okay? So suppose I have j of them. Okay? The first position is 1. The remaining will be spread out. Okay? So we'll have ones here. And then there will be no overlap. Let's suppose we'll go to the last one. Okay? So, okay? Each weight here is what? At least d prime minus 1. And you have how many here? n minus 1. So clearly j has to be less than or equal to n minus 1 by d prime minus 1. Okay? Cannot be greater than that. So the error-corrected probability has to be there. Okay? How do I get this from this? Is it okay? So already, okay? No two of them overlap. So j times d prime minus 1 has to be less than or equal to n minus 1. Where n minus 1 is the total number here. Cannot be greater than n minus 1. Okay? It's greater than n minus 1. It means what? Two of them. They're not here overlap. No, they're not here less than. Is it okay? This is for one step. There's a similar result which is a which I'm not going to prove here. So it turns out if you have other step probability logic decoding, error-correcting capability, it's less than or equal to n by d prime minus 1 by 2. So think about how you will prove a result like this. It's a bit complicated to prove this. So one feature of this result is suppose you take a reach-salomon code, what about its parameters? nk n minus k plus 1, right? It's dual turn cell. It's also a reach-salomon code. You can show this. You can show this. You never showed this in class. And the minimum distance is k plus 1. So it turns out dual and dual like this. So here you have k plus 1. So what will be the error-correcting capability? My method will have the one step method. It will have the decoding for reach-salomon codes. It's bounded by n minus 1 by 2 times k minus 1. So if n by k is anything not too large, unless you have k being really, really small, this will be nothing. So this is what this bound means is for reach-salomon codes and all, you cannot put to achieve much by one step method of the decoding. So you will not get much. Even this is bad. k3, the n by d prime will again become n by k. So even instead of method of the decoding, you won't do much for each element. You have to try to prove this. I'm not going to prove it in class. It's a modification of the proof, but you have to do more work. It's not as simple as this. You have to go to n step and then you have to try to count it more carefully yourself. You'll get this answer n by d prime, honestly. All right, the next one is interesting. If there is a code C and by this, here are the checks of the bundle and each coordinate. That implies d minus greater than i could be at first. How do you prove this? One way to kind of roughly argue this is to say you can correct j by 2 errors. Which means d minus has to be definitely greater than or equal to j plus 1. But that seems like a crude argument. I mean, we are not really explicitly using this very nicely. So it turns out you can also do that. So once again, go back to this picture here. This picture is a nice picture that I have in mind. So you have a situation like this for every single coordinate. So if you have a non-zero code word, it has at least one coordinate which is non-zero. You go to that coordinate. Maybe it is 1. So you go to that coordinate and then look at all these orthogonal partitions. This guy is 1. Which means among these guys, among these guys, there should be at least how many ones? Assemble one. Again, amongst these guys, there should be at least assembly one. What I really mean is amongst these kids. So amongst these guys here, there should be a single one. Likewise, there will be at least a single one in a set of j. So you have j plus 1, which is itself. So you can directly argue that there will be minimum distance. That's okay. Okay, so that's for that. And then the 10th question asks you to devise majority logic decoders. I'm going to skip that. So this is to, for instance, devise majority logic decoders. 7, 4, amin code. We're actually done in class. Okay. And the other thing we'll ask is the 15, 7, 2 over-correcting BCH code. Okay, think about how you might want to do that. This is very, it's very interesting algorithm for the 15, 7 code also. Just think about how you might want to do that. So the 11th question I'm going to throw open for discussion right now. We're not very sure what the answer is going to be. Okay. So, for the read molecule r, m, minimum distance is 2 power m minus r. The 11th question is about devising a 2 power m minus r minus 1 erasure-correcting decoders. Is this possible? How will you devise erasure-correcting? How will you correct erasure-correcting? We can correct. Yeah, I mean it's correctable. I'm not, I'm not problems with saying that we're not correctable. You have to come up with a decoder which will correct it. That's my question. And then also a simple decoder. See, one decoder you can always do for erasures is the following. Okay, so remember this. This is a very simple idea but we should remember this. So if you have a parity check matrix for the code, okay, you know that h times r transpose equals, did I get this? h times c transpose equals 0, right? You know this. Okay, now what has happened when you go through an erasure channel when you have erasures, what is not erasure-correcting is actually received correctly. When you have 2 power m minus r minus 1 erasure-correcting, you cannot hope to correct any errors. If you want to correct this many erasure-correcting, then no errors will be correctable. So only erasure-correcting will be there. So outside of erasure-correcting, you can assume there are no errors. Okay, so let's assume that first. Once you assume that, what happens? So the received word r is actually what? I will describe the received word r. If the label contains, if it contains c1, c2, all of a sudden it will equal erasure. Okay? So whenever you have an erasure, put a variable there. X1. Okay? And then likewise we have X2. Say you have Xe. Okay, the last one is cm. So there are e variables in my r. Variables that I don't know. Okay? So it's unknown to me. I received the erasure. Every other coordinate is exactly known, accurately known. You can assume that. Only then you can correct 2 power m minus r minus 1 erasure. Otherwise you can't correct it. So you assume outside of it, everything is known to you. Then what happens? What will be the H-times? So for the code word, H-times this is equal to 0, right? You see that? So the valid code word, this has to be true. Okay? So you take only the variables corresponding to this. Which means you take the sub-matrix of H corresponding to the corresponding to this position. Okay? So you will get Hx times X1 through Xe equals sum s and the s will be exact. Okay? How can I compute this? I will get the s here on the right. I didn't get the H-times, the remaining here I have the checks, right? Those correspond to the columns of H which got erased. The remaining columns are not erased. I know the exact bit that was received. So you multiply by that and you will get this. Okay? So if you want a simple example, if your H is something like 0, 1, 1, 0, 1, 1, 1, 1. Okay? And if you receive an erasure which is C1 X1 C3 Okay? What does this translate to? Okay? 1, 0 times X1 equals basically 0, 1, 1, 1 times C1, C3. Okay? So that's what I mean. Okay? So this you can multiply out because you know C1 and C3 exactly. So you multiply out and you will get a vector. Same thing you do here. So that you have N and it was not known to me. So whatever you have known things you multiply it out. You will get just one vector. Whatever is unknown to keep as an unknown variable. So how do I know that this will have a solution or a unique solution? Okay? What's there to use this? 2 power M minus R minus 1. I know E is less than or equal to 2 power M minus R minus 1. Okay? That implies HX will have full column rank. Where is that? Why will HX have full column rank if E is less than or equal to 2 power M minus 1? See, the number of columns here is E and E is less than or equal to 2 power M minus 1 which is B minus 1. Okay? So number of columns is less than or equal to minimum distance that will be linearly independent. So it will have full column rank. So this will have a unique solution. Okay? So you go and find that unique solution. You can fix your equations. Okay? So when you want to correct only erasures assuming everything else is error-free there is no problem you can actually correct them. Okay? How about correcting mixtures? Okay? Where you have to come up with some smart algorithm? Of course you can do algorithm decoding on the punctured version. Maximum likelihood decoding on the punctured version. That is one direct method it always exists, right? So that's how we prove that result. But what if you want a simple algorithm for erasures and error-correcting? Can you adapt your maximum likelihood decode or your majority logic decoder here to correct erasures? That's the question that is interesting. Think about it. The answer I've given does not really tackle that because it doesn't tackle the error part. Can you correct erasures as well as erasures? That's the question that is interesting for readmiller codes. I don't know if I've seen any algorithm for that. Maybe there is something out there I haven't seen. Okay? Okay, so that's all the problems on readmiller code assignment. It's not a it's not it's not very large like the other ones with the reinforcement code and the dch code of environments that speak about. Okay, so we'll stop here for today.