 So, far we have discussed about computability with respect to Turing machines. Now, like in case of finite automata or push down automata, we have an equivalent formalism with respect to grammars also. So, in case of push down automata, we have called them as context free grammars, in case of finite automata that is regular grammars or right linear grammars. So, we have discussed all those things and we have ascertain the equivalence between those classes. So, similarly in case of Turing machines, we have a class of grammars an equivalent set of grammars. So, here this is the most as you understand the Turing machine is defined for the utmost computability that means as a device which is useful to model the computation, this is the model of computation. So, grammar whatever that we are going to talk about that should also have enough facility to capture or to understand anything which is which you wanted to compute. So, in this lecture I will talk about that more general type of grammars. So, we call this as because we have certain restrictions so far on the grammar in case of context free grammar or regular grammar. This is the one which is more in a relaxed fashion that means the more general one we call it as a structured grammar or unrestricted grammar. So, the grammars that I am going to talk about here are structured or unrestricted or unrestricted grammars. So, now the question is what is that what is the meaning of unrestricted grammar? Like if you look at if you remember in case of context free grammar a production rule A goes to alpha where this A is a non terminal symbol and this alpha is a mixture of terminals and non terminals because if you write terminals by sigma I wrote that as say V. So, alpha is an element of V star as we just recollect that this A non terminal because some for every production rule left side some non terminal has to be there. Otherwise when you are applying a production rule because for a terminal we are we have already agreed upon that when you want to apply there has to be a non terminal on the left hand side of each production rule. Now, we relax this condition that left side only one non terminal symbol that was the restriction that we were maintaining. So, we relax that condition. Now, what is the more general situation the left side also you can have a mixture of terminals and non terminals right side also mixture of terminals and non terminals, but you remember that if you want to apply a production rule at least one non terminal has to be there. Suppose if you arrive to a terminal string in a derivation then we as we have as we have seen we do not expect anything further because we have derived already a terminal string that means the derivation ends there. So, there has to be at least one non terminal to apply any production rule. So, that condition we cannot relax. So, the more general scenario is left side a mixture of terminals and non terminals, but at least one non terminal has to be there and the right side a mixture of terminal non terminals as earlier. So, this unrestricted grammar the production rule which is of the form say alpha goes to beta where alpha is a mixture of terminals and non terminals, but at least one non terminal has to be there. That means it is an element of this set and as earlier beta is an element of V star where this V is non terminals union the terminal symbols. So, this is what we introduce. So, formally a structured grammar structured or unrestricted grammar when we call it a simply grammar grammar is a quadruple this is a quadruple as earlier n sigma p s where n finite set because they are all as earlier finite set called non terminal symbols and sigma is a finite set this is called terminal symbols and s is the start symbol s is a non terminal the start symbol. Now this p the production rules it is a finite subset of V star and V star that means at least one non terminal has to be there on the left side cross V star where V as given here. So, this is how formally we give it as a quadruple n sigma p s like in case of context free grammars or regular grammars we give the same notation, but here the production rules it is a finite subset of V star n V star that means left hand side of each production rule should have at least one non terminal symbol on the right hand side you will have a mixture of terminals and non terminals. So, that is how formally an unrestricted grammar can be defined now let me look at an example. I will not consider those examples which we have already established some regular grammars or context free grammars because you can quickly see as a remark that every regular grammar is you know a context free grammar and every context free grammar is a structured grammar because left side you are allowed to use a mixture of terminals and non terminals with at least one non terminal. If you fix only one non terminal on the left hand side it is just boiling down to a context free grammar therefore, I am not going to give those examples which you have already established some context free grammars. So, let us look at the example because we have this particular example that we have observed that this language say x in a b c star such that number of a c n x is same as number of b c n x is same as number of c c n x of course, just I put a restriction that at least is a non empty strings. So, we have observed that this is not context free language now can we have a grammar for this because we have a more relaxed and you know you have already constructed a Turing machine also for this. So, we can obviously as I had mentioned that these grammars are I am going to introduce here they are equivalent to equivalent computational capacity with Turing machines. So, we will naturally expect a grammar for this. So, what kind of what kind of thing here context free grammar it is not possible. So, the left side mixture of terminals and non terminals sort of thing is required here. So, at or more than one non terminal symbol is required here. So, let us look at a grammar for this you can quickly ascertain and understand that you have to generate a b c is equal number. So, first what I will do I will take the production rule say capital A capital B capital C. So, a b c when I will generate and maybe I will put s s recursively the number of a b c is whatever you want you generate and then. So, for example, by using these two rules you can quickly understand that for example, if you want 2 s 2 bs 2 c's then you use the production rule s s and 2 s you have generated and s goes to a b c if you use 2 times then you can get this for corresponding to each capital letter. Of course, I will give the respective small letter say a goes to a b goes to little b and that c goes to little c for example, I give it like this. Now, it is not that a b c's will be in the same order because it is it can be mixed for example, all a's come together or may be some b's and a's are mixed but c's may come together. So, whatever is the possibility only restriction I have is number of a's and number of b's and number of c's should be same. So, what I will do I will allow this non terminal symbols a b c's they can commute each other say for example, a b can be b a whenever you have a b if you want b a you can make if you have b a similarly, I will have a flexibility of making a b. So, this a can commute with b similarly, a can commute with c say a c can be c a c a can be a c similarly, b c can commute with c that is b can commute with c that is b c can be c b or c b can be b c. Suppose, if I give all these rules you can quickly understand that the logic the way that we have defined you can understand that you know first what are the number of a's or number of b's number of c's there should be equal. So, you wanted to have in a particular string that many times you apply as recursively and get that n number and once you have that required number of capital a's capital b's capital c's which are equal always and then whatever the particular type of string you want what are the permutation that you want you permute this a a's b's c's capital a's capital b's capital c's and then you terminate with the terminal strings and you can quickly generate whatever the string that you want in this language. Let me give an example for example, if you want a b a b c c you can you can see that two a's two b's two c's are here. So, the derivation as I had mentioned you may first use s s the production rule and this s you can put a b c and for this also you can put a b c and now do not terminate first you arrange using the that permuting rules and bring the form whatever that you want for example, this a b can give this first a b there is no problem, but you want another a b here. So, this c we will take. So, c can commute with a as well as b. So, I will use that rule by commuting this I will get a c then I have b c and you can commute this c with b also. So, I will get a b a b c c now you can terminate this a little capital a can go to little a. So, that is the situation here and then this capital b. So, you finitely many times I simply write this a you can bring this b then a then b then little c then little c. So, you know how many steps are required I am putting a star here finitely many steps. So, you have a derivation like this. So, quickly we can ascertain that the strings in this language can be generated because as I had mentioned that at least one a or one b one c has to be there because number of a is equal to number of b is equal to number of c greater than equal to 1 one a one b one c has to be there, but whatever is the order. And the logic that I have defined you can recursively give this and you can permute to the positions whatever that you want a b c. So, these are the permuting rules and thus any string in this language you can observe that any string in this language can be generated. Of course, I have not defined formally the notion of this one step relation and the reflexive transitive closure of that. So, this can be you know as earlier in case of context programmers. So, I am using this for one step relation one step relation and it is a reflexive transitive closure is by star of this reflexive transitive closure of this one step relation. So, this one step relation again what is that given a string if you can apply rule once and to get another string say from alpha to beta if you can get in by applying one production rule once then we use this symbol between the strings as earlier. So, that is what using these two we have defined we have shown that S derives this particular string a b a b c c. So, as earlier for a grammar g language generated by g is set of all x in sigma star such that S derives x infinitely many steps where S is a start symbol of the grammar. So, all these definitions this one step relation definition are reflexive transitive closure of that and the language generated by grammar as earlier. So, we are not going into details of this, but we will just see like what are the languages that you can generate using structured grammars or unrestricted grammars this kind of grammars. So, if you recall let me look at this example this is set of all x I can simply write like this is a power n b power n c power n such that n greater than equal to 1 for example. Once again we have observed that this particular language is not context free we have used pumping lemma for context free languages and we have realized that this language cannot be generated by a context free grammar this is not a context free language. Now, again the question is can we have a structured grammar for this. So, for this particular language we have defined we have designed the Turing machine also you have you have that. Now, one wants that we do not have that flexibility we have certain restrictions may be let me define like this I want to generate because n greater than equal to 1 some a b c has to be generated and then say let me give recursion and S t say t may be like this. Here the idea is as follows this t counts the how many this commutes with this t commutes with this little c and whenever you have this b t c we will make this t essentially generates the respective number of b c's say b b c c. So, if I give an example then you will realize that it generates a power n b power n c power n you can see that if you want just a b c to be generated it is not a big deal you just get in one step using the first rule there is no problem because S goes to a b c is a rule. If you want so this can be generated if you want a square b square c square say 2 s 2 b's 2 c's in that order if you want you see I use this rule a s t and then this s with this rule a b c we terminate this t is there. So, t takes care of you know generating the respective number of b's and c's as for that we have used. So, this t can commute with c and comes inside. So, what I get like this a a b t c now b t c can give this another power because each t will generate a pair of b c's. So, a a b b c c so this is what the string that we wanted in this language. So, this production rules that the way that I have defined look at that because this s can produce as many s as you want and a t is the check corresponding to each s you are having a t. So, this t will generate the respective number of b's and c's in the appropriate position. So, for that purpose this t has to be you know moved in between that b's and c's because if t is not moved then what will happen this b's and t's when you are generating you know you require to generate them in this particular pattern after b's then c's should come and after once you have c then there should not be any b. So, that is the reason we have to allow this rule that t commutes with little c and you will be able to generate then the respective in the respective pattern. So, just for the sake of you know familiarity just if you want a typical a power n b power n c power n then what you have to do is you use this rule for n number of times to generate a power n then what will happen here s t s t when I am using. So, here every time I get a power n s then this t power n that is what we get now you see. So, n minus 1 times we use and then this you terminate with a b c a power n minus 1 a b c t n that is how we have to do. So, what do you have this is this is a power n b c t now you bring t inside 1 t. So, a power n b t c t power n minus 1 this is how you have then this you can generate now 2 b s say b b c c then t power n minus 1 and so on you keep bringing this t is inside to generate the respective number. Now, you have 2 b s here a b c t power n minus 1 sorry. So, this will be n minus 2. So, 2 b s and 2 c are already there the respective number of t's you bring inside and after finitely many steps you get a power n b power n c power n. So, this is a typical derivation in this particular grammar. Now, what I have observed you take any string which is of the form a power n b power n c power n because anyway a 2 b 2 c 2 I have already observed assume n greater than n greater than 2 in which case you just use this kind of rules a s t for n minus 1 times. So, that you get a power n minus 1 s t power n minus 1 after getting this a power n minus 1 you have then s you will terminate with a b c then you have a n a s then you have 1 b c here and n minus 1 t's you have. So, those n minus 1 t's you bring inside to produce the respective number of b c's again side by side. So, that means this t has to commute with the c's whatever that is that so far you have generated then t will come between b's and c's there you terminate that t by generating one more a pair that b c. So, that is how we will generate a n b n c n. So, by this what do we understand this language a power n b power n c power n such that n greater than equal to 1 is a subset of the language generated by g. Now, we have to look for the converse that means that means whatever that is generated by this grammar this the string is of the form a power n b power n c power n for which we have to look at the characteristic properties of each rule. Here I have two non-terminal symbols s and t unless I use this rule a b c the s cannot be avoided that is what is the property. So, if you start with the start symbol s unless I use the rule a s goes to a b c we will always have the non-terminal symbol s you know because there are only possibility that I can use a s t. So, I will be producing this many number of t's. Now, to avoid this t that means to terminate this capital t I have to use this production rule I can use this production rule if I have this t in between b and c. So, I have to use this commuting rule if I have produced certain b certain c's and so on. So, you use there are only very few rules 1, 2, 3, 4 rules only. So, observe that applicability of the 4 rules and then you argue that this the language generated by the grammar is a subset of this set a power n b power n c power n such that n greater than equal to 1. Thus we conclude that this language generated by this particular grammar is this language we have this equality. So, this is one phase of grammars, but as I had mentioned that these are having the power of Turing machines Turing machines are used as a language generators or as a computable computing devices because we have talked about Turing computable functions between you know strings a Turing computable function is the one to compute that particular function you should require a Turing machine. Now, an equivalent or a parallel mechanism or parallel concept of computability in case of grammars that we will introduce. So, that is let me give you this formally the definition as in case of Turing machines let sigma 1 and sigma 2 be to alphabet a function a function a f from sigma 1 star to sigma 2 star is said to be grammatically computable. Earlier we have talked about Turing computability now we are calling a call grammatically computable if there is a grammar say n sigma T s where the sigma 1 sigma 2 are subsets of the sigma and there are strings let me call say u v u dash v dash in v star we call them as n markers we call them as n markers such that such that for x in sigma 1 star y in sigma 2 star if y is image of x under f if and only if u x v from u x v infinitely many steps in g you should be able to get u dash y v dash look at the similarity of the Turing computability with this grammatically computable function. Now, just recall a function is said to be Turing computable if there is a Turing machine such that if y is image of x under f then by giving x as input in the initial state you should be able to get y as output and conversely and conversely I mean this if and only if that means, by giving x as input whenever you are getting y as output in a Turing machine what is the condition that y has to be image under f of x. So, the similar the same thing here in place of the Turing machine we are talking about through a grammar, but here there is nothing like you know giving input and output therefore, we are talking with respect to certain n markers and if you want to say a particular function is grammatically computable with respect to a particular grammar further particular grammar you have to first declare these are the n markers. So, these are the starting n markers in this particular context we are choosing u v and the ending n markers we are choosing u dash v dash it is similar to you know initializing a Turing machine and you know you are stopping a Turing machine halting a Turing machine by giving the output in a similar fashion here we had to introduce the n markers because otherwise in case of grammars we are generating grammar through start symbol here start symbol will not play any rule, but anyway the grammar that start symbol is a component. So, we are anyway considering that fourth component as well in the grammar, but here the n markers are important when you want to say a particular function is grammatically computable we have to fix the n markers for that particular grammar for to compute that particular function. Now, look at this definition take two alphabets a sigma 1 and sigma 2 a function from sigma 1 star to sigma 2 star is said to be grammatically computable if there is a grammar n sigma p s where sigma 1 sigma 2 subsets of sigma and there are strings these are the n markers u v u dash v dash for the purpose of you know the starting and ending we are using. So, u v u dash v dash is elements of v star such that whenever y is image of x under f then you should be able to have this kind of derivation and between this n markers whenever you have this terminal strings x and y with the property that x is in sigma 1 star and y is in sigma 2 star then y has to be image of x under f. So, this condition is very strict this is if and only if condition. So, using this condition will be establishing that the Turing computable functions are also grammatically computable and vice versa, but let me demonstrate first how to construct such a grammar through certain examples then we will see accordingly. So, let me consider a simple example is a very easy example to understand this because grammar generating languages you know very well, but this is little bit different. So, let me first consider say sigma 2 b is a a b. So, a b star into a b star a simple function this f 1 I am defining if you take any x I simply concatenate a to x. So, you can clearly see this is a function it is grammatically computable what is the grammar I consider. So, let me consider the grammar g 2 b say anyway start symbol since you require let me take this that itself as a start symbol and special symbol some dollar and some cent and some this own symbol let me use and the terminals a b the production rules I give you and yes is that. And the production rules what do I give I give as follows if I have a with cent I will simply give or I do not require anything because I have to produce a I will just give this as a production rule just only one production rule. So, what is the idea here I declare the n markers u to be this dollar and v to be this cent I give and u dash same dollar, but v dash I declare it as this bound symbol. So, the idea here while giving this particular production rule whatever that string x that I consider I consider with this n markers dollar and cent and after finitely many steps whatever that why I wanted to have that is the this n marker I am taking the same and, but this n marker with this bound I do not get this bound unless I apply this production rule I apply this production rule whenever I have this cent I simply concatenate a you can quickly see that using this rules any string that you consider a 1 a 2 a n this dollar and this cent you apply that production rule only once and then you can get the same a 1 a 2 a n you have whatever is that string then you concatenate a and terminate. So, only one step derivation that you have in this grammar because only one production rule wherever cent is there I will simply concatenate a and produce bound and since this is the n marker for right side and this is for the left side the same thing that we have considered. So, here within one step I get the image of x under this function f 1 and hence. So, everything that you can compute in one step only. So, you can quickly see that f 1 is grammatically computable function. So, this f 1 is grammatically computable let just let me extend this just conditionally because unconditionally we are putting there. So, if f 2 is f 2 is same a b star to a b star defined by f 2 of any x is equal to let me write y a if x is of the form say y b and it is y b if it is of the form y a epsilon else. So, look at the definition of the function if the string x is terminating with b if the ending symbol is b then I have to remove that b and I have to place by a and vice versa whenever I have a I have to place it by b and if it is empty string it is empty only. So, for a non empty strings at least a or b you should have. So, you can quickly tell me that what are the production rules that you require same earlier if you have a with scent I just give b with pound and b with scent if you have and say a with pound you give and this is important because dollar with scent that means if the input is empty string then you have you require this rule. So, these three rules let me consider now the respective grammar g you know what are the non terminal symbols etcetera. So, this is the p for this grammar now the idea here is with the u u dash I am taking the same dollar, but v to b scent and v dash is the pound that is what we are considering. So, if you take any string a 1 a 2 a n with the start symbols this dollar and scent and now what happens this a n based on this a n if a n is a then it is of the form y I require b. So, this a n scent that is a scent will become b. So, here are the possibilities this dollar is same a 1 a 2 a n minus 1 and that a n if a n is equal to a then a scent you can make it as b pound and if that a n is b this will become in one step a 1 a 2 a n minus 1 by applying this second rule you will have a pound and if n equal to 0 then you have this dollar and scent side by side and hence in one step you can produce this and thus with the n markers the beginning n markers u v and the ending n markers that means, by the time of terminating this derivation of course, here also every derivation is you know in one step that you are getting. Let me consider little better example of course, we have talked about the definition of grammatically computable functions from strings to strings as in case of Turing machines we can talk about this grammatically computable function or numbers also when I am talking about numbers as earlier we will talk with respect to unary representation. So, let me consider a simple function that is succcer function from i star in the unary representation the natural numbers are i star that means, essentially I am considering s from natural numbers to natural numbers defined by s of n is equal to n plus 1 the succcer function. So, here that s is taking i power n i power n plus 1 as we have constructed earlier you can see this is grammatically computable this particular example. Now, similarly if you want to talk about predecessor function from natural numbers to natural numbers defined by p of n is equal to n minus 1 if n greater than equal to 1 0 if n equal to 0. So, for that we have to be little bit careful that you know whatever the number of i's you are given if there is an i sent the way that you are defining i sent you can make it as say for example, so that 1 i is killed the last one. If there is no i then the scenario is that you have dollar and send side by side and hence. So, essentially you have to check the condition because earlier you can simply define that produce one more i at the end by changing the symbol you will get it. That means, let me give you because dollar and sense consistently if I am using I can give you the production rule like this whenever I have sent I will simply make i power that is all. So, what are the number of i's existing n number of i's one more i is appended and you declare that pound to be the v dash. But in this case in case of predecessor function you have to cross check that means as earlier if you have this i sent then you can make it pound. So, 1 i is killed and otherwise if there are no i's then that means this dollar and send will be side by side then you make this is dollar pound. So, you have you if you consider these two rules you can quickly see that predecessor function or natural numbers you know using your representation with number of i's we can see that it is they are grammatically computable. Let me consider another example which let me stick to a b for the time being say f from a b star to a b star defined by r of x is reversal of x you know reversal of x if whenever you are considering a 1 a 2 a n the string the image is a n a n minus 1 and so on a 1 the reversing reversing the string. So, this is little bit tricky we have to be careful with the n markers and how we have to pursue this job we have to look at. Now, let me fix may be n markers like this some bracket this dollar x this bracket this is with this pair n marker u and this is with v after finitely many steps I would like to produce this x power r this dollar this. So, here u to be this square bracket dollar and v to be the square bracket and u dash is the square bracket v dash to be this dollar and square bracket with this n markers I will pursue the job. So, here what I will do whenever I am considering this a 1 a 2 a n this dollar the idea is like this the square bracket the terminal symbol whenever it is touching this particular terminal symbol corresponding to that I will create one non terminal symbol some non terminal symbol and I will allow this non terminal symbol to commute with each of this terminal symbols here and pass through this dollar whenever it is passing through the dollar I will make that as a the respective terminal symbol. For example, if it is a I will make it as a capital A let me not use this because you may think this is the production rule. So, I will convert this as capital A and if it is small b I will convert this as capital B that is how I will choose. So, whenever this is touching this right side bracket the respective capital letters that I am considering these capital letters can commute with any of the small letters here. So, that it will go here and after crossing this dollar I will leave them back that means if the capital A is crossing this dollar I will make it as a small letter if the capital B is crossing this then I will make it as a small b. Thus you will quick you will understand that x power r can be generated through this mechanism let me give the rules. So, the idea is this if I have little a with this bracket the idea is to create the capital A in that place. Similarly, if you have little b touching to the right right side bracket I will give the rule that it will be made capital B. And this capital A and capital B should be able to go through this little a's and little b's. So, that means this little a capital A the capital A little a that means a can pass through this and similarly it can pass through b also. Now, same property with b's a capital B is this and if you have little b capital B then b b. Now, this capital A whenever it is touching dollar what do we do? We convert this back to its original form that is A dollar. Similarly, this dollar the capital B is touching this dollar once it pass to that place we will leave it back to little b dollar. Now, you look at through an example. So, these are the production rule I am considering these are how many these are 4 here the 4 here total 8 production rules. This is what is the production rule set you know the grammar here of course, for start symbol purpose you can take dollar as a start symbol does not matter. So, dollar I have used and this square brackets what else capital A and capital B these are the non-terminal symbols under consideration and terminal symbols little a little b only I have and p has given there and this s. So, this is the quadruple under consideration this grammar computes this function making a string reversal sorry making a string reversal how it pursues let us look at an example. Suppose, I am considering a b b what is the form that I am considering dollar this bracket and this bracket. Now, using that rule 2 little b with the bracket can be converted to capital B bracket. So, I have this a b this is capital B now this capital B can pass through this little a s and little b s. So, what will happen this dollar now you have 2 possibilities of applying production rule you can pass this b through a and make little b and systematically you can go for the second symbol or if you want to make this little b again capital B because this small b is touching the right side bracket. So, let me for fun consider this way look at these symbols cannot commute among themselves this capital letters b and b cannot commute themselves. So, the first symbol can commute with small letters only this a you cannot now convert unless you pass this symbols. So, let me pass now dollar this capital B a b. So, what I want to point out here whatever the order that the capital letters are generated in that order only they will pass through dollar the order cannot be changed because this capital letter can commute with only small letters and these capital letters will become small letters after passing through dollar. So, the order whatever the way that they are converted to capital letters will not be changed that is what one has to observe here now this capital B is touching this dollar. So, you just pass through that and now becoming the small letter this is how you are you have now this little a unless it becomes capital letter it cannot pass through dollar and so unless you get that particular position you are unable to do that. So, that order is taken care here now pass B through this little a. So, you have this and now this capital B passes through this become small letter this and a b b this dollar can become now capital letter. So, this is now B B a dollar and you see the end markers u dash v dash you have achieved this is u dash as declared u dash is left side bracket and v dash now is dollar with this bracket and for empty string you do not have to apply any rule quickly. You can see that if it is empty string the input is of this form here epsilon and with 0 number of steps here let me write star 0 number of steps in fact you can see that because these 2 strings are essentially same. Now, in a general case let us see what is happening in a general case if you consider a 1 a 2 a n if you consider a 1 a 2 a n this becomes capital A n a 1 this is capital A n it may be capital A or capital B I am writing A n corresponding to this this A n can commute and pass through this after finitely many steps this A n comes here becomes small A n dollar this A 1 A n minus 1. And similarly this A n dollar A 1 say capital A n minus 1 this may be capital A or capital B again this passes through all these letters finitely many steps and now pass through this dollar become A n minus 1 this dollar A 1 and so on A n minus 2. Now, you notice that A n has first cross dollar its position is maintained and A n minus 1 is a second symbol to pass through this dollar. So, A n A n minus 1 and so on. So, this symbol at the last A 1 will be pass through this dollar and will be at the end and dollar will be next to this. So, you will get after finitely many steps using this same process A n A n minus 1 and so on A 1 dollar by the time A 1 passes this dollar will be next to this. So, that you will get the final end markers this v dash and this is u dash and whatever is the string which is formed this way and if this dollar is going to next to this you can realize that this will be the reversal of the given string. So, that you can understand that the reversal can be a forming reversal is a grammatically computable function. So, all these things that we have done in case of a Turing machines because given x as input x power r how to create or you know given x maybe let me do that kind of thing if I give g from say a b star to a b star g of x is equal to x x power r. So, this kind of all such functions we have observed through Turing machines that we can create this kind of strings if x is there to create x power r next to that this kind of things are you know over numbers computing over numbers all those things that we have done to Turing machines the same thing whatever that you have done that computable whatever the computable function that you have observed through Turing machine you can observe through grammars also. Now, for the sake of the generalization because you have handled with two strings three strings as input and so on n number of strings as input only thing is here I have to have certain notation. The n markers say for example, u v that you are fixing if you want to give n number of strings as input you may separate with some special symbol like this as in case of Turing machine x 1 x 2 and so on x n we will separating through some special symbols and what are the output that you wanted after finitely many steps u dash v dash in between suppose if you want to generate m number of strings say y 1 say special symbol some blank symbol that I am using assume this is not the part of the input alphabet. If you can do this then we say some sigma 1 cross sigma 1 star cross sigma 2 and so on sigma n star 2 for example, sigma let me use some other sets a star a 1 star cross a 2 star and so on alphabet some alphabet a m star. So, this kind of strings the computable functions in a general case of this form can also be discussed for example, now you consider two numbers giving as input in general representation and then you know calculating some of those two numbers product of two numbers or division. So, whatever is the computable functions that we are handled through Turing functions the similar things that you can handle here and may be we will discuss some of the examples through grammatically computable function showing grammatically computable function is you know is much easier than creating a very cumbersome Turing machine. So, we will discuss few more examples and then see. So, meanwhile what whatever the simple Turing computable functions that we have discussed they are all can be taken as exercise to show them as grammatically computable function. That means, the respective grammars that you have to create and show that these are grammatically computable functions.