 So, in this lecture I will give you a simplistic flavor of an important like part of I mean important part of the design flow or design automation flow called system and net net list and system partitioning. So, in design systems the designs are becoming increasingly complex huge in size of the order of millions or hundreds of millions in some cases. One of the pragmatic the most pragmatic approach of handling such a huge complexity is to use divide and conquer approach where in the big partition the big design into manageable sub designs. So, that each sub design meet some constraints of the resource constraints like the each design should be fitable on the FPGAs we have at our disposal or whatever, but one of the main like optimization criteria needs to like try and minimize the number of connections which go across the sub designs that is kind of communication that is going to be the interaction complexity. So, we would like it is each one of the sub designs to be as independent of the other one as possible. So, clearly it the I mean the idea is to try and minimize the number of connections that is one of the most natural objective objectives to optimize in such partitioning approaches. So, the primary goal of partitioning is to primary goal often is to minimize the number of connections interconnection between sub circuits. So, for example, let us take this dummy example contrived example with say 8 cells of the NAND nor whatever kind very simple cells each one of them can be implemented on the standard cell. And let us say that we have we have been asked to like to implement this circuit consisting of 8 gates on to 2 chips for the sake of illustration assume that we have on this chip 4 standard cells which can accommodate up to 4 gates and on this chip we have 4 standard cells which can accommodate up to 4 cells. So, in that net list we had 8 cells 8 gates. So, this should suffice and let us assume that we have plenty of area to root connections if connections from between these cells. So, now there are plenty of options you know which of this 4 cells should go on this chip which of this which of which 4 of those 8 cells should go on to the other one right. So, supposing supposing we had like you know we try to we took the option of cutting this net list with 8 gates into into this 4 a b c d and the remaining 4 e f g h. So, along this cut line we partition the circuit into 2 parts 1 with a b c d and the other one with e f g h. Similarly, we could take other option some other cut for example, this cut 2 given by this green line in which we are going to put a b d e on one side one chip with those 4 standard cells and the cells or gates c f g h on the other chip the 4 standard cells of the other chip. So, let us look let us just visualize how it would look like if we were to take the first option of partitioning along the so called cut line one with a b c d a b c d on one side and e f g h on the other side this a this gates a b c d could be placed again using some algorithm we could decide that a b c d should be placed in those 4 standard cells in this passion and e f g h are safe placed on the other second chip on the 4 standard cells of that chip. Now, you see that while completing the routing we realize that the cell d has to drive the inputs of gate f and a cell c has to drive the input of gate g and this 2 these 2 connections have to go across the chip whereas, the all the other connections like a to c is within that within the first chip the other connection like e to f is within the second chip g to h is within the second chip and so on. So, only this connection from d to f and from c to g have to cross the boundaries of this chips. So, we say that to the cost of this particular cut separating this implementing this a gate design into this 2 parts is 2 because there are 2 wires that are being cut of course, this is fairly simplistic kind of example, but you just this is important to build abstractions. If on the other hand if we were to take the other option this cut number 2 as shown in this by this green cut line which is going to separate a b d e on like you know from c f g h. So, a b d e are we are going to try and we are going to put them on the left chip and e f g h sorry c f g h on the right side. So, by some placement strategy let us say we decide to put a b d e on this 4 standard cells in this fashion c f g h on this 4 standard cells. So, this is chip number 1 this is chip number 2. Now, you see that like you know to do the complete the wiring you will realize that as many as 4 wires a to c b to c the d to f e to f this have to go across this, across this partition. So, the cost of this particular implementation would be 4 lines 4 wires which have to be routed across. So, you know this would within a chip the delays would be small across the chip delays could be large. So, because of this reason we would like to try and keep this number of connections going across small. There are various considerations why we would like to minimize the number of connections which have been broken. So, clearly as shown in this example there are several choices we are consider two of the choices and we like saw that the one of the I mean the choice number 1 is cut 1 is better than the cut number 2. The algorithmic problem is how to identify this best best or nearly best choice of how to partition. So, to be able to design algorithm one has to built a use abstractions like graphs and hypergraphs for modeling net list. So, supposing we have with the help of a graph let us say let us assume that this particular graph represents abstractly some net list not really everything about a net list is being represented in this graph, but like you know enough information that we will going to use to partition this graph let us say. So, I just want to illustrate one simple concept which we are going to use in the so called cunning and lean algorithm. So, this example is just about adequate for that. So, supposing currently at some like you know intermediate snapshot of the algorithmic process to decide on a good partition into two parts this 1, 2, 3 this 5 nodes have been like you know grouped on into one partition and this file the remaining nodes have been grouped into other partition. So, this cut line is describing a particular partition of this graph. So, now we want to see whether we can improve upon this and in particular we want to kind of respect some constraint which a natural constraint justifiable constraint that the new partition like this particular partition should also have 5 nodes on either side same number of nodes on either side it is that like every node has equal amount of area requirement. So, we would like to make sure that neither of the side neither of the partition becomes like you know rather too big like compared to the other one or that roughly they should be of same size. So, ideally we would like them the new partition which hopefully is better quality partition to be also of equal size on both sides. So, natural idea would be to try and identify which a pair of node on this side and a pair of node on this side and try and swap them. So, that will help us keep the sizes also balanced, but we will try to identify which of these swaps find 5 square swaps 25 possible swaps we should do. So, as to improve this and a sequence of such swaps which we should like identify and commit to. So, that we have a better partition note that this is problem with only 10 nodes we could have millions of nodes of this kind. So, it is not going to be easy to like you know do it by trial and error there must be some like efficient algorithmic approach to take care of this to implement this. So, let us understand if we were to think in we have to analyze what happens if we swap decide to swap a and b. So, look note that a and b are across the cut a is on the left side a is on one part and in one part and b is on the in the other part. So, notice that a is connected to two nodes a is connected to two neighboring nodes on its own side and b is connected to only one neighboring node on its own side. On the other hand a while a is connected to just two nodes on its own side a is connected to in fact three nodes on the opposite side and b is also connected to two nodes on the opposite side. So, if a were to move to the other side what is going to happen that three nodes three edges which link a to the other side they will become the internal edges of the new like partition. So, basically moving a from here to here is going to drag this two edges into the cut at the same time this three edges will be which are currently in the cut will no longer would no longer appear in the cut. So, on the similarly moving bead from here to here would drag this blue this single edge into the cut and this two edges will. So, this definitely this blue edge will be will be dragged into the cut this edge will also will will sort of vanish from the cut, but this edge which is currently in the cut it will continue to remain the cut because it is between a and b the pair of nodes which we are swap swapping. So, any node any edge which is between a pair of nodes which we are swapping that will continue to remain the cut any edge which is from a node being swapped into its own part it will now bring into the cut it will get brought into the cut and any edge which is across the cut and not between the pair that we are swapping like this edge or this edge this edge this edges which are currently in the cut they will vanish. So, the new cut. So, the revised cut will have slightly different cost and that will be based on this numbers how many nodes like is a connected to its within its own part how many that is how many edges does a have incident on itself from its own side how many edges does b have incident on to itself on its from its own side. So, a has two edges incident to itself from its own side b has exactly one edge incident to itself from its own side a has one to three edges going to the other side b has one and two edges going to the other side. So, this numbers are going to play some role. So, we will kind of define them. So, we x of a e x to stands for external. So, we will denote by a e x to of a number of edges which are going from a to the other side. So, that will be three here and int of a the presenting the internal connections from a to its own side that will be two. Similarly, x of b is one and two there are two connections from two links from b going to the other side int of b is one just one. Furthermore, the cost of connection a to b is one there is only one link that is joining a and b. Now, see what happens when we swap b has been brought here a has been moved to the other side. So, a was connected to this pair of nodes and b was connected to this. Furthermore, a was connected also to b and b was connected to b was connected to a as well as this node. This is the new partitioning after swapping of a and b and what we notice is that number of before we swapped we had how many edges being cut 1, 2, 3, 4. So, this is the after swapping a and b this is the resulting network. The change in the cost of cut will turn out to be we can verify prove that it is going to be e x t a minus i n t a plus e x t b minus a n b. So, what is this first term mean e x t a minus e x t a e x t a are the number of connections that a had to the other side and those kind of edges are going to get absorbed like you know vanish from the cut. So, that is an improvement whereas, int a the number of edges connected to its own side they are going to appear in across the cut. So, this is the bad thing this is the good thing this is the bad thing good thing bad thing. So, this is some kind of this minus this is some kind of gain of moving a from to the other side this is the gain of moving b to the other side, but since we have done the swap the connections between a and b would kind of offset things to a extent and that will be minus 2 times the cost of the number of connections between a and b. So, in this particular example the e x t a was equal to 3 int a was 2 e x t b was 2 and in b was is b in b is 1 and c a b cost is 1. So, what does this formula tell you it is 3 minus 2 plus 2 minus 1. So, that is 1 plus 1 minus 2 into 1. So, that is minus 2 so that is 0 in this particular example the change in the cost is going to be 0 there is no improvement in the cost. So, it is quite simple stuff. So, I mean in this model we are not going to describe the algorithms in detail or that is a study of a separate course on VLSI design automation. So, it is just for the sake of flavor and to kind of slowly proceed to the illustration helping you to develop your own insights into how this modeling is done with the help of graphs and how certain simple like you know calculations will be done by the algorithm which will on the basis of it the decisions will be taken and so on. So, this is I am just leading you to a very well known heuristic called Koenig-Hanlin heuristic which make use of such accounting information accounting approach with the help of this numbers which together contribute to so called gain in the cut. So, in general for any node define the so called d of u which is defined as gain in cut cost that means improvement that means reduction in cut cost gain means reduction when u is moved to the other side. Clearly this can be easily shown to be it is a x t of u minus i n t of u where we had I have already illustrated the definition of what is x t of u and what is i n t of u. So, this is the number of edges which connect u to the other side and number of here number of edges connect connecting u to its own side nodes on its own side. So, if only if instead of swapping we are just moving a one vertex from one side to the other one this is the reduction this will give us the reduction in the cut because this many edges are going to vanish from the cut and this many edges are going to come into the into the new cut. So, now this is for just a movement of a single nodes say supposing our intention is to swap right. So, gain in cut due to swap of nodes say u and v will turn out to be the reduction in the cut cost is turn out to be the gain due to movement of u the gain due to the movement of v, but offset by two times the number of connections between u and v can be easily proved you can think of it as an exercise. So, clearly, but supposing you have been asked to like find a pair of nodes u on one side v on the other side which will like you know swap will improve the cut that is reduce the cut to a good extent then you would definitely look for node u and v such that d u is very high that is this e x t u minus i n t u is high d v is high and hopefully the number of connections between them is they could be parallel connections of course, it is need not be just 1 or 0 this is small. So, then this particular reduction is as high as possible. So, clearly we would like to identify this pairs of nodes to be swapped. So, now let us work with an example which I think appeared about sometime last year a very good book compact book which gives very good illustration of basic algorithms also some theory behind it it is not an exhaustive book there are better books which there are books which are far more exhaustive on the subject or more specialized into certain certain sub topics, but this will be a good book for the starters also very nicely written and good illustrations exercises and some good support for teaching. So, the example that I am doing is borrowed from this book the chapter number 2 which is on graph partitioning you can get more details like you know from the this book. So, the example that I am going to lead you through is very simple example again highly contrived, but illustrates ideas very well. So, let us assume that out of a net list we have abstracted out a graph and the graph is like e a b c d e f g h. So, this is a eight node graph think of like assume that this eight nodes each one of them is representing one gate or a one standard cell and let us say we have maybe initially or at some point in the algorithm we have arrived at this particular partition the partition a b c d in one on one side and f g h on the other side. What is the cost of this partition is equal to you can see that it is 1 2 3 4 5 and plus 4 9 it is a high cost right it is a bad partition clearly like if you see that you know by just by inspection you can see that if you were to partition this eight node graph into two parts equal parts this would be the best this would be the one which would minimize the number of edges being cut that will be precisely one. So, yeah I mean things are not going to be so simple to visualize or in solve by inspection. So, let us use this simple example where we have good intuition of whether the algorithm the so called cunning and linear algorithm is it proceeding with some good natural intuition or like you know has some natural justification or not. So, it should be intuitively like obvious algorithm. So, now the let us collect some supposing let us proceed along the natural idea that like you know since we have to keep this partition balanced like you know these two parts balanced we will commit to doing only swaps one at a time. So, and without any further clue like the obvious thing is to be trying greedy supposing we have been told by experts that this problem of partitioning graph into two equal parts. So, that the number of connections going across is minimize this problem is known to be NP hard or like you know. So, it is it is good to kind of think in terms of heuristics and then develop further intuition insight and then try better approximation algorithms more theoretical investigations, but let us use our intuition first and try and design a good heuristic. So, that heuristic is one natural approach seems to be do swaps in a greedy way. So, what would be the first swap that you would kind of go for with the intention of improving this cut as much as possible right now the cost of the cut is 9. So, for that again I mean some kind of book keeping will help and that book keeping will be in terms of or the account accounting information or whatever would be this maintaining this d information for every node d a equal to how much d b d c and. So, d a will be how much for example, a was d a the cost of moving or the not a cost in fact, the gain or reduction in the cost if we were to move a to the other side of course, we are not just going to move will swap, but if we were allowed to just move a from to the other side a is connected to just one node on its own side that is internal cost of a is 1, but a is connected to two nodes on the other side e namely e and f. So, the gain in the cut if you move a to the other side is going to be 2 minus 1 that is 1 ok. Similarly, gain for b is going to be 1 gain for c is will be how much c is connected to 1 node only 1 node on its own side, but c is connected to 1 2 3 nodes on the other side. So, gain if we move c is going to be 2 and for d it is just 1 for e 1 f like c it is going to be 2 g it is 1 h it is 1 from this information and to information about the number of connections between any pair of nodes that is already available in this graph from this we will be able to identify a pair whose gain will be highest which when swap will be highest. So, recall that this recall that gain due to gain in the cut or reduction the cost of a cut due to swap a swapping a pair u and v assuming that u and v are on the opposite side is the gain due to movement of u gain due to movement of v minus 2 times of this is the offsetting thing, but fortunately like you know in this example rather in this example it is quite obvious that since c and f have the highest gain due to the movement and c and f although they are connected by 1 it will turn out to be the best pair to swap ok. One can verify that look by comparing it with all other pairs best pair swap is evidently c and f. Once we do that what will be the reduction or gain in the cost in the cost of cut that will be earlier cost that is 9 minus the gain due to c comma f which is 9 minus how much d c plus d f ok. I think I made a mistake ok. So, let us put a question mark here is c f because c and f have very high like you know both of them have the highest gain of just movement to each will it give us the best pair to swap this will be 9 minus how much gain will be 2 plus 2 minus 2 that is 9 minus 2 7. On the other hand consider swapping c and say e ok. So, gain due to the swap of c and e will be d c plus d of e minus 2 times c. So, this will be 2 plus 1, but although this is less than but here it is 0. So, this is 3. So, here the gain was just 2 that help reduce the partition with the cut cost from 9 to 7, but here if we swap c and e instead of swapping c and f we would have the improvement in the cut cost by 3. So, the cut would reduce to 9 minus 3 that is 6 which is better. So, like maybe you know we should not simply try and be like when we will have to work out all possible for every possible pair the gain and hopefully that is not too much of computation and then find a one that is best. So, in this case if we can verify and further and confirm that c and e is the c and e is the best pair to swap ok. So, c and f our earlier intuition means guess was wrong. So, this is the new picture across this cut line and the new cut cost is going to be 1 2 3 4 5 6 and confirm that it is 9 minus gain of c comma e that is 9 minus. So, now let us mark here that c and e have been like you know other ones which have participated in the swap and like you know to decide the next swap or subsequent swaps will not like you know allow them to play any role will kind of freeze them in their like respective parts they will not play any role until we kind of consider the other swaps as a sequence of swaps which will hopefully improve the cut cost to I mean in the best possible way. So, I say that now what was remark over here is that swap c e here a swap c and e and fix them. So, we are not going to allow them to participate fix this pair of nodes c and e like you know we not allow them to participate in future swaps. So, now in this in this graph in this partitioning that we have it has that has resulted after this first swap we have again have to kind of like you know find up next best pair of swaps like without which do not involve either c or e. So, could it be f or could it be d e or whatever. So, what do you think what would be the best pair of nodes to be swapped again we have to calculate those d values the gain values find which reflect the gain by movement of node on to the other side, but we have to correct it by that twice this connection c times u comma v and all that. So, we can here compute up gains by for every allowed swap and find a best one. So, it will so turn out that. So, if you just like in fact quite we can notice that d is a kind of node which is standing by which is kind of disconnected from everything else on its side. So, most naturally you know. So, you will start means you can start guessing that d should participate in swap because you know at this nothing to lose everything it has to gain all the edges which are connected to d are to the other side. So, by moving d on to the other side you are going to gain all that much and lose nothing. Similarly, on this side it looks like there is no such node like d which is isolated, but f is next best thing to isolated. So, if we move f to the other side we see that only one edge will come into the cut, but 3 as many as 3 edges will vanish from the cut and thirdly there is no connection between d and f. There is no you know the gain in gain due to the swap of d and f is going to be the gain due to movement of d the plus the gain due to the movement of f minus no correction because there is no link between d and f. So, next best pair to swap will turn out to be swap d and f and that will give us instead of in place of d we have brought f and in place of f we are going to bring d f was here. Please let me with the green circles mark that already c had participated e had participated in swaps and now d and f have participated in swap. So, they are going to be frozen. So, after swapping d and f and fixing fixing of d and f we get the following diagram following graph. So, you note that current cost of cut is equal to 1 like to check that it is earlier cost that is 6 minus the gain due to due to what the pair which pair we have swapped d and f is it 6 minus what is gain due to d and f that is d of d plus d of f minus 2 times c number of connections between d and f which is yes I mean can verify that 6 minus it is d of d is how much is d of d number of external connections from d that is 1 2 3 minus number of internal connection that is 0. So, d of d is 3 what is d of f number of external connections to the other side is 1 2 3 minus internal is 1. So, d of f is 2 minus 2 times 0. So, this is indeed 6 minus 5 that is 1. So, it is confirmed. So, that particular formula that you can easily prove we have been verifying that validating that with this example. So, so far we have made greedily locally greedily like 2 swaps the first we executed a swap c e fix those nodes did not we are not going to allow them to participate in any future swap until the so called pass is over I will tell you what the pass means then we again by looking at the revised partition we figured out that the pair d and f is the best pair to swap that we swap fixed it and that that has resulted in a very good looking partition with only one edge across it. So, you know that this is like something the best that we have already obtained, but in general in a big algorithm in the when this algorithm is run on a very big circuit very big design you are not going to be able to easily conf like you know guess that this is the best or this is nearly the best that you have reached and you need not go further wasted time further. So, we should the algorithm should go ahead and sort of you know not arbitrarily stop here with some kind of confidence that would be that could be premature right. So, let us go ahead now we have this we are already arrived after swap of c e and followed by swap of d f this gave us the gain of 3 this gave us the gain of further 5. So, with the help of this two swaps and like you know we have reduced the cut from 9 to 6 and then to further to 1 and we have got this we have committed we have fixed the node c d e f not going to allow them to take any further. Now, we know intuitively that if we try to do any further swapping things will not get any better this is the only best cut, but you know the algorithm would not have known that. So, like so early. So, the main idea natural idea we have like that Koenig and Lin and Lin like you know develop was you know start with some initial partition initial equal size partition and just go through a sequence of swaps and every time while deciding the swap decide the best possible swap that like you know that would in the in terms of the amount of reduction that the swap would result in the cut cost and look find the best possible pair to swap among the once the nodes which are not fixed yet and keep on doing the exercising the swaps and fixing the nodes which are involved in the swap. So, that they do not take part in the swap and finally, after n by 2 such steps where n is the number of nodes you would have like you know tried out like you know enough swaps which would have frozen which would like you know which would complete a so called pass because after we swap a pair of nodes we do not let them participate in any future swap in the so called pass. So, after n by 2 such swaps we would have come to the so called end of a pass and in this end of the pass we would have been like you know based on the gain of the pair that has been swapped we would be like you know we would be changing we would be getting the new partition of a different cost if the gain is positive we would be getting the partition of improved cost if the gain is negative that is surprising why would we bother about swapping a pair of nodes with negative gain because but supposing we do that or we have to do that as required by the algorithm then negative gain would mean that next partition would have higher cost or like you know yeah that is actually worse. So, so far we have seen two swaps here swap C e that was the first one after which we commit like you know fix those vertices C and E and then swap D and F and both cases the gains were positive we are lucky. So, we were improving we improved the cut from 9 to 6 9 minus 3 6 and then 6 minus 5 1 that is a current situation, but like you know what about the non fixed nodes like a bs d g h we should optimistically try although by inspection we know that nothing will yield us anything better, but algorithm with would not like you know try and get any certificate whether like at this current time do I have the best one not like half way or you know before the pass is over. So, we have this so called notion of a pass a pass of it is basically a sequence of swap of pairs followed by where the swap and fix vertices vertex. So, so this this pass ends after n by 2 swaps where n is the number of vertices where n is assumed to be even these are all like you know we should not worry about these restrictions because one can always you know add some dummy nodes and make number of nodes even and all that and also these are some just basic ideas on which we can like you know from which one can think of lot of variations and improvisations. So, that is why like in this overview lecture like this or it just suffice to highlight the basic ideas and the simplest such algorithms there are far more interesting variations of this which are practical as well as efficient practical as well as interesting by itself that should we could leave it to the next course or some other course specialized course on VLSI CAD. So, this is the concept of pass that is a sequence of swaps how many n by 2 swaps because after every swap we are going to like you know disable the swap pair of nodes from any other from participating any future swaps. So, after n by 2 swaps you would have fixed all the nodes for that pass and then after that we can take a pause. So, so far we cannot reach that end of the end of the pass. So, we should continue. So, if we continue from here. So, pass is not over. So, the question is best pair next best pair of unfixed nodes that is a question right. So, what will it turn out to be we have a b from this side and g h from this side eligible to participate in swaps and it looks like we can take any pair at a, a b, g b, b g or b h whatever because it is all like uniform now same thing because the d cost for a b d for a the gain not the cost the gain for gain resulting in movement of a is going to be 1, 2, 3 rather like it is the other way round it is 0 is the external cost and everything is internal. So, the gain is going to be negative in fact it is going to be as bad as minus 3 d a is minus 3 right why because external cost is external connections is 0 number of internal connections is 1, 2, 3. So, x u x a minus int a is minus 3 similarly d b is going to be minus 3 and d g is going to be minus 3 d h minus 3 all right. And also we see that there are no connections between any pair from this side like any pair of nodes one from here and one from here neither connection a and g a h all connections as there are no connections. So, by the gain formula you see that gains are going to gain by swapping is going to only make things worse for any pair the gain is going to be minus 6 high very negative gain. So, it is going to in fact, version the cost of partition next partition but still like you know we should we are committed to continuing with the pass and we let us say a b is the let us take not a b, but a g. So, swap a g and fix. So, what we get this result of this is the we will get a new partition a different partition of how much cost we had previous partition of really good cost one, but we are going to get we have to subtract from it the gain rather like negative gain that we get out by swapping a g which is going to be 1 minus minus 6 that is 7. So, let us confirm. So, this is going to be the resulting like you know picture verify that number of edges cut is 1 2 3 4 5 6 7 confirm with confirming that our formula. So, things are really made this things were. So, but that is the interesting thing about algorithm it you have to proceed optimistically hoping that in future things will again get better, but in this particular example it would not. So, now let us just complete this pass we have only after this you would have frozen g e f c d a. So, only pair to swap is b and h. So, next there is no choice swap b and h and fix them and fix and that will be the end of pass. What do we get we do not even need to draw this now swap b and h and fix end of pass. Notice that what we had done by the at this last step of the pass is like you know swapped the last possible swapping pair of nodes unfixed nodes pair of nodes and what we will simply have is this the same picture just reflected as we that we started off in the beginning. So, we had a b c d on this side, but a b c d have been swapped with g e f g h and. So, we will have a I mean with some rearrangement we will have taken the liberty to just rearrange this position of nodes accepting the of course, ensuring that like you know a b c d is on one side and e f g h are on the other side. So, this is the resulting picture with some bit of redrawing. So, cut cost is going to end up as it was in the beginning 9. So, this must have been you can verify that it will be 7 minus gain of the last swap that is b h. You can verify that this will be gain of b h is going to be minus 2. So, we are expected to kind of get back the same initial partition at the end of this pass. So, we need not actually go up to the last like you know we would know we do not need to compute and think explicitly, but this is the result that is inevitable. But now let us talk let us look at all this the whole pass what we have done in this pass we started with a swap c comma e then swap d comma f then swap a comma g last inevitable like a redundant swap the gain of was 3 gain 5 gain minus 6 we did not calculated, but can be verified. So, cut cost was 9 in the beginning after this swap it became 6 after this swap it became 1 then it became rose to 7 again and further rose and back to 9. So, you see that during the pass we have this particular sequence of like partitions and their cut cost and with then we simply like you know decide the best point after having seen the whole swap with we can now like you know see that this like this would have been the this is clearly the best partition to arrive at the best this partition with this particular best cut cost we should only commit to get the best partition in this seen during this pass clearly we only commit the first two swaps right because only after this first two swaps we exactly after this first two swaps we get a best partition with this best cost and then after that it will make things worse it might improve again, but it will never be as good as what we have got at the end of this. So, looking at this sequence of partitions and their cut cost we can decide and this is the what we call the result of this pass and this is the best partition that we got at the end of the pass then what the next thing that we can do the cunning and then algorithm does is uses this part the best partition as the initial partition of the next pass it hope optimistically hopes that like you know they might be some improvement in fact if it were the case that at the end of this pass whatever we best we get is the global best then this problem would have been tractable, but in fact it is been proved to be a hard problem. So, you know this will like will have counter examples where this although in this example after a single pass we got the best one in most general examples you will not get the best globally best partition as the best partition of a single pass of the first pass itself. So, we will one should the algorithm should go to the next pass and, but there what might happen is that the pass next pass may not improve the partition it might. So, happen that any pair or any sequence of swaps in that pass is going to give make the partition cost worse in which case we just accept that whatever we got at the end of the previous pass as the best one. So, that is the main idea behind the algorithm or like lose informal description of the algorithm it does one or more passes within each pass it does a sequence of swaps swap and fix once you swap a pair of nodes where the pair of nodes is chosen really on the basis of the gain gain in the cut cost you fix those pair of nodes that pair of nodes. So, that they do not participate in any further swaps in that pass at the end of n by 2 such swaps the pass is over then you take a look at the pass the sequence of partitions and the cut cost take stop at the best like you know look at the best point that you have reached you had reached during this pass commit only those swaps like in this example just two swaps first two swaps and that is the best partition out of this pass then use this best partition as an initial partition for the next pass and if things improve fine then go on to the next pass if the things do not improve stop may be some kind of we are stuck in some kind of local optima that is what might happen often there are ways around it, but still you know getting global optima for last size problem is going to be brutally hard. So, do not hope for that too easily yeah so this I hope is like something that describes the essence of kerningham linear algorithm and the main idea is to kind of try and like you know think of your variations the very natural variations which like you know make this algorithm more efficient or which make this algorithm more general and so on. So, that is how things proceeded from KL there were various variants and that they become more standard better algorithms which are still used in most of this CAD tool packages and you know and the research is still going on there is now more focused on performance based partitioning and performance based placement. So, objectives are changing and like lot of technology implementation related like objectives are being brought in this was purely topological number of connections being cut things can be far more general than that I will stop here.