 .In continuation with our discussion on undecidability, we are not going to introduce another problem known as tiling problem and so that this problem is also undecidable. Now, the tiling problem is like this given a finite set of tiles, that means finite set of types of tiles. The problem is a tile, the first quadrant of the x-ray plane satisfying the given constants. For example, suppose given a red and black tiles, so these types of tiles say this set is set of two elements r and b, r represents red tiles and b represents black tiles. So, in this case what we assume that tiles from of each type will be available infinitely. So, there are infinite numbers of tiles of each of the types either red or black. So, given this red and black tiles, we have to tile the first quadrant in such a way that no two adjacent tiles are the same color. So, these are constants. So, there will be some constants satisfying this constant, we need to tile, taking tiles from this kind this set. So, we need to tile the first quadrant of the x-ray plane. So, this is the problem, so in this example. Now, if you consider this example, so we can have this kind of tiling. Suppose the first quadrant is suppose it is filled up with r, that means red. Then according to condition, since the second one orientally, this one can be filled by only black tiles. So, next one can be tiled by a red tile and so on. That means, we can place alternate types of tiles orientally. Similarly, above r again we can have this b, there is only possibility, because we cannot have a same color. Then after b we can have this r vertically, so vertically we can fill up like that. So, once this b is fixed, we can fill the remaining tiles like this after b it is r, then b and so on and the condition is satisfied both orientally and vertically. So, therefore, this is tiling, that means that way we can style the whole first quadrant of the x-ray plane given infinite numbers of, numbers of red and black tiles. Now, if we insist that, the condition is that the left bottom center line is red, that means the first one in the quadrant, the left bottom center of this quadrant if it is fixed, suppose it is r red tile, then there are only one solution for this problem. Similarly, if it is say black, then also we have only one solution. Now, given this kind of problem, so what you can do is that, suppose just consider this particular tile. So, this particular tile can be identified as the coordinate say 3 3 is a left bottom corner, say is 3 3 left bottom corner, then right bottom corner is your 3 4 3, then the top left top corner is 4 3 4 and the right top corner is 4 4. So, you can identify this tile by giving the coordinate on the various corners, but simply if we give the coordinate of the left most left bottom corner, so this one, then so you can identify this tile. If we have the convention that, we will always give the coordinate of the left bottom corner, then if you suppose m n is the coordinate of the left bottom corner, then horizontally you can keep on increasing the x value, that means m plus 1 n will be the right bottom corner. Similarly, m n plus 1 will be the left top corner and m plus 1 n plus 1 will be the right top corner. So, that way if we give the coordinate of the left bottom corner, it is sufficient to identify a particular tile. So, you always identify a tile by giving the left bottom corner of the left bottom corner. Now, once you have that convention, formally we can define tiling system like this. So, formally a tiling system is a quadruple having four elements d, where d is a finite set of tiles, that means the type of types of tiles. Then d 0, it is called the initial tile, there is a condition which tile should be used to put the coordinate 0 0. Then h is subset of d cross g is called horizontal constants. So, it has to satisfy that constant and similarly v is also a subset of d cross g called vertical constants. So, once we have this tiling system, suppose the tiling system is d, a tiling by d is a function from n cross n to d, where d is the types of tiles such that f 0 0 is d 0, that is the first condition that means which tile should be used as a coordinate 0 0. Then this is the horizontal condition f m n and f m plus 1 n, that means once we fix consider this tile in the location coordinate m n, then the tile which should be there horizontally, the next one it must satisfy the constant given in this tiling system for all m n in n. Similarly, this represents a vertical condition, if we fix the tile m n and m n plus 1 it is a satisfying vertical condition given in v for all m n. So, given a tiling system, a tiling by d is a function satisfying all these constants. Now, the problem is that given a tiling system whether or not it has a tiling, so that is the problem. What you want to show is that the tiling problem is undecidable for any given tiling, the tiling problem that means given a tiling whether or not it has tiling, this problem is undecidable. To prove we use a reduction from a variant of the holding problem, we prove this by reducing the problem complement of h 1, we will define h 1 now, we reduce the complement of h 1 to the tiling problem. Since h 1 is undecidable, h 1 complement is undecidable and therefore, this tiling problem must also be undecidable according to the reduction. Now, how to define h 1 the variant, so h 1 is basically or the language of h 1 or simply h 1 is a set of all turing machines m such that turing machine starting with a blank tap. So, it starts with a starts at q 0 and it initially the tap is empty, it starts with a blank tap and eventually it enters in a halt state, this is a halting set h and there will be some content understanding and we can show that this problem h 1 is also undecidable that means given a turing machine if it starts with a blank tap whether it will eventually halt or not. So, if h 1 is undecidable then so is the complement of h 1 that means given a turing machine any arbitrary turing machine the turing machine does not halt, this is a problem. So, there is a h 1 complement, so we can show that h 1 is undecidable by reducing the halting problem to this variant of this halting problem and hence h 1 complement is also undecidable. So, we will leave this as an exercise to show that h 1 complement is undecidable. Now, we will use this problem complement of h 1 to prove that the turing problem is also undecidable, we will reduce this h 1 complement to the turing problem to prove this. Now, consider the following turing machine which is in h 1 complement that means this turing machine never halts which will start in a blank tap and it will never halt. So, what this turing machine does is that it has two states q 0 and q 1, q 0 is an initial state reading a blank symbol which is a hash blank is dependent by hash. So, it will enter in q 1 and prints a. So, this blank symbol will be converted to a and it will change its state to q 1. So, when it is in q 1 it simply goes to the right side whenever it sees an a and it changes its state to q 0. So, since towards the right side we have infinite numbers of blanks only again in q 0 looking at blank it will print a and sends state to q 1 and q 1 since the input is a it will go to the right side it will move to the right side and it will sends state to q 0. So, this will continue that means if the content is initially say all hash is all hash or blank so on. So, initially this situation is in q 0. So, this hash will be or blank will be modified to a and it will go to this hash will be modified to a it will be printed and it will sends state to q 1 and q 1 reading a symbol a it will simply go to right side and then it will sends state to q 0. q 0 again looking at hash or blank it will simply print a and it will go to state q 1 and q 1 since it is a it will again move to one side one side to right and this will continue. So, therefore, all is a it will be all is blanks will be convert to a and it will keep on going since we have infinitely many blanks towards the right side of the tap. So, therefore, competition distribution will never halt that means q 0 the tap is a head is reading blank it will enter in the state q 1. So, this next configuration q 1 a will be printed next configuration is that q 1 2 it will go to q 0 and it will go one cell towards the right side. So, a is always there and then next head is pointing to the next blank show this will continue. So, eventually q 1 a a a where head is pointing to a and so on. Just considering this Turing machine what you can do is that. So, the idea is that once a Turing machine is given. So, this Turing machine competition a successive configurations of the Turing machine can be used to fill up the first quadrant by filling the one row of the first quadrant by successive configurations of the Turing machine. That means. So, initially it is a q 0 has. So, initially all are blank. So, we put in the first quadrant and in first row of the first quadrant this q 0 indicates that this is a star state. So, q 0 has and then q 0 blank and all blank. So, this is the initial configuration and we have placed in the first row. Next q 0 on reading blank it enters first instead q 1 and prints a over here and remaining are same. So, therefore, we simply use the next configuration to fill up the second row next row. So, next q 1 on a will simply go to. So, the head will be moved towards the right side according to a rule q 1 on a will go the right side and send that to q 0. So, therefore, the next configuration will be q 1 on a. So, this a will remain same will be carried forward and then will enter in state q 0 and this is has blank. So, this state symbol is used in a cell to indicate that indicate a state and that it is reading that the corresponding symbol. So, the next configuration will have a will be there. So, q 0 has q 0 blank. So, this will convert to a and it will enter in state q 1 and then remaining are same all are blank. Again the next it will be a it will a. So, it will enter in state q 0 is blank blank blank. So, this way we can keep on filling up the rows of the first quadrant by successive configuration of the Turing machine. Since the Turing machine never holds. So, therefore, will be able to have a tiling of the first quadrant accordingly accordingly. So, this is what we use for tiling the first quadrant given a Turing machine. Now, let us prove this formally. So, given a Turing machine M which is a quadruple q sigma delta q 0 we define tilesing system from this Turing machine. So, it is D M we emphasize that this tiling system has been constructed from M the Turing machine given Turing machine M. So, our idea is that given a Turing machine M we need to have a tiling system such that the Turing machine never holds Turing machine does not hold if and only if it has a tiling. So, from M we have a constructed instance of tiling. So, that we can have a tiling of this instance if and only if the Turing machine never holds. So, it has again for given a Turing machine M we define tilesing corresponding Turing machine for this Turing machine D M which is a quadruple having four elements capital D D 0 H and V where capital D is the set of tiles and types of tiles. So, D 0 is the initial condition and H and V are horizontal and vertical conditions which has the following types of tiles. So, in this tiling system we will have the tiles according to the Turing machine corresponding to every Turing machine we will have some kinds of tiles. Now, for all a in sigma we will have this kind of tiles. So, what I say is that this kind of tile is used to simply communicate any unsensed symbol upwards from configuration to configuration. So, it has content A and on the A's on the top edge we have the symbol A. So, this simply communicates that there will be some symbol which are unsensed. For example, so in this case we have this A and here also we have this A. So, this is A. So, we just carry forward the symbol A. So, accordingly we will be using this kind of tiles and here we have used the dot over here to just to indicate that to use this kind of tile we must have some tile below it. If we want to use this tile some tiles below it must be already available. Then for all A B in sigma and for all P Q in the state of the Turing machine if we have a transition like this in a Turing machine delta P A equal to Q B it says that we have P A as a element. So, P A will be there in the tile as a content of tile and the top edge it is Q B communicates the head position upwards and also sends of the symbol and the state appropriately. That means from tile below tile upward the head position is sensed and the state is sent from P to Q and the symbol is sent from A to B. So, that happens whenever you have delta P A equal to Q B we have a state sense from P to Q and we print a new symbol instead of A and that is your B instead of A we print a B. So, that is what we communicate over here. Again to use this kind of tiles we need to have a tile below it that is indicate by this dot. Then again for all A B in sigma and P Q in Q if we have this kind of transition delta P A equal to Q R that means is a right move of the head if the Turing machine is in state P leading symbol A it will go to state Q and the head will be moved towards the right side by one cell. For this we will be using these two tiles it is simply communicate head movement one square from left to right. So, P A is a content of this tile P A and since head is moved towards the right side this A will be carried forward it goes towards the right side changing in state Q and it goes towards the right side. So, in the next case whatever may be the symbol it may be B. So, this B will be here, but the state will be this state Q and both the cases we must have some tile below it. So, this communicates the movement of the head one square to the right and sense of state appropriately. Similarly, for all A B and P Q A B in sigma and P Q in state Q if delta P Q equal to Q L. So, this type of tile types of tiles basically communicates the movement of the head towards the left side by one position. So, delta P A so P A is the content of this tile. So, A will be carried forward it will be communicated upwards. So, it changes state from P to Q and it goes towards the left side. So, therefore, from left side it comes Q whatever may be the content earlier content of this tile. So, next it will be Q B the state will be changed to Q and B will be carried forward and in both the cases we need to have some tiles below it. And then from the initial condition since the initial configuration will start in the state Q 0 and blank and towards the right side we have only blank. So, therefore, we will use this kind of tile to fill the first cell and for all the remaining cells initially we will be using say blank and towards the left side and right side we will have all blanks and these blanks will be carried forward. So, that is why we are using this blank. So, in both these cases we just know that there is no necessary to have any other tiles below these tiles. So, that is why we are not using any dots because those will be used for initial configuration. Now, we have constructed the tiling system. So, basically in this tiling system what we have done is that we have shown what are the types of tiles to be used. So, all these types of tiles and we have constructed those tiles from the corresponding moves, moves through the turing machine and at the same time what I have done is that we have said indicated here the vertical condition. For example, here from A this A will be carried forward. So, here again we will have P A and it will be Q B. So, this gives the vertical condition and in this case again we have this horizontal condition horizontal condition and so on. So, while constructing these tiles at the same time we have also indicated what should be the corresponding horizontal conditions and vertical conditions by giving the content of the tile and what should be the top of the tile or towards the right or towards the left. Now, when we show that given in turing machine M this belongs to H 1 complement even only if D M has a tiling. That means, this is a reduction from the complement of the tiling complement of this H 1 H 1 to the tiling problem. So, given turing machine M if it belongs to H 1 complement if it belongs to H 1 complement if and only if corresponding tiling system has a tiling. Let us prove the forward direction suppose M is a turing machine with the following elements Q is a set of states sigma is the set of symbols delta is a transition and Q naught is the start state. And this does not halt when started on a blank tab because this is an instance of H 1 complement. Since it is an instance of H 1 complement this M does not halt when it started on a blank tab. So, therefore, the first configuration will be like this C 0 Q 0 it starts on a blank tab therefore, the head is reading blank and towards the right side there are all blanks. Then, we will go to C 1 and C 2 and so on by computing according to transition of the tiling machine and eventually suppose that particular configuration C i will be of this form say Q y a 0 a 1 up to say a j i and up to a k i. So, where a 0 a 1 up to a k i these are all symbols from the alphabet sigma and then we will go to next configuration C i plus 1 and so on and the computation never terminates a never ending computation it does not halt. Just consider this configuration C i considering this any arbitrary configuration C i we will see the tiling we will give the tiling we give the tiling like this tiling function from n cross n to the set of tiles like this the types of tiles we have we already know how to construct from the types of from the construction that we have already described. So, for all i get run 0 f of n i that means, what should the tile for this coordinate n i it will be a n simply a n the tile with content a n if n is greater or equal to 0 and less than k i, but n not equal to j i. That means, it says that if it is within this other than this one it is not a j i it will retain the all our symbols will be cared for. So, a 0 will go to the next configuration a 1 golden next configuration up to a j i minus 1 will go to next configuration in the upward direction. Similarly, a j i plus 1 up to a k i will go upward in the next configuration the next row, but if n equal to j i then the correction tile will be q i a j i. So, because the current that is q i and a scan the symbol say a j i and if it is greater than k i then after k i that is all blank. Because, we have come up to a k i and we started with an an empty tip. So, therefore, all the cells towards the right most symbol will be all blank. Hence, if n is greater than k i will be using this kind of tiles. So, once we use this kind of tiles. So, corresponding to this theory machine will construct the tiling system and then if we consider the configurations start with c 0 we put in the first row of the first quadrant of the x y plant and then according to the most of the tiling machine we will get the next configuration and the tiles that will be using will be of the kind that we have already described according to the configuration construction tiling machine and so on. So, therefore, this gives a proper mapping what tile to be used for tiling the first quadrant. So, that way we will be able to tile since the theory machine never holds will be able to tile the first quadrant of the x y plant now consider a converse. Suppose the tiling system has a tiling say there is a mapping from n cross n to d. So, there is a tiling now note that as per the construction of the tiling system d m from the theory machine given theory machine m. The tile which can be accommodated in the first row are of the this kind q 0 blank and blank and there is no tile below it because there is a only possibility since we below it we do not have any other tiles and the respect in tiling must be q 0 blank then blank then blank and so on all blanks. Clearly this represents the initial configuration of the theory machine m when started with empty tap this must be the initial configuration. Therefore, c 0 is q 0 blank the head is reading the blank symbol then since we have constructed the tiling system from a given theory machine. So, what the next tile to be used above this will be defined or will be decided according to the transition of the theory machine. Since we have a tiling there must be some tiles to use above it in the first row and then in the next row and this will continue forever because there is a tiling that is what we have said because d m has a tiling. Since it is a tiling will be able to fill up all the rows like this, but in this case what we have used is that this tiling system constructed from the theory machine only that means it clearly says that theory machine has moves. Since the tiling is will continue infinitely. So, therefore, the computation of theory machine also will go on infinitely that means from c 0 it will go to c 1 c 1 to c 2 and so on from c i to c i plus 1 for all i. So, it will continue forever. So, that means if there is a tiling there must be the theory machine will never hold that is what we have got. So, therefore, this shows that for any given theory machine m if m belongs to h 1 complement if and only if d m has a tiling where d m is the corresponding tiling system. Now, we have already seen many problems that have been shown to be undecidable. For example, the halting problem we have seen defined and proved the war problem to be undecidable. We have simply defined PCP we didn't prove of course and now we have shown that defined the tiling problem and shown it to be undecidable. Similarly, you can keep on giving more and more problems to be undecidable. We will say that some variants of the halting problem for example, say h 0 and h 1 which are used in the context. For example, h 1 is used to show that halting problem is undecidable sorry tiling problem is undecidable. Similarly, h 0 was used to show that the war problem is undecidable. So, these variants of the halting problem h 0 and h 1 are also undecidable that we left as exercise. More such variants of the halting problem can be defined and proved to be undecidable. Similarly, we can give we have shown that PCP is undecidable and then PCP can be used to prove that some problems related to say especially context free languages to be undecidable. We have already shown that given grammar given a CFG whether G is ambiguous. So, this problem is basically for any arbitrary CFG is undecidable. We used PCP to show that the ambiguity problem of CFG is undecidable. Similarly, we can show that given a CFG G 1 and CFG G 2 whether L of G 1 intersection L of G 2 equal to phi. So, this problem is also undecidable. We can easily show it by using the same construction that was used in case of PCP in case of showing that ambiguity problem of CFG is undecidable. For example, just consider say there is an instance of PCP say it is x 1 y 1 x 2 y 2 have to say x n y n. So, from this instance of PCP we will construct grammars G 1 and G 2. We will construct conditional grammars such that that PCP instance P has a solution if and only if L of G 1 and L of G 2 is non-empty. Now, the constructions are similar that we have described in case of showing that a given arbitrary grammar is ambiguous or not is undecidable. For example, we introduce a new set of symbols a 1 a 2 up to say n as many symbols as their lists as their pairs of pairs in the PCP. And then in G 1 we have production likes S 1 goes to a i S 1 x i and a i x i for all i similarly in G 2 we have S 2 goes to a i S 2 y i and a i y i. So, we can now easily show that L of G 1 interaction L of G 2 is non-empty if and only if this PCP instance has a solution. So, if because if this instance of PCP has a solution so there must be some sequence say i 1 i 2 some i k which is solution to this PCP such that x i 1 x i 2 up to x i k equal to y i 1 y i 2 up to y i k. So, this two are must be same because there is a solution to the PCP this sequence solution to the PCP. So, according to definition of PCP so this two must be same, but in case of G 1 and G 2 we have seen that if we consider a i 1 or a i k a i k minus 1 up to a i 1 x i 1 x i 2 up to x i k. So, for this string there is a derivation in G 1 starting with S 1. So, S 1 derives this string similarly as to derives this string a i k a i k minus 1 up to a i 1 x sorry y i 1 y i 2 up to y i k. Now, since the first part is same a i k to a i 1 a i k to a i 1 and x i 1 to x i k this identical to y i 1 to y i k. So, these two strings must be identical is a same. So, therefore, this string and this string belongs to both since we started S 1 in G started S 2 in G some derivation we can always derived like this. So, therefore, interest in L 1 and G 1 is not empty. So, this string is common to both the language L of G 1 and L of G 2. Similarly, you can prove the converse. That means the PCP has solution if and only if L of G 1 and L of G 2 has some common element. Now, similarly we can define or give many other problems related to context free grammar and show that they are all undecidable by reducing PCP to those problems. Now, please note that the theory of undecidable is concerned with determining whether or not there exist algorithms for solving problems. So, that is what we want to know thus there exist an algorithm for solving any given problem if it exist and it is decidable otherwise it is not decidable. Now, people started giving algorithms or knowledgeable algorithms from known to people since long is only at the beginning of 20th century that means 1900 that people started about thinking whether there exist an algorithm or not for any given problem. They started with an address given by David Hilbert in 1900. So, he paused many problems to the community at the time. So, one of those problems was like this there is a 10th problem devise a process using which it can be determined by a finite number of operations where a polynomial has an integral root. That means devise a process devising a process using which it can be determined by a finite number of operations it means that he wanted to devise an algorithm that is the notion of algorithm that is known to us devise an algorithm to determine whether a polynomial has an integral root or not. That means if we have a polynomial like this say 13 x cube y j square minus 6 x y cube plus 7 say y square z minus 2 y plus 100 say this is a polynomial involving 3 variables x y and z. So, it will have a root if we have an assignment sum x equal to something some value of x y and z such that those values when you put here it satisfies to 0 it becomes equal to 0. So, it is a root. So, the question is whether we have an integral root whether some integers well we can put over here x y and z show that it becomes equal to 0. So, apparent assumption was that such an algorithm must exist. So, Hilbert assumption was that it was it exists and one need to simply devise this algorithm, but it took almost 70 years to prove that no such algorithm exists to determine whether a polynomial has an integral root. This is proved by Matias Sevis in 1970 it took long 70 years to show that no such algorithm actually exists to determine whether any given arbitrary polynomial has an integral root or not. Now, during that period a clear definition of algorithm was not available what is mean by an algorithm instead an intuitive notion of algorithm was only known, but the intuitive concept of algorithm may be sufficient to give algorithm for certain problems, but it is not enough to show that there exist no algorithms for any given problem. That means people were making that time a clear definition of algorithm. There is a long wait of almost 35 years for a clear definition of algorithm and eventually it was given via search during thesis. In 1936 Alain Zassard developed lambda calculus which is a notational system and Alain Thuring developed Thuring machine which is computing or abstract machine and it was shown that lambda calculus and Thuring machine these two notions are equivalent. An intuitive notion of algorithm is equivalent to Thuring machine algorithm this is basically known as search during thesis. So, that means we can define an algorithm by designing by giving a Thuring machine and undecidability of the halting problem was proved by Thuring in 1936. In case of Hilbertian problem we can define the corresponding language like this say L of p is a set of all polynomial p is a polynomial with an integral rule. So, the problem is given a polynomial p where are not p belongs to L p this language is undecidable. The problem is of course decidable for polynomials that have only one variable for example, if we have say variable involving only say x say suppose we have variable I mean polynomial say involving say 6 x to the power 7 minus 2 x to the power 5 plus and so on only x variable is only x. So, in such a case what a Thuring machine can do is that it can compute the polynomial for different values of x starting at 0 put x equal to 0 compute the value of the polynomial if it is 0 is fine will stop otherwise it will compute the polynomial for x equal to 1 and x equal to minus 1 if at any point it becomes 0 then will stop otherwise it will continue in both direction with 2 and minus 2 then minus 3 and 3. So, it will continue and so on until it finds a solution, but point is that such same thing can be used for multivariable problem also for x y z and so on. Suppose we have take different values of x y z and keep on evaluating the polynomial until it becomes 0, but that means we have Thuring machine to do this, but whether it is a decidable or not there is not known. We have single variable we need not go infinitely many steps. So, we can stop at some point whenever we do not find a solution and say that this has no integral root or if we find any we will stop the Thuring machine will stop saying that it has an integral root. So, up to what limit will go it can be say that it is plus minus k some c max by say c 1 where k is the number of terms in the polynomial how many terms are there and c max is the coefficient with largest absolute value and c 1 is basically the coefficient of the highest order term. So, we will keep on going like this until up to this limit until it finds a root if it does not find a root it will say that declare that there is no integral root for this polynomial. So, therefore, for single variable the problem is solvable, but for multivariable the problem is not solvable and it was proved by Mathias Evis in 1970 only that for multivariable case the problem is unsolvable.