Describe the language generated by the grammar G S where 0

Describe the language generated by the grammar G = {,,S,}, where = {0,1}, = {S,X,Y,Z} and = {S 0X|1Y,X 1Y|1Z,Y 0X|0Z,Z 0|}. Hint:Make a diagram of the productions

Solution

Ans-

We know that RL has m classes. First observe that in order to check whether for any words u,v it holds that uRLv, one only has to check whether uw L(A) vw L(A) for all words w of length m (two words u,v are not equivalent iff they can be distinguished by a word w of length m, that is, uw L(A) but vw L(A) or vice versa – this is the idea of the table-filling algorithm). So it is possible to determine whether uRLv by at most m many checks. We next procure representatives r1, ..., rm of the RL-equivalence classes, such that we may write them as [r1],..., [rm]. We may assume that these representatives have length at most m. Choose r1, ..., rm among all words u,v of length m such that the chosen ri are pairwise not equivalent. Without loss of generality choose r1 = . Identify the states of the DFA you are about to reconstruct with [r1],..., [rm]. Assign [r1] = [] to be the starting state, according to the construction in the proof of the Myhill-Nerode proposition, and choose as accepting states all [ri] where ri L(A). Finish your construction by putting for i = 1,...,m, a : ([ ri], a) = [ri a] = [ rj], where you use the method to decide uRLv to find out to which representative rj the word ri a is equivalen

Describe the language generated by the grammar G = {,,S,}, where = {0,1}, = {S,X,Y,Z} and = {S 0X|1Y,X 1Y|1Z,Y 0X|0Z,Z 0|}. Hint:Make a diagram of the productio

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site