 So, this is lecture 6 as usual without the L we make a good beginning, come back and see. So, that is lecture 6 and so the last thing we saw in the last class was this relationship between parity check matrices and minimum distance and I wanted you to spend time thinking about it and how different it was from the rank. So, what was the relationship d min equals minimum number of linearly dependent columns of h. So, it is a very different kind of a thing to calculate for a channel for a I am sorry for a parity check matrix I don't know why I said channel sorry. So, it is the minimum number of linearly dependent columns of parity check matrix and for any matrix this is a strange thing to calculate and as I have said it is mostly difficult where all these desks empty what are you guys doing at the very last thing I want the last two rows to shift to these benches come on up front that is the fan don't turn the fans off no no no no ok alright so that is the that is the set up and let us do this by say by I mean it is not too difficult to guess quite often but sometimes it can be misleading ok. So, let us let us take a few examples and take a look at what we might do the first is the example that I had before the 6 3 example that I have been using all the time sorry 0 1 0 this is my 6 3 example ok how do you compute this quantity how do you compute the minimum number of columns of h that are linearly dependent ok. So, the only way to do this in a foolproof fashion is to start from start from 1 then go to 2 and then go to 3 ok don't don't try to intelligently guess saying this matrix is I mean you could try intelligently but you should be very sure of what you are doing ok. But if you just want to take a brute force approach first eliminate make sure that there is no column that is 0 ok that is the only way in which they can be one column that is linearly dependent ok so you have to go check one after the other ok can you have d equals 1 ok in this matrix it is not possible right why so can there be one column of h which is linearly dependent it can yeah if it is 0 0 0 but there is no there is no all 0 column here ok so this is ruled out ok so that is how you proceed ok what about 2 columns can you have 2 columns of h that are linearly dependent what should be what should happen for 2 binary columns 2 binary vectors to be linearly dependent there should be equal ok so 2 columns should be equal you see all the columns are distinct so you know this also is not possible and then you have to go and check if ok at this point you can conclude something what can you conclude at this point ds I am sorry no but when you when you looked at d equals 1 you can conclude d is greater than or equal to 2 right that is the only thing you can conclude you cannot conclude d is equal to 2 ok keep that also on mind even here you can conclude d is greater than or equal to 3 you cannot conclude it is equal to 3 how will you conclude it is equal to 3 you have to actually find 3 columns that are linearly dependent or 3 columns in this case which will add to 0 ok can you can you find that yeah there are several 3 columns that will add to 0 right for instance to take this this and this that adds to 0 so d equals 3 is ok and you have to actually show which columns are linearly dependent ok that is the only way to do it ok so let us try a slightly more complicated example to get used to this idea and then we will look at some simple results that follow from this ok about this matrix ok so 4 by 8 matrix so it is an 8 4 code I want you to think about minimum distance of this code ok let us go through the same argument can you have d equals 1 no ok so you can conclude d is greater than or equal to 2 can you have d equals 2 right you see these two are very very easy to conclude what about d equals 3 ok this is difficult to conclude ok so you cannot really make any decisions on d equals 3 directly by looking remember it is very tempting to do that ok you could say for instance you have an identity column identity matrix on the left hand side the first 4 columns make an identity matrix and then you have every other column having at least 3 ones so you might say it is very tempting to conclude that there is no way there will be 3 columns which will add to 0 but what are you ignoring there what is what is wrong with that argument ok you could have 2 columns here adding to give you some column of weight 1 ok it could happen ok in this case it would not happen I have chosen it that way but it could happen for instance if I replace this 0 say with the 1 what can happen ok the same logic still holds every column here has weighed at least 3 but we actually add these 2 columns what happens you get weight 1 so you might get something ok so it is very sensitive to what is there on the other side and it is very difficult to generalize this argument beyond 2 ok and do not do it it is very dangerous unless you are very good at spotting these things you will miss it ok so in this case can you find 3 columns so only way to eliminate d equals 3 is to actually try all possibilities ok you do not have to try too many here try cases here and make sure I mean you have to try you can try it in various ways you can be smart about trying all possibilities or you can try it just by brute force it is quite a few to try try all that and eliminate ok in this case you might be able to eliminate d equals 3 ok I believe you can ok so there will be no d equals 3 but we do not know it remember ok so this is more difficult to eliminate than the other 2 cases ok in general ok this is more difficult ok so you will see you will see even in construction this will be true getting up to d equals 3 is ok so this is this is one problem right given a parity check matrix how do you find this number d minimum number of linearly dependent columns is of h ok but what I am actually interested in doing the reverse suppose I want a particular minimum distance how do I construct a matrix so that the minimum number of linearly dependent columns is that number ok you will see even in that reverse problem will face the same problem up to d equals 3 everything will be very nice when you want to say anything beyond d equals 3 you will find just dealing with binary matrices is very difficult ok there is a wonderful elegant solution to that which is what we will see as we go along ok so which uses some more advanced mathematical notions but using just binary fields binary entries is a little bit difficult to deal with that ok so that's the point I want to come ok so let's see that more closely now let's look at the reverse problem ok given that you want a particular d how do you go about constructing parity check matrices with that d ok so that's what we'll see next assuming I can go to the next page so let's see the reverse problem design of h ok I'll start with d equals 3 ok that's the most non-trivial thing because it can correct one error right so you'd like to correct start with d equals 3 I mean if you say d equals 2 yeah maybe you can have it but you can't even correct any error with it ok so maybe you're not interested in d equals 2 maybe interested in d equals 3 so how do you go about designing for it suppose ok the first thing you have to decide is there are too many possibilities n k and d all three have to decide so let's let's at least start with given n ok so let's say we start with given n ok you can also start with so many other things right so for h you need what n minus k by n I'll call this n minus k a small r ok so you should be either given r or n then then you have to design the other thing if you have to design we will end up designing both we'll start with given n ok suppose you're given a block length n how do you go about constructing a parity check matrix with d equals 3 ok so I need some some I have to optimize something ok to come up with some good constructions ok what should I optimize in parity check matrix ok I think it's better to keep it open can you keep it fully open in case there's a fire we need to run out you know there's been a fire in this room if you didn't know I'm very serious ok alright so so so in the design given n for a particular d what would you like to optimize for parity check matrix what would you like to be small or large or minimum number of rows why why do you want minimum number of rows in your parity check matrix maximum rate rate see number of rows is n minus k when you minimize n minus k you're maximizing what k and why would you want to maximize k that's the rate right so rate is very important rate versus probability of error big giving d equals 3 I'm saying I can correct one error which means my probability of error will go as p squared as opposed to p ok that's good seems to be nice but I should not pay too high a penalty in rate my rate should not become too low so I will try to minimize r in the construction of an r bar by n parity check matrix so you given n you minimize r that's the goal ok so let's try a few examples before we plunge into the actual general method let's say I start with an equal 6 ok ok right so I have six columns I have to put in six columns for h so that the minimum number of linearly dependent columns is 3 ok so again the way to do it is make sure that the minimum number of linearly dependent columns is not one how do you make sure that the minimum number of linearly dependent columns will not be one avoid all zero columns make sure that the minimum number of linearly dependent columns will not be two how do you make sure that's happens don't repeat any columns so you have to be able to put in six columns without the all zero column right and not repeat so what's the minimum r see remember each column is a vector from 0 1 par r right it's an orbit vector right each column is an orbit vector you see that right that's clear so what's what's the smallest r you can have so that yeah three right you can't have less than three if you have two what happens there are only three non-zeroes you'll have to end up repeating so you'll get only two you can there's no way you can get more than two ok so you see r needs to be three ok and then is there when how do you construct the edge is there one possibility or how many possibilities do you think there will be putting in these six columns yeah seven C six right there are seven different ways in which you can do it up to permutation equivalence right so you can do that but you'll see a lot of those codes will be same and the particular code that I gave you the 633 code is one such code you can go back and see just arrange it so that it's systematic but it's one such code you can have so many other possibilities right several ways of doing this okay is that clear that's how you do it okay let's try let's say n equals 13 what should happen four right you need r equals four you can't do it below below r equals four if you have r equals three you have only seven different three bit vectors and you have to start repeating okay there's no way you can have 13 non-zero three bit vectors and not have any repeat you don't have enough of them okay so you need to go to four and there are several possibilities now maybe 16 choose 13 possibilities you want to think of it that 15 choose 13 there are several more possibilities but you can always do it this is not a problem okay there's also an interesting question to ask kind of in the reverse way okay suppose I'm saying I'm not I'm not given n but I'm given r okay so if you want you can write down a general formula for this case also I'm sorry to go back but you can write on a general formula what do you think the minimum r will be for a given n sorry log base two and then you have to seal it right so you do log base two and then seal so that you can show will be the will be the smallest r with which you can accomplish minimum distance and okay there's also an another way of doing this design suppose you say you're given r okay given r as opposed to being given n so as you're told I can add only this many parity bits I can't add more than this many parity bits right so number number here is the number of parity bits you can add add r right redundant redundant bits okay and what would you try now to maximize or minimize you will try to maximize n right that's the that's the goal is that clear you want to maximize n okay right so you can do this in various ways so let's again do it by example first and then we'll generalize like that okay suppose I say r equals two okay let's say r equals one I'm sorry let's start with r equals one just for fun okay it's no big deal I say r equals one what's the only thing you can do right I can do only one so you can have an equals one what will be the parity check matrix okay it's just a silly little game you can play there's nothing nothing of interest here okay the next thing is let's try r equals two okay what's the maximum n I can have three so in general also the formula is very clear right what will be the general formula for the maximum n two per r minus one that's the total number of non-zero vectors okay very easy what will be h one zero zero one I'll write it in this nice order so that you get that okay what is the code corresponding to this edge right this will be a what will be the parameters of this code three comma what will be k one right one how did I get this it's n minus r right and minimum distance will be three okay what will be the code word three one three what do you think the code word should be go ahead and find it if you want okay how do you find the code words from the parity check matrix right you remember you would identify where the message comes and where the parity comes right here you will have the parity part and here you will have the message part there's only a one bit message put in a zero there put in a one there you'll list out the two code words if you put a zero there what do you get zero zero and then if you put a one there you get one one is that clear okay is that clear okay so that's the code three one three it's actually the n equals three repetition code okay when you try to maximize n okay the next interesting case I'll I'll use the next page for it is r equals three then you can have n equals seven and you'll have a parity check matrix for the seven four three code I'll write it in this form just for okay you can write it in any order right the ordering doesn't matter simply wrote it in this form okay so this is a seven four three code okay okay I skipped a small step on the proof okay when I said I'm putting in all the orbit non-zero vectors okay I have assumed something when I said this number was four whatever I assumed say I came up with this parity check matrix that's fine but then I said k is actually four whatever I assumed when I went from whatever what should I prove from you go from there to there it's full rank right I have to show the rank of this hs r how can I show the rank will be r it's very easy to show rank is r I can easily find r linearly dependent columns what are those are linearly dependent columns the identity matrix will always be there right so you'll have the i there so it will always be full rank so you know the rank will be r it's not a problem okay so you get the seven four three code okay all these codes given an r you try to maximize and those codes are called hamming codes okay so that's the definition for the hamming code okay so they would have what n equals 2 power r minus 1 k equals what 2 power r minus 1 minus r and d equals 3 that would be the parameters of the hamming code the binary hamming code okay so this is the binary hamming code okay it's one of the oldest codes to be invented it's very it's very interesting and very very simple and nice to describe just error correcting capability one okay so as you increase r you'll get better and better codes for the same minimum distance right so you see for instance if you if you were to write down say a table r and k and then k over n okay for three you got you had seven four which is four by seven okay which is not such a large rate okay again remember d is always three okay if you go to four you immediately get fifteen eleven eleven by fifteen which is larger than four by seven right so again you get d equals three go to r equals five you would get thirty one twenty six twenty six by thirty one which is again larger for the same minimum distance you go to six you'd get sixty three fifty seven fifty seven by sixty three is larger than so you see you see the advantage with going for larger n and larger k right somebody was asking me the question for the same rate for the same minimum distance right you get better and better efficiencies but it's not a very great thing why this increase is not very great why yeah because d is still three and n is increasing you can only correct one error out of say sixty three here where you could correct one error out of seven bits which is probably good but so so you'll see quickly what is more important is d over n and not just d okay so you see what happens to d over n that also is decreasing exponentially to zero right it's going down to zero so these codes will probably not be very good for large even though they seem to be getting higher rate they probably not will not be very great when n becomes very large okay one can expect that maybe okay but they have still very good codes the efficiency goes up very much and this code has seen a lot of utility in practice okay there is a way to do something with it and make it very very useful okay okay that's the binary hamming code okay all right any questions on this fine okay so i'm going to take the 743 hamming code and try to do syndrome decoding with it just for fun just to remind you that we're still in the decoding business we're not just constructing codes we also want to be able to decode it okay so let's try the syndrome decoding for this for the 743 hamming code okay so for this for this you'll see i'll pick my parity check matrix in this fashion i'll simply write down i'll write it down and then you tell me how i how what in what order have i done it okay this is a different order from the previous one right what is this order it's just increasing order right 1 2 3 4 5 6 7 so what i wrote it okay okay it's clear suppose i get suppose i receive some vector r okay suppose i say i receive a vector r and then from there i compute a syndrome s okay okay so s is what s is a three bit syndrome right okay three bits right i can compute s equals h times r transpose that is your that is your syndrome it's what you did to get the syndrome s okay so you see making this table will be very very easy suppose given the syndrome i want to find e cap okay and then i can make a table right right this is what i need to do at the decoder if i can make this table ahead of time i don't have to do it online when this r comes in i know i'm going to find the syndrome and then for each syndrome i'll get a particular e cap how do i find e cap from s what's the definition how do you do it the minimum weight solution for s equals h times e transpose that's e cap right so i can do that solution ahead of time listing out all the possible syndromes right syndrome is just three bits so how many possible syndromes will i have eight possible syndromes 00001 all those things i can write down e cap ahead of time right this is this is the steps towards the syndrome decoder i was talking about right that's that's what that's what is done syndrome table i was talking about okay so for instance if syndrome is 0000 what's what's my e cap going to be all zeros right so there's no problem there it's going to be all zeros okay as the syndrome changes you'll see for the hamming code it's very trivial to find the least weight error vector you know you can correct all the weight weight one error vectors and you'll see all the weight one error vectors will exactly come in for each syndrome right you see what is what are the different three bit vectors non-zero three bit vectors they are all the columns of h okay so i can easily list down e cap so for instance if i say 001 what will be e cap one followed by all zeros okay it's very very easy to do this right likewise i can write on for instance if i say 101 what is that 0000100 that's it okay it's very easy so you'll see all the all the cases will be covered here 111 okay all the cases will be covered here is that clear okay okay so let's try to take a graphical view of what's happening here once again okay so go back to this graphical star and that view right right you have how many code words you have 16 code words okay the non-overlapping sphere radius is what t equals 1 right d is 3 t is 1 okay so how many vectors will there be in each non-overlapping sphere 1 plus 7 8 right okay number of vectors in each non-overlapping sphere will be equals 8 what is 16 times 8 around each code word you have a non-overlapping sphere 16 times 8 is what 128 now why is that 128 special that is all the seven bit code words it means there will be no vectors hanging out outside of your non-overlapping spheres okay maybe that's that's a nice thing to have okay i don't know maybe i don't know if it's nice from a decoding or decoding or encoding point of view but at least i know from a structure point of view it's very nice previously we never had that right most of the codes we had we always saw well for the repetition code actually we had this property but for other codes we always saw there would be these non-over overlapping spheres but then also there'll be other vectors floating around for which you do fight okay here it turns out nothing like that happens okay 16 into 8 is 128 and that's very nice okay codes that satisfy this property are called perfect codes okay and there's lots of nice theory about it and all that is there we won't we won't go into detail but but if you're interested you can look at these things in fact people know exactly what the perfect codes are very few of them some three or four of them different kinds and it's been classified it's very nice okay so i think i think that's that's all i want to say about hamming codes okay but this idea of the syndrome table if i did not emphasize it is quite important okay for large n and large k it may not be that useful but for small n you can always do a table lookup decoder okay you compute the syndrome table for all possible syndromes you solve that s equals h e e transpose ahead of time and put it in a table okay and then all your decoder has to do as a table lookup computes a syndrome goes to the table finds e cap then adds it to r and gets c cap okay so it's a very simple way of implementing it but again for large n and large k it will become difficult why how many syndromes will you have 2 power n minus k syndromes okay if n minus k is 500 it will become 2 per 500 you can't do so it's even for reasonable numbers that's tough okay so it's not a very efficient implementation but one could think of doing it okay so that's syndrome decoding the next thing i want to do is deal with d equals 4 okay so how do you do a design for d equals 4 here we'll use some ideas which are very simple and based on modifying existing codes okay this ideas the idea is from modification of existing codes okay there are several ways of doing modification of existing codes i will talk about a few of them now in general and then i'll pick out the one which gives us this d equals 4 construction which is very nice okay so what do i mean by modifying existing codes you have you have a code so instead of code words you want to do something to it to come up with another code okay so you might change so you have n k and d you know you might want to change do some modification to change n and then k and that might imply some change in d okay so that's the thing we'll do modifying codes that's the general idea okay so i'll first do the modification that results in d equals 4 okay and then we'll look at other modifications the first modification is what is called extension extending a code okay suppose i have a n k d code c okay i have an n k d code c okay i will make a new code which i will call say c e okay i don't know how do i want to call it i'll call it like this means c extended okay this is going to be okay let me write it down carefully okay vectors of the form x 0 x 1 x n minus 1 and then an x n such that x 0 x 1 x n minus 1 belongs to c and then x n equals x 0 plus x 1 plus x n minus 1 you understand this is what i'm going to do in extension okay is that construction a little bit clear i think the definition is quite detailed okay so i'm going to collect into c e all vectors of length what i mean some vectors some vectors sorry not all vectors some vectors of length what is the length of each vector in c e n plus 1 not n okay but each vector how is it formed the first n bit should be a should be what the code word from c and then what is the n plus 1th bit it's the overall parity of that code word okay right is that clear that's how i do extension okay so if i were to think in terms of parameters of this code c e what will it be so this will be what will be the block length block length is the easiest parameter to find out always n plus 1 there's no problem what about message length k why will it be k for every code word you will have a code word here okay so it's k no problem what about d d plus 1 always sorry okay let's ah well it's doesn't seem that clear right you have to consider two different cases to come up with a complete answer what will be the two different cases that you have to consider when will that extra bit be one that's the problem right for each low weight code word for each code word of minimum weight in c if that extra bit was one then what will happen the minimum weight will become d plus 1 but if for even one code word of minimum weight in c if that extra bit that you added was a 0 then it will stay at d okay when will that case i described happened when will for each code word of sorry odd or even right d is odd or even is the key important thing suppose i had d to be odd what will happen right it will become it will become d plus 1 do you see that because for every code word of minimum weight that minimum weight was odd which means the overall parity will be 1 do you understand that case you have an odd number of once adding up see you're adding up all the bits of the code word if the number of bits you added here was odd then this would be 1 if it is even then this would be 0 right it's a model of two addition okay so that's the logic here so here this is going to be d plus 1 if if d is odd okay d if d is even okay so you see this is a different way of dealing with minimum distance i did not go back to the parity check matrix okay i have not come to the parity check matrix i'm going to come to it soon enough okay we'll we'll we'll look at it closely enough soon enough but but this is a different way of figuring out minimum weight right so all these tricks are used when people talk about minimum weight and all that okay is that clear the extension extension part is clear okay so now before i go to the parity check matrix and all that of this why is this very easy how can this be directly used for d equals 4 how will i use this for constructing d equals 4 codes exactly so you construct d equals 3 first and then what do you do extend it so the any extension of the d equals 3 code will have d equals 4 that's a very simple way of doing okay so that's how you construct for d equals 4 there's no problem d equals 3 pretty much gives you d equals 4 in fact you only have to worry about designing d equals odd number right every time you have a d equals odd number code what will you do always extend and go to d equals even imagine you're not losing much right n goes to n plus 1 k i mean any real design n and n plus 1 should not be a real problem okay if you if you can live with the n k code you should be able to leave with the k comma n plus 1 code okay it's not a big deal it's not it's not not kill you too much okay so it's not a big deal okay so that's the extension the next question i'm going to ask is yes i have not come to d equals 5 it's that's the non-trivial problem that's what will require a lot of and what will seem to be unnecessary mathematics but at the end of the day it's very useful okay all right so so the next question i'm going to ask will be we'll test your understanding of parity check matrix generator matrix and all that okay it will tell you now if you've really read about these things outside of class or if you're just coming here and hoping to gain everything from the class okay so the next question i'm going to ask is i'm going to say c has generator matrix g and parity check matrix h i want you to spend a few minutes and come up with the parity check matrix for c e and a generator matrix maybe for c you start with parity check matrix okay it'll turn out that's the easier one find the parity check matrix for c e in using h also okay so you can assume h is known to you and then why will you modify h to come up with the parity check matrix for c e that's the question column will not quite be all zeros but that's the idea that's the way to think about it before you start about modifying what should you know you should know the dimension because that'll tell you how to modify okay you know what to do should you add something subtract something how will it look that's the first step okay once you do that and then you figure out how to what to put there okay next step okay so what what will be the dimensions for c for this this is going to be say n minus k by n that's okay okay what about for c e where h e that's going to have dimensions what n minus k plus 1 by n plus 1 okay so if we were to modify this what should happen you should add another column and you should add another row okay the way that will work out i'll write it down and then i'll try to justify it okay so you have to think about this and be comfortable with these notions before you can get there i'm going to put h here okay the reason why i'm putting h as part of that is i know part of my code word satisfies all the parity checks from h okay so what should i do to make make that happen i should add zeros right so you see that the way i'll do it let me write down fully and then i'll explain the logic okay so i'm going to put zeros here all the way down here okay then i know all these are parity checks that will be satisfied by each code word in c e y because this is zero so it doesn't matter what the extension is right and the remaining bits have to satisfy the this parity okay so you should always visualize h e multiplying a code word on the right okay you should be able to quickly visualize that so which columns of h e will multiply which bits of my new code word so you see the last column will multiply the added parity bit so i make that zero which means that parity bit is not involved in any of these checks okay so naturally i'll get the whole checks being satisfied there's no problem okay what about the last see i've added an extra row all once right so you see the all once comes in very easily okay then what's the next thing to check should we check or is it all if you're convinced it's all it's okay but there's a technical thing which you have to check just to be sure what is that the rank is full rank right you have to check that how do i know the rank will be full yeah the last column you see if you had an identity there you could take that bottom part and then add on the last column you would get an upper triangular matrix right with all ones on the diagonal and that will definitely give you rank plus one right full rank so all those things should be able to visualize and convince yourself that this is fine is a parity check matrix generator matrix what will you do what will you do with the generator matrix suppose i had a generator matrix g here what will be the dimensions of g e k by n plus one right so it's very easy actually also to come up with a generator matrix don't think of it this way okay so all you need to do is what add one column what will be that column that you add all once oh can't be once let me see what is each row of a generator matrix one still k so each row of g is what is the valid codeword of your code okay so each row of the original g was a codeword of your original code each row of the new g e should be yeah exactly there each row to each row you will add the parity of that row exactly basically you do what you did to the codeword to extend it and just keep adding it will not be all once you will add whatever is necessary to make that row have even parity right if it's already even then yeah your ladder zero if it's odd then you'll add a one okay and how do I know that all the rows will be the rank will be full rank will anyway be full you already have identity matrix inside g so it's not a problem okay do we can you visualize that you want me to write it down you see you see how you get g e right g e is g e and then here you would add one bit each and that bit would be parity parity of row of g okay so that's what you would do to get the generator matrix okay so you see you have to use all these ideas when you of what the parity matrix is what the generator matrix is what what does it mean for a codeword to satisfy a particular parity check when is it linearly independent all these things should be very clear to you okay it will help you out in later on and visualizing so many other complex things that we might do with the code okay all right so i don't want to show you an example i can show you it's very easy to come up with examples what do you mean by dependent column i don't understand i don't understand how you got that why why d is increasing right is increasing yes it's become one more yeah so previously you would have had three columns of h which were say for instance if you take d equals three you had an odd number of columns of h which were linearly dependent now if you take those same columns and add them up what will happen yeah they will get a one below right you had an odd number of columns so you need that extra one to cancel it out so it'll become one if you if it if it had to be even then you don't need that one they still stay linearly okay so i can do a lot of examples but i'm not going to spend time doing examples i urge you to take the hamming code and extend it okay it'll give you a very very useful and nice code which again you can stare at it's got wonderful properties it's the same code as the 844 code i've been talking about right if you take a 743 hamming code and extend it what code will you get 844 okay and that's a wonderful self-dual nice code okay so it's it's got nice properties okay so you can you can look at that once again i'll urge you to do it okay in the short time we have i'm going to move ahead and look at the next possible way of changing codes which is very useful it's called puncturing okay so so i'll make further assumptions to simplify my process here puncturing is more general than what i'm talking about so the basic idea and puncturing is you generate a code word according to some code and then you simply drop a bunch of bits okay some just select some bits according to some well-known idea and then drop them don't transmit so what what are you doing you're reducing the block length n okay you're not transmitting something okay what it does to the dimension will not be very clear if you drop an arbitrary set of bits okay but if you drop only parity bits what will happen okay suppose i say only i only drop or puncture parity bits what will happen the dimension will remain the same do you agree see suppose i take a code word to be mp okay these are the message bits these are the parity bits okay so the way i'll do puncturing is i will drop some bits from the code word that's the general definition of puncturing but i will say i will only puncture or drop parity bits once they say that what will happen suppose i decide to drop the last say four three or four bits my block length decreases by that number so it becomes n minus three or n minus four why will my dimension not change yeah i still have the same all the messages showing up right you have all the messages there i can still encode k bits into each of my code word right i have two power k code words that doesn't change okay but if you also include message bits you'll be more careful requires a technical study carefully you have to look at rank it's just linear algebra but i'm not going to beat that point so i'll say i'll always safely drop parity bits so puncturing is basically drop parity bits okay see first of all the dimension itself will change you are originally in a n dimensional space now we are space itself is reducing dimension so it's it's still linear algebra it's not very difficult but i don't want to get into that complexity okay so suppose i started with the n k decode c okay so this would be k message bits it should be n minus k parity bits right so i'll say drop parity bits the number okay actually this drop is also usually said puncture okay so you puncture parity bits so number punctured number of bits punctured i will say say let's say some p okay i know this binary symmetric channel also use p but if you want to use p here again okay suppose i say i puncture p parity bits and p i will pick to be less than n minus k okay if i have only n minus k parity bits makes no sense to puncture more than n minus k right so i'll puncture less than n minus k what will be the parameters for the punctured code okay so maybe cp is the punctured code okay so what will be the parameters for this what will be n n minus p k will remain k okay so there's no change there you still have two power k code what's what about d what about d yeah so you need to do more careful study basically you have to look at all the minimum weight code words and the minimum weight plus one code words minimum weight plus two code words see which is getting dropped okay but in general you can say it will be less than or equal to d and in most cases it will be less okay but in general you can only say less than or equal to d you can't say anything more than that it's possible to come up with some weird cases where it can be equal to d also what will happen if it has to be equal to d the parity bit has to be no more no minimum weight code word should be involved with the one there okay all those things can happen but in general it'll be lesser okay you will lose minimum distance when you puncture there's no way typically good codes will always lose minimum distance when you puncture okay so what about suppose i have a generator matrix g for c okay what will be the generator matrix for the punctured thing okay i think generator matrix is the easiest the other case it's more difficult okay so we again assume systematic just to be suppose i have ip and then i'm puncturing i should tell you which bits i puncture no i'll say the last p bits are punctured okay what will be gp remove those columns do you agree just chop off those columns from your generator matrix so i and then this p chopped off whatever you have okay this is the same okay do you see that parity check matrix is more is it more difficult or not what will you do to the parity check matrix when you puncture i'm sorry yeah i mean it's a little bit more complicated right so you have to remove both rows and columns see look at the dimension here the dimension here was k by n minus p what's the dimension of hp yeah n minus p minus k by n minus p so you have to remove p columns and p rows okay so it's may not be the you can do it it's not very difficult but you can always do g first and then go back to p right from g you know how to go to p simply p transpose i n minus k so let us change in a slightly different way so let's not do that so puncturing is the next thing there's one more operation called shortening i want to do that just to get used to this this matrices and then we'll jump to d equals 5 okay which will happen which will happen in the next class okay so to give you a overview of what will happen next week i'll quickly finish this shortening and then we'll jump to d equals five for d equals five you need finite fields okay it's an area of mathematics called finite fields and if you're seeing it for the first time you've never heard about it i'll urge you very strongly to pick up some book and read it up over the weekend just just to get a feel for the kind of things that they're talking about and then when i come and do it it'll be easier for you to digest okay so i'll urge you to look at some book on finite fields or also maybe a wikipedia site or something there's lots of information out there