 In the process of minimization of a DFA, in my previous lecture, I have introduced a characterization of languages that are accepted by DFA, the so called Mahily Road theorem. So, we will be using that to minimize the number of states in a DFA. As you recollect, when we are converting an NFA to DFA, we are getting so many states and we are seeing that there are certain states whose roles are same and thus, there may be a process required to reduce those redundant states. First, let us see these observations in this direction. So, given a DFA, there may be certain states which are redundant state in the sense that their roles in the language acceptance are same. That is the point number 1. Here, two states are said to have same role. If it will lead us either in both final state or both non-final states for every input string, because look at here. We say two states have the same role, because here DFA used for the language acceptance. That means, if you put any string in the initial state, if you are reaching to the final state, we say it is accepted. Now, two states are said to be equivalent here. If you are putting any string in both the states, if both are reaching to final states or both are reaching to non-final states, we say that their roles are same. We will use this intuition to formalize and introduce the notion of equivalence of states. So, once we can find such an equivalent states, then what we do? Among those states, we will remove, among that group which are equivalent, we will remove all other states and only one state if you pick up and construct DFA with the error redundant states. So, in that process, let us formally define the notion of equivalence of states. Now, two states p and q of a DFA are said to be equivalent denoted by p equivalent to q. Here, I am calling it equivalent anyways. If for all x and sigma star, both the states, both the states delta of p comma x and delta of q comma x are either final states or non-final states. That means, if you put any string in both the states, if both are reaching to final states or both are reaching to non-final states, we say they are equivalent. Formally, let us introduce the equivalence between states like this and we can clearly observe that this is an equivalence relation on the state set q. You can observe that it is reflexive because if you put any string in a particular state, delta of p comma x and delta of p comma x as it is same, both are final states or both are non-final states. So, that way it is reflexive and you can observe the symmetry very clearly and transitivity. So, that you can understand that this is an equivalence relation on the state set q. Now, once you have an equivalence relation on a particular set, we will get a partition of that set. Let us denote the partition corresponding to this equivalence relation by pi. Now, you understand that evaluating this equivalence relation on a state set is not that easy because to understand two states are equivalent, you have to put every string from sigma star and see whether both the resultant states are final states or non-final states. So, since there are countably infinite many strings in sigma star, it is not very practical to evaluate the equivalence directly. That means, by applying every string in both the states and seeing whether both are final states or non-final states. So, in that context, we will in a more practical direction, we will first introduce a k equivalence where we put some bound on the number of strings that you will be testing for the purpose. So, that we call it as k equivalence as shown here. We define for k greater than equal to 0, two states p and q of a d of a are said to be k equivalent denoted by p k equivalent to q, I call it as k equivalent to q. If for all x whose length is less than or equal to k, both the states delta of p comma x and delta of q comma x are either final states or non-final states. That means, we are putting the restriction on the length of the strings. That means, up to k length including k, the strings you apply in both the states and see what are the resultant states. If both the resultant states are final states, then you say they are k equivalent, if both the resultant states are non-final states then say they are k equivalent. Otherwise that means, if one is a final state and other is a non-final state then you say they are not k equivalent. Again you can understand that this k equivalence relation, this k equivalence relation that is an that is an equivalence relation on the state set and the corresponding partition let us denoted by pi k. So, using this k equivalence, we can now approach to the state equivalence. So, here are the remas. You can quickly understand that if two states are equivalent, p is equivalent to q if and only if p is k equivalent to q for all k greater than equal to 0. Because for all length strings, you will be submitting in both the states p and q and see the resultant states, if they are essentially k equivalent then we can observe that they are equivalent. And this is a another quick observation for k greater than equal to 1, if two states are k equivalent then they are k minus 1 equivalent. The reason why we are we are submitting the strings of length up to k in both the states p and q and we are seeing that both are final states are non-final states when you assume p is k equivalent to q. That means, since we are submitting the strings of length up to k, we are submitting any way length of strings up to k minus 1 also that way it is clear that if p and q are k equivalent then they are k minus 1 equivalent also. Now, let us try to understand that how to what is the relation, because here we gave a remark that p is equivalent to q if and only if for all k p is equivalent to p is k equivalent to q. That means, for all k we have to test but is there a way to understand that, because again here this is an infinite test because for all k greater than equal to 0 we have to test. So, in this direction of finding an appropriate way to understand that in a at a finite stage let us first have the following results. Now, the theorem here is for k greater than equal to 0 and if you take any two states p and q in now p and q are k plus 1 equivalent p and q are k plus 1 equivalent if and only if they are 0 equivalent and delta of p a and delta of q a are k equivalent for all a in sigma. So, look at this theorem here we are characterizing the k plus 1 equivalence in terms of the lower degree k lower degree equivalence as here k equivalent of course, here it is 0 degree equivalence that we are looking at. So, once we understand this we will be able to evaluate from this criterion that if you have understanding about k equivalent one more step about k plus 1 equivalence this criteria will be helpful. So, let us look at the proof of this first term if k plus 1 if p is k plus 1 equivalent to q then as we have remarked p and q are k equivalent and thus you can understand that k from k plus 1 equivalent to k equivalent and k equivalent to k minus 1 equivalent and so on you can go down to 0 equivalent and you can clearly observe that if p and q are k plus 1 equivalent then p and q are 0 equivalent anyway. So, from this statement I can conclude that p and q are 0 equivalent and now to understand delta of p a and delta of q a are k equivalent for all a to understand that let x in sigma star of length let x in sigma star of length less than or equal to k and you pick up an arbitrary a in sigma. Since p and q are k plus 1 equivalent we can understand that delta of delta of p come a x then here the total length is k plus 1. So, the resultant state when you apply in p the resultant state when you apply in q the length of string here is a x is k plus 1 both the states either final states or non-final states because from the hypothesis p is k plus 1 equivalent to q here we are applying the strings of length k plus 1 k plus 1 and thus you can understand that these states the resultant states when you apply the strings a x in p and q both are either final states or non-final states. And from this you can quickly conclude then that since this is true for all x of length less than or equal to k delta of p a and delta of q a are k equivalent. Conversely for k greater than or equal to 0 suppose p is 0 equivalent to q and delta of p a is k equivalent to delta of q a for all a in sigma. Now what we have to prove we have to understand that p and q are k plus 1 equivalent. Now since we are assuming that delta of p and delta of q are k equivalent for all x of length less than equal to k and for any a in sigma delta of p a x and delta of q a x if you these two states both are final states or non-final states. That means from this what we can understand that because here is a restriction delta of p a in this state you are applying the string of length less than equal to k and delta of q a in this also you are applying the string of length less than equal to k you can understand that for this with respect to p and q delta of p y delta of q y the resultant states when you apply any string of length between 1 and k plus 1 because minimum 1 is here and of length up to k you are adding that means of length up to k plus 1 that means length between 1 and k plus 1 any string y if you apply in both p and q they are final states or non-final states and in the hypothesis it is given that p is 0 equivalent to q. So, now what we have p and q are 0 equivalent and if you apply any string of length varies from 1 to k plus 1 the resultant states are both final states or non-final states and thus what you have is in p and q if you apply any string of length up to k plus 1 both are final states or non-final states and hence we have the conclusion p is k plus 1 equivalent to q. So, now the criteria here what we have to conclude that 2 states are k plus 1 equivalent if and only if they are 0 equivalent and for all a if you apply in both the states if they are k equivalent then this is an equivalent this is a criterion this is a characterization for p is k plus 1 equivalent to q. So, 2 state 2 k equivalent states p and q will further be k plus 1 equivalent if delta of p a is k equivalent to delta of q a for all a in sigma. So, we have to this is the criterion to evaluate k plus 1 equivalence from k equivalence and using this now I can say that we can calculate the partition pi k plus 1 from pi k that means from k equivalence we can how to evaluate k plus 1 equivalence this criteria this criterion is helping us. Now, as I had mentioned that k equivalence for all k greater than equal to 0 is essentially equivalent to the state equivalence what we have defined now, but since it is an infinite this is an there are infinitely many things that we have to test. Now, this theorem will be helpful that if you have obtained at a particular stage pi k is pi k plus 1 for some k greater than equal to 0 then we can conclude that that particular partition pi k is in fact, the partition corresponding to the state equivalence pi. So, this theorem will be helpful to understand that we can actually have a finite process to understand the state equivalence. So, let us first prove this theorem suppose pi k is equal to pi k plus 1 for some k greater than equal to 0 to prove for p and q and q k plus 1 equivalent implies they are k k plus 1 equivalent implies they are equivalent for all n greater than equal to 0 it is enough to prove that if they are k plus 1 equivalent then they are k plus 2 equivalent also. Once I prove this then by induction from k plus 2 to k plus 3 we can go and k plus 3 to k plus 4 we can go and so on. Thus we can understand that if p and q are k plus 1 equivalent then p and q are n equivalent for all n greater than equal to 0. So, we we just to prove that p and q are k plus 1 equivalent implies they are k plus 2 equivalent. Now, let us consider that assume p and q are k plus 1 equivalent that implies by definition delta of if you apply any string as we have proved this criterion if p and q are k plus 1 equivalent then you can understand that delta of p a and delta of q are k equivalent for all a belongs to sigma. Just we have proved this criterion and now what you understand this implies delta of p a and delta of q a are k plus 1 equivalent for all a belongs to sigma. Now, once we have this criterion then we can conclude that p and q are k plus 2 equivalent. Once again we see that once you start with p and q are k plus 1 equivalent then clearly for all a belongs to sigma we have this now this is a criteria to understand that delta of p a is k plus 1 equivalent to delta of is k plus 1 equivalent to delta of q a and once again using that theorem we can conclude that p and q are k plus 2 equivalent. And hence by induction k plus 1 two states are k plus 1 equivalent implies they are m equivalent for all n greater than equal to 0. And hence if pi k is equal to pi k plus 1 for some k greater than equal to 0 then that pi k is actually the corresponding the partition is corresponding to the partition of k a state equivalence. Now, using this using this results what we understand the state equivalence can be evaluated by one after another going through calculating one equivalence two equivalence and so on. At a particular stage if you get at a particular stage if you get pi k is equal to pi k plus 1 then we have obtained the state equivalence partition. And that equivalence is essentially gives you the state equivalence and wherever the you know more number of states in a particular equivalence class are there we can remove those things and I take one particular state and a device a new DFA with lesser number of states. So, whatever the process so far whatever the results that I have up I have proved so far let me apply on this particular example and evaluate the state equivalence. So, let us consider this following DFA here I gave a DFA with 10 states in which q 3 q 4 q 6 q 8 or final states with the initial state q naught and the transition are given this way. So, this is the DFA given to us now first we will calculate now first we will calculate the this partition that pi naught 0 equivalence partition. That means in any if you take any two states by apply empty string in both the states you both are final states or both are non-final states they are 0 equivalent. So, that means in any of the two states for example, in this if I consider q 1 and q 2 if you apply empty string the results in states are q 1 and q 2 only and since both are non-final states they are equivalent. For example, if you consider q 1 and q 3 if you apply empty string in it what is happening the resultant states are again q 1 and q 3 only q 1 is a non-final state whereas, q 3 is a final state and thus you can understand that q 1 and q 3 are not 0 equivalent. Now, you can quickly understand that what will be the partition pi naught that means what are the 0 equivalent states that we have to write here all final states will be 0 equivalent to each other and similarly, all non-final states will be 0 equivalent to each other. So, in this partition q naught q 1, q 2, q 5, q 7, q 9, q 10 these are all non-final states they are all equivalent to each other with respect to 0 equivalence and all final states are here q 3, q 4, q 6, q 8 they are equivalent to each other because they are all final states. Now, pi naught we have calculated 0 equivalence partition is here. Now, from 0 equivalence partition using that criterion we can calculate pi 1 that means 1 equivalence partition what we have to understand here 2 states which are already 0 equivalent they will be further 1 equivalent if you apply any symbol in both the states if the resultant states are 0 equivalent or not that we have to cross check based on that we have to evaluate this 1 equivalence partition. Now, you see here we need not verify for q naught q 3 because these 2 are not 0 equivalent already. So, let us consider a particular equivalence class in which what are all the states further they will continue to be 1 equivalence that is what we have to verify. Now, let us consider q naught and q 1 since they are 0 equivalent and you see this q naught q 1 if you apply a the resultant states are q 3 and q 6 you can see here q 3 and q 6 in q 3 q 3 is a final state I mean q 3 and q 6 are in the same equivalence class then you check for the symbol b the for the symbol b the resultant states are q 2 and q 2 and thus I can say that q naught q 1 are further 1 equivalent. So, they will be in the same equivalence class now I will verify q 1 and q 2 by transduce you can quickly understand whether q naught is if they are not equivalent then it cannot if q 1 and q 2 are not equivalent then q 2 cannot be equivalent to q naught also because q naught and q 1 are 1 equivalent already. So, q 1 and q 2 you consider and you see when you apply a that is q 6 and q 8 q 6 q 8 are in the same equivalence class and q 2 q 5 are in the same equivalence class here and thus q 2 is also equivalent will be in the same equivalence class with q 1 and q naught now let us take q 2 q 5 if you consider q 2 q 5 when you apply a the resultant states are q 8 q 4 and you see q 8 q 4 in the same equivalence class here q 8 q 4 in the same equivalence class and when you apply b that is q 3 and q 5, but you see q 5 is in this equivalence class whereas q 3 is in this equivalence class. So, at this symbol the resultant states since they are not 0 equivalent we understand that q 5 is not equivalent to is not is not 1 equivalent to q 2 and hence q 5 has to be put in separate equivalence class. So, let me start a new equivalence class for this purpose say q 5 and you understand that q 5 cannot be equivalent to q 1 and q naught also because q 2 is equivalent to q 1 and q naught now q 5 is let us start a new equivalence class for this. Now, let us consider q 5 q 7 or you can check whether q 7 is equivalent to q 2 and if it is so then you can put q 7 in this equivalence class if it is not then you will cross check with q 5 and if it is if they are equivalent then you put in that equivalence class even otherwise you can start a new equivalence class for q 7. Let us take q 7 and check the equivalence with q 2. So, q 2 q 7 the resultant states are q 8 q 4 when you apply a and when you apply b that is q 5 q 6 you see here when I am cross checking with q 2 and q 7 at b at b q 5 q 6 have come as a resultant states and you see q 5 is in this equivalence first equivalence class and q 6 is in the second equivalence class thus q 2 and q 7 are not equivalent. So, q 7 I cannot put in this equivalence class first equivalence class now let me cross check whether q 7 is equivalent to q 5 I mean 1 equivalent to q 5. So, q 5 q 7 I am cross checking by supplying the symbol a resultant states are q 4 they will be in the same equivalence class and here when you apply b that is q 3 q 6 and you see q 3 and q 6 are also in the same equivalence class and hence q 7 is 1 equivalent to q 5. So, I will be putting this q 7 in the equivalence class of q 5 now let us take q 9 with q 7 q 9 q 7 when I am considering when I apply a I am getting q 4 q 7 and you see q 4 is in this equivalence class whereas, q 7 is in this equivalence class and hence q 9 q 7 q 9 q 7 are not 1 equivalent. Now let me cross check whether q 9 will go in this equivalence class the equivalence class of q naught q 1 q 2 let me cross check. So, let me cross check with one of them take q 9 q 2 and apply a the resultant states are q 7 q 8 and you understand that q 7 is in this equivalence class and q 8 is in this equivalence class. So, q 9 cannot go along with q 2 also thus I have to start q for q 9 a new equivalence class. So, let me start that q 9 now in this equivalence class I have q 10 now whether q 10 will fall in the first equivalence class or in the second one or third one let me let us cross check. So, let me cross check this q 10 q 9 whether they are equivalent in q 9 and q 10 if you apply a the resultant states are q 5 q 7 and you see they are in the same equivalence class and if you apply b that is q 9 q 10 you see they are in the same equivalence class and hence I am getting that q 10 is one equivalent to q 9. So, we can put in this equivalence class now I can close this classes because nothing further you can you will add because what are all the states in the second equivalence class of pi naught none of them will go along in any of this classes. So, I will close these things now let us cross check whether q 3 and q 4 are further one equivalent q 3 q 4 when I am cross checking the resultant states are q naught q 2 and you see q naught and q 2 are 0 equivalent and when I apply b q 1 and q 5 are coming and you see q 1 and q 5 are 0 equivalent and thus q 3 q 4 they should be in same equivalence class. Now, let me cross check q 4 q 6 q 4 q 6 if you apply a we are getting q 2 q 1 you see here q 2 q 1 we are getting and q 2 q 1 are 0 equivalent and when you apply b I am getting q 5 q naught they are also 0 equivalent and thus q 6 will be the equivalence class of q 4. Now, let us see what about q 8 let us cross check with q 8 with q 6 in q 8 q 6 if you apply a we are getting q 1 q 2 they are 0 equivalent and when you apply b q naught q 7. So, they are also 0 equivalent and thus I can see that q 8 is also in the same equivalence class this is the 1 equivalence partition pi 1 we have calculated 1 equivalence partition pi 1. Now, you can continue this fashion to calculate pi 2 without much explanation very quickly I will see that you can all q naught q 1 we cross check and you understand that q naught q 1 will be equivalent you just cross check that and q 1 q 2 you cross check and you understand that q 2 will also be equivalent to this as I am putting here. And q 5 q 7 you cross check you understand that the resultant states are 1 equivalent and thus I can put again they are continuing into the same equivalence class. If you want a verification here q 5 q 7 you take the resultant states are q 4 when I when you apply a when you apply b q 3 q 6 and you see q 3 q 6 are in the same equivalence class of 1 equivalence that in pi 1 here q 3 q 6 and thus I am putting q 5 q 7 continuing to be in the same equivalence class. Similarly, if you evaluate you will understand that q 9 q 10 will continue to be equivalent. Whereas, here what you will understand is q 3 q 6 are equivalent whereas, this q 4 is not equivalent to q 3 and it will form a new equivalence class and this is the equivalence class that you will get and this is the corresponding partition of two equivalence. So, pi 2 once again you verify that as per this process and now let us calculate pi 3 and in pi 3 if you once again follow this q 0 q 1 you cross check and you understand that they are equivalent. Whereas, if you cross check q 1 with q 2 you understand that that will not be these two will not be 3 equivalent and when q 2 get separated. So, it will form a single another equivalence class and q 5 q 7 if you cross check they will be further 3 equivalent. So, q 5 q 7 will continue to be equivalent in 3 equivalence partition and this q 9 q 10 if you cross check they will further be equivalent and now you cross a q 3 q 6 you will understand that they are further 3 equivalent q 3 q 6 and similarly, q 4 q 8 if you cross check the resultant states are 2 equivalent and therefore, these two states are 3 equivalent. So, if you calculate you will get this is the 3 equivalence partition. Now, since there is difference between pi 2 and pi 3 because in pi 2 q 0 q 1 q 2 are equivalent to each other here q 1 and q 2 are not equivalent. So, there is a difference between pi 2 and pi 3 there is a difference from pi 0 to pi 1 pi 1 to pi 2 and pi 2 to pi 3. So, now, we have to further continue let us now calculate pi 4 use the same process. That means, what are all the states 3 equivalent you just cross check using that criteria whether they are 4 equivalent that means q 1 q q 0 q 1 you take and see by applying a and applying b whether they are further equivalent or not. For example, here q 3 q 6 in q 0 q 1 if you put q 3 q 6 are 3 equivalent and if you apply b that is q 2. So, that is anyway the same single state thus q 0 and q 1 further continue to be 4 equivalent and of course, q 2 is a singleton set. So, that will continue to be single equivalence class q 5 q 7 when you are cross checking you will understand q 5 q 7 the resultant states are when you apply a q 4 and when you apply b q 3 q 6 and you understand q 3 q 6 are 3 equivalent and thus q 5 q 7 continue to be 4 equivalent. Similarly, you cross check for q 9 q 10 q 3 q 6 q 4 q 8 and understand that this is there are further 4 equivalent and that means, here pi 4 is actually equal to pi 3 and thus we have got a situation that pi k is equal to pi k plus 1 here k equal to 3. So, after this many say 1 2 3 steps we understand the 4th 4th 4 equivalent partition is equal to 3 equivalent partition that means, from the previous theorem if for some k pi k is equal to pi k plus 1 then there that is the equivalent partition state equivalent partition. So, here we understand that we have calculated the equivalence the state equivalence partition pi that is what is pi 3. Now, what do you do from this equivalence classes you pick up one of the states for example, in this equivalence class you can take q naught in this anyway you take q 2 in this q 5 in this say for example, q 9 q 3 q 4 you take and the respective transitions you maintain thus you will get you will be able to find you will be able to write a new DFA. Now, of course, whatever the new DFA that I am writing by removing the equivalent states whether that is equivalent to the original DFA or not that we have to cross check. So, this is how we are reducing the states instead of removing some other states you can relabel them for example, q naught q 1 this q naught q 1 you may call it as say p 1 let me yeah. So, this state q naught q 1 I call it as say p 1 and p 2 I will take the singleton q 2 p 3 and p 2 I will take this q 5 q 7 p 4 I take q 9 q 10 and p 5 I will take this q 3 q 6 p 6 this is a relabeling of the resultant equivalence classes q 4 q 8. So, I have got 6 equivalent classes I am calling them p 1 p 2 p 3 p 4 p 5 p 6. Now, what do you do the original DFA corresponding to those transitions take a b take p 1 p 2 p 3 p 4 p 5 p 6 as states. Now, for transitions corresponding to p 1 this is in this state you pick up any one of the states pick up either q naught or q 1 and look at the transitions for q naught we have q 3 and if you apply b you get q 2 and the in this equivalence classes q 3 is falling in this equivalence class and q 2 is falling in this equivalence class. So, those equivalence classes labels you can write. So, q 3 q 6 this is p 5 and this is p 2. So, this is how the resultant transitions we write and similarly, if you continue here it is p 6 this is p 3 and for p 3 also you write p 4 p 5 p 6 if you write this table by taking the transitions because for p 2 this is q 2 corresponding to q 2 what are all the transitions the resultant states in which equivalence classes that they are falling you write. Similarly, for p 3 if you write you get p 6 p 5 and if you continue this you get this is the transition table the transition table and since q naught is the initial state and q naught is falling in the equivalence class p 1 we designate p 1 as the initial state and final states are falling in p 5 and p 6 and thus we will make this p 5 and p 6 as final states in the new DFA. So, thus we will construct a DFA by reducing the states wherever there are some equivalent states. Now, the question is what are the DFA that I have formulated if you draw the state diagram of this this is the resultant DFA. Now, the question is what are the DFA that we have constructed in this manner whether this is a minimal DFA minimal means further can we reduce the states here is a question here. Now, when I am considering this equivalence classes now let us look at p 1. So, these are the classes that we have considered now let us see related to that the following theorem for every DFA A there is an equivalent minimum state DFA A dash. How do we do that what are the algorithmic approach that we have adopted just now that means by calculating the state equivalence through 1 equivalence, 2 equivalence, 3 equivalence and so on. We are getting the state equivalence from the state equivalence we have formulated a DFA. So, we will follow that method and we first constructed DFA and we observe that whatever that we have constructed that is in fact is a minimum state DFA corresponding to that language. Of course, an equivalent means 2 automata equivalent if the language is both the automatic or same. So, let us consider A q sigma delta q naught f a DFA and take the state equivalence on this and calculate the partition. Now, let us construct A dash with q dash sigma delta dash q naught dash f dash where this state set is the equivalence classes with respect to this equivalence relation and moreover what are all those equivalence those states which are accessible from q naught. If a particular state is not accessible even if it is forming you know even if it is the equivalence class corresponding to that particular one since we are it will not contribute to the language you can simply ignore those equivalence classes. So, consider those equivalence classes if q is accessible from q naught in the original DFA. Now, what is the initial state the equivalence class containing the initial state of the original DFA as we have constructed earlier in that example. Now, what are the final states consider those equivalence classes which are having final states and what is the transition that transitions delta dash is from q dash cross sigma to q dash which is defined by in a equivalence class if you apply A in the original DFA you apply A in that particular state and see what are the resultant equivalence class and assign to that. Now, the way that I am defining here whether this is well defined that is what we have to cross check. So, what we are defining here is delta dash of bracket q at A is defined as in the original DFA in the state q you apply A and consider the equivalence class containing that. Now, to check whether this is delta dash is well defined consider two equivalence classes say bracket p is equal to bracket q that means p and q are equivalent to each other that means if you put any string in both p and q both are final states or non-final states that is the meaning here. Now, what I have to understand delta dash of p comma A and delta dash of q comma A they are same. So, take fixed let A belongs to sigma now you look at delta of p comma A and delta of q comma A. Whether they are equivalent or not that means if you choose any string x and sigma star what we have to cross check whether this delta cap of delta of p comma A attacks and delta cap of delta of q comma A attacks the resultant states both are final states or non-final states that is what we have to understand. Now, this is nothing else but delta of p comma A x and this is delta cap of q comma A x now since p and q are equivalent to each other by applying any string in both p and q both are either final states or non-final states and thus you see since this is equal to this these two states by applying x either final states or non-final states and hence you understand that delta of p comma A and delta of q comma A are equivalent to each other and hence the corresponding equivalence classes are same delta of p comma A the equivalence class is equal to the equivalence class containing delta of q comma A and hence delta dash of bracket p at A is same as delta dash of bracket q at A and hence delta dash is well defined. So, this map is well defined and hence you understand that this is a DFA whatever we have constructed A dash that is a DFA. Now, the newly constructed DFA A dash is equivalent to the original DFA that means we have to cross x L A is equal to L A dash both the languages are same. In fact, we show that this delta dash of bracket q naught x is equal to the equivalence class containing this state delta dash of in the original automaton in the initial state if you apply x what are the state that you are getting we consider that the equivalence class. So, in fact, we show this thing if we show this then it is sufficient because if this resultant state this is in f dash that means in the final state that means this delta dash of q naught comma x should be in f that is how we have considered f dash and of course, conversely because of this any string if you apply the initial state if it goes to final state in the original DFA that means it is in the language accepted by A and thus if you apply this string in the initial state of the DFA A dash then you will be in the final state. So, because of this reason you can understand that if you show that this is happening then the language accepted by A and language accepted by A dash are same because those strings which are going to final states in the original DFA in A dash also they will go to final states they will they will take the automaton to final states and vice versa. We prove this assertion by induction on the length of x the basis for this induction is very clear because if you consider this is what is when you apply empty string this is bracket q naught in a DFA and bracket q naught is nothing else but delta cap of q naught at epsilon by applying epsilon in the original DFA and consider the equivalence class. So, the basis for the induction is very clear now for inductive step you consider a string x in sigma star and a symbol A in sigma and consider this delta cap at q naught at x A and you see this is equal to this is the expansion. When you apply any string now by inductive hypothesis this guy is the equivalence class containing this state delta dash at bracket q naught at x is the equivalence class containing delta delta of q naught at x. So, this is by inductive hypothesis and now if you apply A here from definition of delta dash this is the equivalence class containing this and that means what you have the equivalence class containing you know the state when you apply x A in q naught of the original automaton. So, as desired we have got delta dash of q naught at x A the equivalence class containing q naught at x A is equal to the equivalence class of delta of q naught at x A and thus from induction we can conclude that we have got this other we have got this thing and hence the language accepted by A is same as language accepted by A dash. So, what are the new automaton that we have constructed that is equivalent to the original DFA. Now, the second point we have to observe that this is having the minimum number of states to prove that A dash is a minimal state DFA accepting L what we do we prove the number of states of A dash is equivalent to the number of states of A L you recall A L is the minimal DFA minimal DFA accepting L from Malinore theorem whatever the this the automaton A L we have constructed in the step in the proof last step of the proof there we have called it as A L and you remember that is the minimal DFA accepting L. Now, what we prove here A dash is having exactly the same number of states as A L and since we know A L is a minimal DFA accepting L we understand this A dash is also minimal state DFA. Since states of A L are the equivalence classes of this delta L because this is the equivalence relation we have associated to a we have associated to the language L. Now, it is sufficient to prove that index of this delta L is same as the index of delta A that means the equivalence classes of delta L and equivalence classes of equivalence classes of delta A delta A dash they are same that is what we will prove and now recall the proof of proof 2 implies 3 of Malinore theorem in which what we have proved the index of delta L is always less than or equal to index of delta A dash it is not only for A dash for any automaton which is accepting L. So, we have this already on the other hand if you assume the index of this is more than that of delta L because we want to observe this 2 are equal. On the other hand if you assume there are more number of equivalence classes of this delta A dash this prime is wrongly typed this you have to have A dash here then spelling mistake then that of delta A delta L does that is. So, if you have more equivalence classes with respect to this equivalence relation what is the meaning of this you can find 2 strings x y and sigma star such that they are equal and with respect to delta L, but they are not equivalent with respect to this delta A dash that is because delta A dash in a d f a the equivalence relation that you know if you apply in the initial state if both are the result both the resultant states are same by applying x and y then we say they are equivalent. Here they are not equivalent that means if you apply in the initial state that is bracket q naught here if you apply x what are the state that you are getting it is different from when you apply y in the initial state bracket q naught that means by definition just now we have we have understood that this value is equal to this the equivalence class containing this state. So, these 2 are not equal that is 1 among these 2 are not these 2 equivalence classes are not same means the states in this you know by a 1 among the states this is a final state and other is non final state.