 This lecture is a continuation of my previous lecture on NP completeness. So, regarding NP completeness, now so far we have seen some of the problems and we have established that they are NP complete. And here we are demonstrating a procedure to establish a problem NP complete wherever it is. And I have initiated a discussion and introduced problem on satisfiability regarding satisfiability of Boolean formulae. So, I had mentioned that this is the first problem which was proved that it is NP complete Boolean satisfiability. The problem states that I mean a general problem that given a Boolean formula whether it is satisfiable. This is the problem and as Stevan Cook he has established that it is NP complete sometime around 1971 and for which he has received the prestigious touring award. So, in this as a classroom lecture I started giving certain reductions and observed some of the problems are NP complete. And the first problem of course in these lectures we have observed that a quantitative you know non deterministic analog of analogous problem to halting problem. That means here what is given a non deterministic touring machine will be given to you under input stream. So, whether m halts on W within a given number of steps. So, the version of halting problem and comparing to this it is a non deterministic version of course we give some time parameter also. That means within this many steps whether your non deterministic machine halts. So, we have observed that it is NP complete and we have observed that certain variants of these problems are also NP complete like you know we have discussed in case of undecendability. Further tiling problem we have observed that it was you know undecidable we have seen that and a bounded tiling problem this is again a quantitative version. So, to say so tiling problem so called bounded tiling problem. That means this time you have to tile a fixed space. So, a finite space say for example of side each side as. So, s y s tiling where tiling system this is a bounded tiling problem. So, whether there is a tiling. So, given a tiling system whether there is a tiling to fix to tile the region of size s that means s by s tiling. So, we have shown that it is NP complete by reducing one of these problems the first problem that we have shown in polynomial time to this bounded tiling problem. So, at that point you know in that lecture I have of course introduced the Boolean satisfiability problem also or I will just recap like what is satisfiable the problem. So, here the domain is a Boolean formulae the Boolean formulae over a set of variables is essentially defined recursively using these two rules. So, each at a I mean each variable is a formula so called atomic formula and then negation of a formula and r r so called you know the disjunction of two formulae is a formula and conjunction of two formulae is also a formulae. And then a formulae is said to be satisfiable if there is a truth assignment it gives truth value truth to the formulae. So, that is the satisfiability problem and now the variant that we consider for the general satisfiability problem is a formula which is given in conjecture normal form whether it is satisfiable that we consider. So, and the problem I am writing it as set the satisfiability problem and the theorem Koch's theorem states that satisfiability problem set is n p complete for which I ask you to observe that set is in n p and in this lecture now we will observe that it is n p harder. What I am going to do here of course I am in the sequence so n naught we have shown it is n p complete and then I have reduced n naught to n 1 a variant of that problem. And then n 1 I have reduced to t the boundary tiling problem to show that boundary tiling problem is n p complete now what I will do I will take boundary tiling problem the n p complete problem and reduce the t to the satisfiability problem set. So, this is the chain that I have considered in this lectures. So, what so this is what I said the t less than equal to p set will show to show that this set is n p hard. So, what I have to do for that purpose a given a tiling system d and a number s I have to construct a Boolean formula I may write f d because this formula is based on the given system d such that d has an s by s tiling if and only if this f d is satisfiable this is what is essentially the condition for the reduction. So, given say d d naught h v the tiling system with d finite set of tiles with names say t naught d 1 and so on d k and a number s we consider we construct a Boolean formula f d and as the problem we have stated we will be given in a conjective normal form. So, I construct a formula in its conjective normal form directly. So, that means essentially I have to consider conjunction of disjunction of literals. So, I give you what are the disjunction of literals in using the given a tiling system and then all this put together that means conjunction of all this disjunction of literals will be the formula f d that I am going to construct. And this f d we have to observe the corresponding to f d I have to check this correspondence. Now, let me just give you the philosophy like of this construction what do I do see what is the correspondence I should have I should construct a formula f d. So, this is conjunction of some disjunction of some literals. So, here you will have some literals say l 1 and so on l 2 and so on. So, some disjunctions. So, this kind of formula will be constructing and the correspondence is given tiling system if it is having an s by s tiling if it is having an s by s tiling then this formula should be satisfiable and vice versa. So, that is that that is that kind of correspondence we have to get. So, what I will do here in this tiling system each tile corresponding to each tile I mean fixing at a particular place we will give a notion of you know literal here I mean variable first I will look at such a way that whenever I have a tiling here the formula is satisfiable and vice versa. So, for which what do we consider you know fixing a tile here is the process of tiling, but the positions say for example, the corners is m n position if I am fixing a tile then I may you know that is the intention I will take and consider the variables with say x m n d you know we will consider a variable for the Boolean formulae which essentially represents in the position m n we could fix the tile d in a tiling. So, with this intention we consider this kind of variables and now if that is the intention this variable x m n d will give truth value true I mean fixing d in m n position that means this variable the for this atomic formula we give the truth value true if in the m n position we fix the tile d. If we are not fixing the tile d in m n position then of course, we I should receive truth value false. So, that that kind of intention we consider. So, we construct a Boolean formulae f d by considering the atomic statement variables x m n d for each you know 0 less than equal to m n less than s because we when we are tiling the space of size s by s you know all the points m n which we will consider with less than s and d in d. So, what is the statement variable set this x m n d with this property. Now, what are all the conjunctions that I am going to consider in the form for the formulae f d now you look at the position m n if this has a tiling f from let me write 0 to s minus 1 cross 0 to s minus 1 to d if this is the function tiling if you have what is the meaning of that each position should receive a tile each position m n position should receive a tile. And since this is a function this should receive exactly one tile and more over this tiling has to satisfy some of the what are the horizontal and vertical constraints it satisfies. If you want to fix a tile here this and this should satisfy the vertical constraints and similarly if you want to fix a tile horizontally side by side then the concerning properties horizontal constraints whatever are given need to be satisfied this is what is tiling now exactly the same philosophy we translate and prepare and construct this formulae f d. So, further purpose first you look at what is the meaning a tile goes to this position that means, among the tiles given to you d naught d 1 d k at least one tile should go here that is the first point. And then each position should receive exactly one tile because you cannot fix two tiles here right. So, since it is a function if that has to be well defined in the element in the domain see for example, for the element m n if you are fixing say some d and d dash then you know d should be equal to d dash because at each position you can fix only one tile. So, this relation because fixing at least one tile is important and then to say this is a function we require this well defined as property because f of m n equal to d and f of m n equal to d dash then this d should be equal to d dash this is the thing that we will ascertain that f the assignment is a function. And moreover in the first position you require the d naught to be fixed and the whatever the tiling that you give what are the function f you give it has to satisfy vertical and horizontal constraints. So, all these things sort of need to be translated as Boolean formula to construct f d and if the correspondence is clear then you can easily observe that this f d is satisfiable if and only if you know you will have a tiling to this square of size s by s. So, let us look at the disjunctions what do we give here for each m n less than s I consider this disjunction what is the meaning of this what is the meaning of this x m n d naught that means m n position would receive d naught or d 1 or d 2. So, that is how I will read the intention of x m n d I had already stated the intention of the variable x m n d that we are considering in the position m n m n position would receive a tile name d. So, by considering this kind of conjunction this conjunction sorry disjunction. So, this formula will be true if at least one of them should be true. So, and therefore, if one of them is given truth value true. So, what our intention is that particular say for example, if this formula is true that means x m n d I sum I we have to give truth value true otherwise you know if all of them are false this disjunction cannot be true. So, if x m n d is receiving truth value true some truth assignment t gives truth value true 1 or 0 whatever you write t. So, then what is the intention in the m n position I have received a tile d i. So, that is essentially captured by this formula and in the second place as I mentioned this has to be you know unique tile need to be received. What is the meaning of that in m n position if I have received a tile d then. So, that is represented by x m n d then in the m n position there should not be any other tile d dash where d different from d dash right. So, this is the condition for the well defined as of your tiling. So, now if you look at this x m n d arrow x m n d dash for d different from d dash alright. So, this can be now x m n d implies x m n d dash. So, this formula of course is equivalent to negation of I am writing with bar the negation. So, x m n d bar r. So, this should not be received right. So, this cannot receive x cannot receive any other tile d dash. So, that means negation of this variable. So, that means x m n d dash. So, if so what is the meaning of the statement m n position if there is a tile if you are fixing d in m n position then m n position cannot receive any other tile d dash. So, cannot receive means negation of this variable. So, you know this arrow this is equivalent to this now clearly this is in a this is a disjunction right disjunction of literals. So, this formula we consider for each m and n less than s and different from d dash this is the second class second disjunction of literals that we consider. And the third point is in 0 0 position d naught should be there. So, I will consider this also in the formula this is only one lateral I have considered therefore, it is a disjunction of literals. So, I will consider this also and then you look at. So, horizontal constraints need to be satisfied. So, horizontal constraints are in h. So, that means if you take a pair d n d dash in h then only you know you can fix the tiles side by side horizontal constraints. So, this is the position m n and this is the position m plus 1 n. And now if you take two different tiles which are not satisfying the horizontal constraints if you take two tiles d n d dash which is not satisfying horizontal constraints. That means this is in d square minus h then they cannot be fixed side by side. What is the meaning of that if d is fixed at the position m n that means x m n d then you cannot fix d dash in this position m plus 1 n position. So, that means you cannot fix that means d dash cannot be fixed in m n that means negation of this. So, this again using this equivalence p arrow q the formula is equivalent to negation p r q of course I am writing here p bar r q. So, I will consider this clause I mean this disjunction of literals. Now you look at you take any pair of tiles d n d dash which are not satisfying horizontal constraint they cannot be put horizontally side by side. This formula can be written as disjunction of these literals. And now since m is I am taking this way m m plus 1 horizontal this constraints I am looking for. So, m is less than s minus 1 and n can be anything less than s. Similarly, we can talk about a pair satisfying you know vertical constraints can only be fixed there. So, that means you take any 2 tiles which are not satisfying vertical constraints I will consider concerning disjunction of literals this way this also I will take part of the formula. And now you look at how many clauses I have considered I mean what I mean a clause it is a disjunction of literals. How many clauses that we are considering here you look at. So, for each position m n I am considering this disjunction of literals this clause I am considering. So, how many such for each position 1 we are considering therefore, there are you know s minus s by s styling for s by s styling each position need to be fixed. So, the finite number of these clauses that disjunction of literals we are considering. So, for each position. So, let me write this formula F D. So, for F D what we are going to consider for F D is now the clauses for each position m n. So, D naught r x m n D 1 and so on x m n D k. So, this kind of disjunctions I consider for each position that means I may put. So, if you want to take m n to be 0 0 here then 0 1 0 2 and so on 0 s minus 1 likewise I have to consider and similarly, all the entire square. So, this I may simply write it as m comma n less than s. So, this is the formula that we have considered which says that which receives at least one of the tiles each position receives at least one other tile and now you look at this receives exactly one tile. So, how many such for every pair D different from D dash that means you see here how many you have k tiles you have. So, that means total k square tiles and in this k square k of them are equal pairs D and D will come also in this and therefore. So, k square minus k for this many pairs in this and for each position m n I will consider this clause disjunction of literals. So, again there are finitely many. So, all these things need to be written down here. So, if you write if I write like this, so x m n D are x m n D dash this for which m n less than s and D different from D dash. So, essentially here finitely many clauses I am writing, but I am writing it in a single this thing and the next case this clause also we wanted to consider because in 0 0 position we have to put only D naught. So, that is this guy and the clauses concerning horizontal constraints and the clauses concerning vertical constraints. So, this is what is F D I want to consider. Now, you look at whether this is clear or not the given a tiling system D. Now, we have considered a set of variables with the names x m n D with the intention that the tile D will go to the position m n and to have a tiling we have to have an assignment of at least one tile in each position and that is one which is represented by this clauses is a set of finite number of clauses here and then it exactly receives only one tile to make this as a function and then 0 0 should receive the tile D naught with this intention we have introduced this clause and corresponding to horizontal constraints. So, we have the clauses here. So, so many I mean finitely many clauses they are to be put here and similarly concerning this vertical constraints we are considering this. Now, with this intention once I have constructed the formula F D you can clearly verify that whenever you have a tiling S by S tiling in the tiling system D I can always see that there is a truth assignment which satisfies the formula F D and vice versa. I will give you here how this can be shown suppose D has an S by S tiling say F. Now, define the truth assignment T from x to 0 1 because the truth assignment you have to give from the set of variables to 0 1 and you have to observe that this truth assignment you know. So, how do when you have a S by S tiling F I have to say that this formula is satisfiable. So, I have to give a truth assignment which satisfies the given formula how do I define that the intention is very clear to you right. So, from that the truth assignment should be defined this way. So, the variable x m and d will be given truth value 1 whenever you fix the tile d in the m n position. So, that is if f m n equal to d if you are not fixing the tile d in m n position then you simply put 0 for this is the truth assignment you take. Now, you look at to say f d is satisfiable what I have to observe each of this clauses written down here each of the clauses written down here are satisfiable right. For example, for the first clause this disjunction of laterals you see now since it is tiling each position should receive at least one tile and therefore, at least one of this variable should receive truth value true as per this assignment as per this assignment. And therefore, every clause which is defined in 1 every clause which is defined in 1 will be satisfied. And then since f is a function every position m n will receive exactly one tile and therefore, each clause which is defined in 2 will also be satisfied using this truth assignment. And since d naught will be placed in the position 0 0 this clause will also be satisfied with the truth assignment given to you know. And since it is a tiling for this tiling system it has to satisfy the horizontal constraint. And therefore, this clause also be satisfied now these things are little bit looking straight forward because this is essentially representing this now this clause if you look at now assume 2 tiles which are not satisfying horizontal constraint d n d dash if they are fixed side by side what is going to happen they are fixed side by side. So, what is the meaning of that in m n position I have fixed this d in m plus 1 n position I have fixed d dash, but this is not in this suppose this happens right. If both of them suppose one of the clause is not satisfied that means this is what is the situation this should receive truth value 0 this also should receive truth value 0 right. If you assume that one of such clauses in this list is not satisfied that means x m and b bar should receive this should receive truth value 0 and also this should receive truth value 0. So, that means x m plus 1 n d dash this also should receive then only this is not satisfied at least one of the clauses in this list if it is not satisfied this is the meaning of that. So, but this implies the truth assignment for the lateral x m and d will be 1 and also truth assignment for the lateral x m plus 1 n d dash is also 1 that means what has happened here. So, this are fixed side by side they are fixed side by side, but once you fix them side by side you require this horizontal constraint d to be satisfied, but you see that we have considered d d dash which is in d square minus h which is not satisfying horizontal constraint, but if both of them are receiving truth value 0 then this situation is they will they will be fixed side by side which is not possible and hence every clause listed in this section 4 I mean I call this section because there are so many clauses here. So, whatever is represented in this has to be satisfied similarly, every clause which is listed in this list 5 need to be satisfied and thus you see all the clauses are satisfied. So, this clause here every clause in this list is satisfied this is satisfied and this is also satisfied and all these are satisfied and hence f d is satisfied by the truth assignment t is that fine. So, what has happened now if you assume there is a tiling for the tiling system d we could give a truth assignment t which satisfies each and every clause or each and every the disjunction of laterals which is present in the formula f d is satisfied and hence f d is satisfied. Therefore, we have got one direction and in the converse also we have to observe that means whenever this formula f d is satisfied I mean if it is satisfiable that means if you have a truth assignment which satisfies this formula f d we have to observe that the given system has an s by s tiling. So, further purpose now converse we suppose the truth assignment t satisfies f d now I will define a mapping g from this to this because the tiling what I have to give that is from this set that means for each position I have to assign tile d how do I define that with this simple condition this is what is our exactly our intention right. So, whenever a variable is receiving truth value 1 then you fix the corresponding tile d in the position m n and whenever this happens you fix it and you will fix only when you know that the variable receives truth value 1. Now, we have to observe that this is a tiling g is a tiling that means what I have to look at this g is a function number 1 and number 2 the g satisfies horizontal and vertical constraints and the what is called the tile d naught should go to the position 0 0 all these things need to be verified via this function g. Now, let us look at if there is a truth assignment which satisfies the formula f d what is the meaning of that all these clauses will be satisfied. So, now this clause this disjunction of literals is satisfied that means this particular lateral which is present only one letter present in this should receive truth value true. So, if this is receiving truth value true by this construction you see 0 0 position should receive truth value sorry should receive the tile d naught. So, that means g 0 0 will be d naught and of course I have to observe that g is a function since I have already explained this intention of each clause from which you can easily ascertain that this g is a function now look at that again once again I give an argument here you see every clause given in this should be satisfied that means at least one of the variable should receive truth value true. If at least one of them is receiving truth value true that means the tile d i is going at least one tile is going to the position m n fine and again in the second list what we have said if you take two different tiles they cannot go in the same position at least one of them is receiving and this by this the function what we have defined here because this is receiving truth value true each one of them is receiving truth value true means at least one of this should be true if we at least one of them should be true that means you look at if one is receiving this then other cannot receive the tile. So, thus you can see that each of this clause will also be since it is satisfied you can see that function g is a function and more over if these clauses are satisfied the horizontal and vertical constraints will also be satisfied you can make this argument carefully and observe that the function g in fact gives you an aswaya styling and therefore, therefore we have reduced in this method we have reduced that the tiling problem is less than equal to p set alright now I will give you some more information regarding the satisfiability problem. The satisfiability problem the general problem which we have observed that it is n p complete now to add some more in this list of n p complete problems there are certain variants of the satisfiability problem that we can observe that they are also n p complete you can reduce this problem satisfiability to those problems I will just state some of them before that first let me define the problem k set what is this because you are you are given anyway a formula in c n f conjective normal form. So, this time what I put a restriction is given a Boolean formula in its c n f such that each disjunction what are the sum that we have considered right because in c n f what do I have this is conjunction of disjunction of laterals right. So, each of these disjunctions will have utmost k laterals see for example, if I take k is equal to 5 this bracket within this the number of laterals which appear will be utmost 5 say for example, l 1 or l 2 or l 3 say for example, here l 1 say some l 2 or l 3 bar or l 4 l 5 bar is a 4 I have to consider. So, that way in a case at the instance of this problem a Boolean formula whatever that we are considering in conjective normal form each of this disjunction will have utmost k laterals that is the instance of the problem. Now, given such a formula the problem is whether or not the given formula is satisfiable this is it is a variant of this satisfiability problem. Now, if k is equal to 2 that means each of this disjunction the clause which is present in the formula will have utmost 2 laterals that means you may have 1 lateral or you may have you know 2 laterals. So, that is what is essentially an instance of 2 set the problem 2 set we can observe that 2 set is in p that means, you can have a polynomial time decider to settle this problem 2 set. So, till that point is fine. So, you can take this is an exercise you understand that you know the problem 2 set is in p that means, you have to give a polynomial time decider the procedure, but what is with k set this is in p. Now, if you take that k greater than equal to 3 in fact let me just say this 3 set. So, that means you are allowed to have the literal number of laterals in a disjunction at most 3 that is what is essentially 3 set we can observe that this is n p complete. So, of course in the routine manner like what we have observed for satisfiability problem what we could have you could have observed that it is in n p that you have to observe and then for n p complete you can reduce satisfiability problem to 3 set. So, for this what you have to do. So, given a disjunction of k number of I mean some arbitrary number of laterals a formula with an arbitrary number of laterals for the disjunctions what you have to reduce you have to given equivalent formula by giving an equivalent formula in which utmost literals are present. Then you can reduce easily and if you can do that within a polynomial time procedure then you are through. So, what is that? So, you can observe that satisfiability can be reduced in polynomial time to 3 set. So, for that what you would be doing you take a formula f in set of course, a Boolean formula in which there is no restriction on the number of laterals in the given disjunctions. So, whatever is the arbitrary number of laterals that you can have in this disjunctions. So, here I am not worried the arbitrary number of laterals what I have to construct I have to construct a formula say f dash given this I have to construct this in which each disjunction will have utmost 3 literals. So, likewise you have to construct a formula such a such that what is the condition this has to be satisfied is this f is in set that means, whenever this formula is satisfiable then this formula should also be satisfiable and conversely that is how we have to construct. So, this problem can be boiled on to consider disjunction of laterals some k laterals I mean let me say some n number of laterals say l 1 or l 2 and so on or say some l n given a formula with this. If I can construct a formula f dash which is equivalent to this in the sense that whenever this is satisfiable this will be satisfiable and vice versa and which has utmost 3 literals like this. Now, you see this will fit in 3 set because I am having utmost 3 literals here this will fit in 3 set and since these 2 are equivalent now if you take any arbitrary formula for an arbitrary formula also just simply you will replace the appropriate you know 3 set instance and then you can observe in the general case as well. So, what is the problem now you are given a disjunction with some n number of n number of letter arbitrary number of literals you have to construct an instance of 3 set such that the given formula f is equivalent to f dash. If you can do that then we can see that satisfiability problem is reduced to 3 set, but of course this kind of thing if you can give straight forward construction which is independent of whatever that the literals that you are constructing then you see within the within this you can probably have this polynomial time reduction as well. So, by this technique you know you can see that 3 satisfiability problem is n p complete now if you ask for 4 satisfiability you see you are allowed to have utmost 4 literals now since 3 satisfiability problem is n p complete now that problem is as had as this problem 3 satisfiability problem and you can observe that k set is n p complete for every k greater than equal to 3. Now, the question is how to give this how to give this. So, what you have to think that you know using this literals l 1 l 2 l n you have to give me 3 literals fitting here at most 3 which is equivalent to this. Now, you can think of this take this as an exercise to give this reduction which works in polynomial time and an equivalent formula that you have to give by giving this you can observe this. So, we can discuss some more n p complete problems may be now using the satisfiability problem or 3 set you just try this reducing satisfiability to 3 set by just giving with this kind of information whatever I had given. Now, maybe we will reduce satisfiability problem or 3 satisfiability problems to many other optimization problems the concerning what is called a relation problems concerning relation problems of many important satisfiability problems sorry optimization problems and I will introduce in the next lecture few more problems which are n p complete and which are important in the literature.