5.Differentiate between terminal and non-terminal symbols
6. What do you understand by unrestricted grammar?
Answers
Answer:
Terminal symbols are the elementary symbols of the language defined by a formal grammar. Nonterminal symbols (or syntactic variables) are replaced by groups of terminal symbols according to the production rules. The terminals and nonterminals of a particular grammar are two disjoint sets.
An unrestricted grammar is a formal grammar , where is a finite set of nonterminal symbols, is a finite set of terminal symbols, and are disjoint, is a finite set of production rules of the form where and are strings of symbols in and is not the empty string, and. is a specially designated start symbol.
Answer:
5. Terminal symbols represent context that appear in the strings generated by the grammar. Non - terminal symbols are placeholders for patterns of terminal symbols that can be generated by non - terminals. A start symbol must be used as a special non - terminal to appear during the initial string generation...
6. In automata theory, the class of unrestricted grammars (also called semi-Thue, type-0 or phrase structure grammars) is the most general class of grammars in the Chomsky hierarchy. No restrictions are made on the productions of an unrestricted grammar, other than each of their left-hand sides being non-empty.[1]:220 This grammar class can generate arbitrary recursively enumerable languages.