Visva-Bharati · Department of Mathematics
MMO-41
New Syllabus-P10/A12
M.Sc. Mathematics · Semester IV2019
- 1(a) Define a phrase-structure grammar $G$. Define $L(G)$, language generated by $G$. If $G=\langle\{S\},\{a,b\},\{S\to aS\,|\,bS\,|\,a\,|\,b\},S\rangle$, find $L(G)$. Construct a grammar $G$ generating language $L(G)=\{a^nb^nc^i\,|\,n\ge1,\ i\ge0\}$. [1+1+1+2]
- 1(b) Define type-1 and type-2 rules in connection with context sensitive language (CSL) and Context Free Language (CFL) respectively. Show that $L(CSL)\supsetneqq L(CFL)$. [1+1+3]
- 2(a) Define regular expression and valuation of regular expression. Show that every regular expression corresponds to a transition system. [1+1+2]
- 2(b) Construct a regular expression whose state diagram is given by \unreadable{figure: states $q_1$ (start, loop 0), $q_2$ (loop 1), $q_3$; edges $q_1\to q_2$ on 1, $q_2\to q_3$ on 0, $q_3\to q_1$ on 0, $q_3\to q_2$ on 1} [3]
- 2(b) Construct a deterministic finite automaton corresponding to the regular expression $(a^*\,|\,b^*)ab$. [3]
- 3(a) Define a Context-Free Grammar (CFG). Find an equivalent reduced grammar corresponding to $G=\langle\{S,A,B,C\},\{a,b\},P,S\rangle$ where $P=\{S\to AB\,|\,CA,\ B\to BC\,|\,AB,\ A\to a,\ C\to aB\,|\,b\}$. [1+3]
- 3(b) Define a push-down automaton. Construct a deterministic push-down automaton accepting the language generated by a CFG, $G=\langle\{S,A,B,C\},\{a,b,c\},P,S\rangle$ where $P=\{S\to AB,\ A\to Ca,\ B\to Ba\,|\,Cb\,|\,b,\ C\to cb\,|\,b\}$. [1+5]
- 4 What is parsing? Construct a top-down parser for the grammar of arithmetic expressions involving $+$ and $*$ generated by the production rules\par $E\to E+T\,|\,T$,\quad $T\to T*F\,|\,F$,\quad $F\to(E)\,|\,id$.\par Find a left-most derivation of $(id+id)*id$. \par\textbf{P.T.O.} [1+8+1]
- 5(a) Define a Turing machine. A Turing machine is described by the transition table \begin{center}\begin{tabular}{c|ccc}&\blank&0&1\\\hline$q_1$&$1Lq_2$&$0Rq_1$&---\\$q_2$&$\blank Rq_3$&$0Lq_2$&$1Lq_2$\\$q_3$&---&$\blank Rq_4$&$\blank Rq_5$\\$q_4$&$0Rq_5$&$0Rq_4$&$1Rq_4$\\$q_5$&$0Lq_2$&---&---\end{tabular}\end{center} write down the computation sequence of the input string $00\blank$. [2+3]
- 5(b) Design a Turing machine to recognize the language $\{1^n2^n3^n\,|\,n\ge1\}$. [5]
- 6 Define primitive and partial recursive functions over $\mathbb N$. Show that $f(x,y)=x^y$ is primitive recursive. Construct a Turing machine to compute the projection function $U_i^m$. Hence compute $U_2^3(1,2,1)$. [1+1+2+5+1]