Instructions:
- The marks are indicated in the right-hand margin.
- There are NINE questions in this paper.
- Attempt FIVE questions in all.
- Question No. 1 is compulsory.
Q.1 Choose the correct answer of the following (any seven):
Which of the following statements is/are False?
Enumerator is a Turing machine with
The language $ \{a^m b^n c^{m+n} \mid m, n \ge 1\} $ is
The maximum number of states of a DFA converted from an NFA with $ n $ states is
If $ L_1 $ and $ L_2 $ are context-free languages, $ L_1 - L_2 $ is
Which of the following does not have left recursions?
Let N be an NFA with $ n $ states and let M be the minimized DFA with $ m $ states recognizing the same language. Which of the following is necessarily true?
_____ is the acyclic graphical representation of a grammar.
A minimum state deterministic FA accepting the language $ L = \{w \mid w \in \{0, 1\}^*\} $ where number of 0's and 1's in w are divisible by 3 and 5 respectively, has
The construction time for DFA from an equivalent NFA ($ m $ number of node) is
Q.2 Solve both questions :
Tabulate Chomsky hierarchy of grammar with an example for each.
Design a finite state machine abstract model for Parity checker.
Q.3 Solve both questions :
Construct an NFA that will accept string of 0's, 1's and 2's beginning with a 0's followed by odd number of 1's and ending with any number of 2's.
Construct a push-down automata that accepts the following language: $ L = \{uawb : u \text{ and } w \in (a,b)^* \text{ and } |u| = |w|\} $
Q.4 Solve both questions :
Design a Turing machine (TM) to compute $ n \mod 2 $.
Design a DFA corresponding to regular expression $ 1^*(10)^* $
Q.5 Solve both questions :
Consider the grammar: $ S \rightarrow AB \mid BC $, $ A \rightarrow BA \mid a $, $ B \rightarrow CC \mid b $, $ C \rightarrow AB \mid a $. Use the CYK algorithm to determine whether the given string "baaba" is in $ L(G) $ or not.
Suppose L is context free and R is regular, justify your answer with the help of example:
(i) Is $ L - R $ necessarily context free?
(ii) Is $ R - L $ necessarily context free?
Q.6 Solve both questions :
Show that the language $ L = \{a^{n!} : n \ge 0\} $ is not regular or not context-free language.
Let G be a context-free grammar in Chomsky normal form that contains $ b $ variable. Show that if G generates some string using a derivation with at least $ 2^b $ steps, then $ L(G) $ is infinite.
Q.7 Solve both questions :
State and prove pumping lemma for regular sets.
Show given grammar over alphabet {a, b}, verify whether it is ambiguous or unambiguous : $ S \rightarrow aSa \mid bSb \mid a \mid b \mid \epsilon $
Q.8 Solve both questions :
Show that the sum function $ f(x, y) = x + y $ is primitive recursive.
Construct a PDA that accepts the language $ L = \{a^{2n}bc \mid n \ge 0\} $ by final state and empty stack.
Q.9 Write short notes on the following:
Instructions:
- The marks are indicated in the right-hand margin.
- There are NINE questions in this paper.
- Attempt FIVE questions in all.
- Question No. 1 is compulsory.
Q.1 Choose the correct answer of the following (any seven):
Which of the following statements is/are False?
Enumerator is a Turing machine with
The language is
The maximum number of states of a DFA converted from an NFA with states is
If and are context-free languages, is
Which of the following does not have left recursions?
Let N be an NFA with states and let M be the minimized DFA with states recognizing the same language. Which of the following is necessarily true?
_____ is the acyclic graphical representation of a grammar.
A minimum state deterministic FA accepting the language $ L = {w \mid w \in {0, 1}^*} $ where number of 0's and 1's in w are divisible by 3 and 5 respectively, has
The construction time for DFA from an equivalent NFA ($ m $ number of node) is
Q.2 Solve both questions :
Tabulate Chomsky hierarchy of grammar with an example for each.
Design a finite state machine abstract model for Parity checker.
Q.3 Solve both questions :
Construct an NFA that will accept string of 0's, 1's and 2's beginning with a 0's followed by odd number of 1's and ending with any number of 2's.
Construct a push-down automata that accepts the following language: $ L = {uawb : u \text{ and } w \in (a,b)^* \text{ and } |u| = |w|} $
Q.4 Solve both questions :
Design a Turing machine (TM) to compute .
Design a DFA corresponding to regular expression
Q.5 Solve both questions :
Consider the grammar: , , $ B \rightarrow CC \mid b C \rightarrow AB \mid a $. Use the CYK algorithm to determine whether the given string "baaba" is in or not.
Suppose L is context free and R is regular, justify your answer with the help of example:
(i) Is necessarily context free?
(ii) Is necessarily context free?
Q.6 Solve both questions :
Show that the language is not regular or not context-free language.
Let G be a context-free grammar in Chomsky normal form that contains variable. Show that if G generates some string using a derivation with at least steps, then is infinite.
Q.7 Solve both questions :
State and prove pumping lemma for regular sets.
Show given grammar over alphabet {a, b}, verify whether it is ambiguous or unambiguous : $ S \rightarrow aSa \mid bSb \mid a \mid b \mid \epsilon $
Q.8 Solve both questions :
Show that the sum function is primitive recursive.
Construct a PDA that accepts the language by final state and empty stack.
Q.9 Write short notes on the following:
Instructions:
- The marks are indicated in the right-hand margin.
- There are NINE questions in this paper.
- Attempt FIVE questions in all.
- Question No. 1 is compulsory.
Q.1 Choose the correct answer of the following (any seven):
Definition of a language L with alphabet {a} is given as $ L = \{a^{nk} \mid k > 0 \}, $ and n is a positive integer constant. What is the minimum number of states needed in a DFA to recognize L?
Which of the following versions of Unix came up with YACC first?
A pushdown automata can be represented as $ PDA = \epsilon \text{-} NFA + [\text{stack}] $.
A language accepted by deterministic pushdown automata is closed under which of the following?
A _____ is context free grammar with atmost one non-terminal in the right handside of the production.
The lexical analysis for a modern language such as Java needs the power of which one of the following machine models in a necessary and sufficient sense?
Let $ L = \{w \in (0+1)^* \mid w \text{ has even number of 1s}\} $, i.e., L is the set of all bit strings with even number of 1s. Which one of the regular expression below represents L?
What is the minimum number of states in deterministic finite automata (DFA) for string starting with $ ba^2 $ and ending with a over alphabet {a, b}?
The decision problem is the function from string to
A language L may not be accepted by a turing machine if
Q.2 Solve both questions :
Write the context-free grammar to create palindrome over {a, b}.
Construct a DFA which accepts the set of all binary strings that interpreted as binary representation of an unsigned decimal integer, is divisible by 5.
Q.3 Solve both questions :
Design a turing machine to compute the sum of two positive integers m and n.
Design a NPDA for accepting the string $ L = $ set of all palindrome over {a, b} by the empty stack and by final state.
Q.4 Solve both questions :
Construct finite automaton corresponding to the regular expression: $ (a+b)^*c d^*e $
Explain the multi-tape version of turing machine and its significance.
Q.5 Solve both questions :
Show given grammar over alphabet {a, b} verify whether it is ambiguous or unambiguous : $ S \rightarrow a / abSb / aAb $, $ A \rightarrow bS / aAAb $
Show that $ L = $ palindrome over {a, b} is not regular.
Q.6 Solve both questions :
Prove that if L is generated by a CFG, then L is accepted by a non-deterministic PDA by empty stack.
Design a pushdown automaton for the following context-free grammar: $ S \rightarrow aB \mid bA $, $ A \rightarrow aS \mid bAA \mid a $, $ B \rightarrow bS \mid aBB \mid b $
Q.7 Solve both questions :
Design a turing machine that accepts all palindromes over $ \Sigma = \{a, b\} $.
Explain Myhill-Nerode theorem for minimization of automata with suitable example.
Q.8 Solve both questions :
Prove that if L is the language generated by an unrestricted grammar $ G=(N,T,P,S) $, then L is recognized by a turing machine.
Design a pushdown automata for accepting the string for the language $ L = \{WW^R \mid W \in (a,b)^*\} $ by the empty stack as well as final state.
Q.9 Write short notes on the following:
Instructions:
- The marks are indicated in the right-hand margin.
- There are NINE questions in this paper.
- Attempt FIVE questions in all.
- Question No. 1 is compulsory.
Q.1 Choose the correct answer of the following (any seven):
Definition of a language L with alphabet {a} is given as L = \{a^{nk} \mid k > 0 \}, and n is a positive integer constant. What is the minimum number of states needed in a DFA to recognize L?
Which of the following versions of Unix came up with YACC first?
A pushdown automata can be represented as $ PDA = \epsilon \text{-} NFA + [\text{stack}] $.
A language accepted by deterministic pushdown automata is closed under which of the following?
A _____ is context free grammar with atmost one non-terminal in the right handside of the production.
The lexical analysis for a modern language such as Java needs the power of which one of the following machine models in a necessary and sufficient sense?
Let , i.e., L is the set of all bit strings with even number of 1s. Which one of the regular expression below represents L?
What is the minimum number of states in deterministic finite automata (DFA) for string starting with and ending with a over alphabet {a, b}?
The decision problem is the function from string to
A language L may not be accepted by a turing machine if
Q.2 Solve both questions :
Write the context-free grammar to create palindrome over {a, b}.
Construct a DFA which accepts the set of all binary strings that interpreted as binary representation of an unsigned decimal integer, is divisible by 5.
Q.3 Solve both questions :
Design a turing machine to compute the sum of two positive integers m and n.
Design a NPDA for accepting the string set of all palindrome over {a, b} by the empty stack and by final state.
Q.4 Solve both questions :
Construct finite automaton corresponding to the regular expression:
Explain the multi-tape version of turing machine and its significance.
Q.5 Solve both questions :
Show given grammar over alphabet {a, b} verify whether it is ambiguous or unambiguous : $ S \rightarrow a / abSb / aAb A \rightarrow bS / aAAb $
Show that palindrome over {a, b} is not regular.
Q.6 Solve both questions :
Prove that if L is generated by a CFG, then L is accepted by a non-deterministic PDA by empty stack.
Design a pushdown automaton for the following context-free grammar: $ S \rightarrow aB \mid bA $, ,
Q.7 Solve both questions :
Design a turing machine that accepts all palindromes over .
Explain Myhill-Nerode theorem for minimization of automata with suitable example.
Q.8 Solve both questions :
Prove that if L is the language generated by an unrestricted grammar , then L is recognized by a turing machine.
Design a pushdown automata for accepting the string for the language $ L = {WW^R \mid W \in (a,b)^*} $ by the empty stack as well as final state.
Q.9 Write short notes on the following:
Instructions:
- The marks are indicated in the right-hand margin.
- There are NINE questions in this paper.
- Attempt FIVE questions in all.
- Question No. 1 is compulsory.
Q.1 Choose the correct answer/Fill in the blank of any seven of the
following:
The word 'formal' in formal languages means
Which of the following statements is true?
Which of the following pairs of regular expressions are equivalent?
Which of the following pairs have DIFFERENT expressive powers?
Definition of a language L with alphabet {a} is given as $ L = \{a^{nk} \mid k > 0 \text{ and n is a positive integer constant}\} $. What is the minimum number of states needed in a DFA to recognize L?
Suppose a polynomial time algorithm is discovered that correctly computes the largest clique in a given graph. In this scenario, which one of the following represents the correct Venn diagram of the complexity classes P, NP and NP complete (NPC)?

Let L1 be a recursive language. Let L2 and L3 be languages that are not recursively enumerable but recursive. Which of the following statements is not necessarily true?
A PDM behaves like an FSM when the number of auxiliary memory it has, is
Define Turing machine in brief.
A finite automaton with _____ is equivalent to push-down automata.
Q.2 Solve this question :
Consider the set of strings on {0, 1} defined by the requirements below. For each, construct an
accepting dfa:
(i) Every 00 is followed immediately by a 1. For example, the strings 101, 0010, 001001 are in
the
language, but 0001 and 00100 are not.
(ii) All strings containing 00 but not 000.
(iii) The leftmost symbol differs from the rightmost one.
(iv) Every substring of four symbols has at most two 0's. For example, 001110 and 011001 are in
the
language, but 10010 is not since one of its substrings, 0010, contains three zeros.
Q.3 Solve both questions :
Construct the regular grammar accepting the following language: $ L = w \in \{a, b\}^* \mid w \text{ is a string over } \{a, b\} $ $ \text{ such that the number of b's is } 3 \mod 4 $
Let $ G = (V, T, S, P) $ be a right-linear grammar. Prove that the language generated using the grammar G is a regular.
Q.4 Solve both questions :
Construct a Moore machine equivalent to the Mealy machine M defined by the following Table 1 state transitions:
| Present State | a = 0 | a = 1 | ||
|---|---|---|---|---|
| Next State | Output | Next State | Output | |
| $ q_1 $ | $ q_1 $ | 1 | $ q_2 $ | 0 |
| $ q_2 $ | $ q_4 $ | 1 | $ q_4 $ | 1 |
| $ q_3 $ | $ q_2 $ | 1 | $ q_3 $ | 1 |
| $ q_4 $ | $ q_3 $ | 0 | $ q_1 $ | 1 |
Prove the following equation : $ (1+00^*1) + (1+00^*1)(0+10^*1)^*(0+10^*1) $ = $ 0^*1(0+10^*1)^* $
Q.5 Solve this question :
Using the pumping lemma theorem, show that the following sets are not regular:
$ L = \{a^n b^l a^k : k \ge n+l\} $
$ L = \{w : n_a(w) = n_b(w)\} $
$ L = \{ww w^R : w \in \{a,b\}^*\} $
Q.6 Solve both questions :
Convert the grammar into Chomsky normal form: $ S \rightarrow aB \mid AB $, $ A \rightarrow aab \mid \lambda $, $ B \rightarrow bbA $
Show that the family of unambiguous context-free languages is not closed under union.
Q.7 Solve this question :
Construct an npda corresponding to the grammar: $ S \rightarrow aABB \mid aAA $, $ A \rightarrow aBB \mid a $, $ B \rightarrow bBB \mid A $
Q.8 Solve this question :
Construct Turing machines that will accept the following languages on {a, b}:
$ L = \{w : n_a(w) = n_b(w)\} $
$ L = \{wcw : w \in \{a,b\}^*\} $
Q.9 Solve both questions :
Design a Turing machine with no more than three states that accepts the language $ L(a(a+b)^*) $. Assume that $ \Sigma = \{a, b\} $. Is it possible to do this with a two-state machine?
Let G be an undirected graph. An Euler circuit of the graph is a simple cycle that includes all edges. The Euler Circuit Problem (EULER) is to decide if G has an Euler circuit. Show that EULER is not NP-complete.
Instructions:
- The marks are indicated in the right-hand margin.
- There are NINE questions in this paper.
- Attempt FIVE questions in all.
- Question No. 1 is compulsory.
Q.1 Choose the correct answer/Fill in the blank of any seven of the
following:
The word 'formal' in formal languages means
Which of the following statements is true?
Which of the following pairs of regular expressions are equivalent?
Which of the following pairs have DIFFERENT expressive powers?
Definition of a language L with alphabet {a} is given as $ L = \{a^{nk} \mid k > 0 \text{ and n is a positive integer constant}\} $. What is the minimum number of states needed in a DFA to recognize L?
Suppose a polynomial time algorithm is discovered that correctly computes the largest clique in a given graph. In this scenario, which one of the following represents the correct Venn diagram of the complexity classes P, NP and NP complete (NPC)?

Let L1 be a recursive language. Let L2 and L3 be languages that are not recursively enumerable but recursive. Which of the following statements is not necessarily true?
A PDM behaves like an FSM when the number of auxiliary memory it has, is
Define Turing machine in brief.
A finite automaton with _____ is equivalent to push-down automata.
Q.2 Solve this question :
Consider the set of strings on {0, 1} defined by the requirements below. For each, construct an
accepting dfa:
(i) Every 00 is followed immediately by a 1. For example, the strings 101, 0010, 001001 are in
the
language, but 0001 and 00100 are not.
(ii) All strings containing 00 but not 000.
(iii) The leftmost symbol differs from the rightmost one.
(iv) Every substring of four symbols has at most two 0's. For example, 001110 and 011001 are in
the
language, but 10010 is not since one of its substrings, 0010, contains three zeros.
Q.3 Solve both questions :
Construct the regular grammar accepting the following language: $ L = w \in \{a, b\}^* \mid w \text{ is a string over } \{a, b\} $ $ \text{ such that the number of b's is } 3 \mod 4 $
Let $ G = (V, T, S, P) $ be a right-linear grammar. Prove that the language generated using the grammar G is a regular.
Q.4 Solve both questions :
Construct a Moore machine equivalent to the Mealy machine M defined by the following Table 1 state transitions:
| Present State | a = 0 | a = 1 | ||
|---|---|---|---|---|
| Next State | Output | Next State | Output | |
| $ q_1 $ | $ q_1 $ | 1 | $ q_2 $ | 0 |
| $ q_2 $ | $ q_4 $ | 1 | $ q_4 $ | 1 |
| $ q_3 $ | $ q_2 $ | 1 | $ q_3 $ | 1 |
| $ q_4 $ | $ q_3 $ | 0 | $ q_1 $ | 1 |
Prove the following equation : $ (1+00^*1) + (1+00^*1)(0+10^*1)^*(0+10^*1) $ = $ 0^*1(0+10^*1)^* $
Q.5 Solve this question :
Using the pumping lemma theorem, show that the following sets are not regular:
$ L = \{a^n b^l a^k : k \ge n+l\} $
$ L = \{w : n_a(w) = n_b(w)\} $
$ L = \{ww w^R : w \in \{a,b\}^*\} $
Q.6 Solve both questions :
Convert the grammar into Chomsky normal form: $ S \rightarrow aB \mid AB $, $ A \rightarrow aab \mid \lambda $, $ B \rightarrow bbA $
Show that the family of unambiguous context-free languages is not closed under union.
Q.7 Solve this question :
Construct an npda corresponding to the grammar: $ S \rightarrow aABB \mid aAA $, $ A \rightarrow aBB \mid a $, $ B \rightarrow bBB \mid A $
Q.8 Solve this question :
Construct Turing machines that will accept the following languages on {a, b}:
$ L = \{w : n_a(w) = n_b(w)\} $
$ L = \{wcw : w \in \{a,b\}^*\} $
Q.9 Solve both questions :
Design a Turing machine with no more than three states that accepts the language $ L(a(a+b)^*) $. Assume that $ \Sigma = \{a, b\} $. Is it possible to do this with a two-state machine?
Let G be an undirected graph. An Euler circuit of the graph is a simple cycle that includes all edges. The Euler Circuit Problem (EULER) is to decide if G has an Euler circuit. Show that EULER is not NP-complete.
Instructions:
- The marks are indicated in the right-hand margin.
- There are NINE questions in this paper.
- Attempt FIVE questions in all.
- Question No. 1 is compulsory.
Q.1 Choose the correct answer for any seven of the following:
Regular expressions are closed under
Extended transition function is
From the options given below, the pair having different expressive powers is
For the language $ \{a^p \mid p \text{ is a prime}\} $, the statement which holds true is
Which one of the following statements is true?
A class of language that is closed under
CFG can be recognized by
A given grammar is called ambiguous, if
The output of the Mealy machine depends
The logic of pumping lemma is a good example of
Q.2 Solve both questions :
For each of the following languages, construct a DFA that accepts the language. In all cases, the
alphabet is {0, 1}:
(i) {w : the length of w is divisible by three}
(ii) {w : 110 is not a substring of w}
(iii) {w : w contains at least five 1's}
(iv) {w : w contains the substring 1011}
(v) {w : w contains at least two 1's and at most two 0's}
State and proof pumping lemma for regular languages.
Q.3 Solve both questions :
Using pumping lemma, show that the language $ A = \{ww \mid w \in \{0, 1\}^*\} $ is not regular.
Let A be a non-empty regular language. Prove that there exists an NFA that accepts A and that has exactly one accept state.
Convert each of the following regular expressions to an NFA: (i) $ (0 \cup 1) 1^* 000 (0 \cup 1)^* $ (ii) $ (((10)^*(001) \cup 10))^* $ (iii) $ (baa + abb)^* $
Q.4 Solve this question :
(a) Prove the following two properties: (i) Regular sets are closed over the intersection
operation.
(ii) Regular sets are closed over the union operation.
(b) Represent the language that contains strings over $ \Sigma = \{0, 1\} $ and has even
number of
0's.
(c) Convert the following DFA to a regular expression:

Q.5 Solve this question :
(a) Construct context-free grammars that generate the following languages. In all cases $
\Sigma
=
\{a, b\} $: (i) $ a^*b $ (ii) $ (ab)^* $
(b) Construct a CFG for the set of non-negative odd integers.
Q.6 Solve both questions :
Let A and B be context-free languages over the same alphabet $ \Sigma $.
(i) Prove that the union $ A \cup B $ of A and B is also context-free.
(ii) Prove that the concatenation AB of A and B is also context-free.
(iii) Prove that the star $ A^* $ of A is also context-free.
Determine a CFG without unit production equivalent to the CFG given below: $ S \rightarrow a \mid Xb \mid aYa \mid b \mid aa $, $ X \rightarrow Y $, $ Y \rightarrow b \mid X $
Q.7 Solve this question :
(a) Find the CNF (Chomsky Normal Form) for the following CFG: $ S \rightarrow ABA $, $ A
\rightarrow aA \mid \epsilon $, $ B \rightarrow bB \mid \epsilon $
(b) Eliminate null productions from the following CFG: $ S \rightarrow Xa $, $ X
\rightarrow
aX
\mid bX \mid \epsilon $
(c) Convert the following grammar to GNF: $ A_1 \rightarrow A_2 A_3 $, $ A_2 \rightarrow
A_3
A_1
\mid b $, $ A_3 \rightarrow A_1 A_2 \mid a $
Q.8 Solve both questions :
Construct npda that accepts the following languages on $ \Sigma = \{a, b, c\} $:
(i) $ L = \{a^n b^{2n} : n \ge 0\} $
(ii) $ L = \{wcw^R : w \in \{a,b\}^*\} $
(iii) $ L = \{w : n_a(w) = 2n_b(w)\} $
Design a PDA that accepts the language $ L = \{a^n b^m a^n : m, n > 0\} $
Q.9 Solve this question :
(a) Design a Turing machine that recognizes strings containing equal number of 0's and 1's.
(b) Let $ L_1 $ be recursive and $ L_2 $ recursively enumerable. Show that $ L_2 - L_1
$
is
necessarily recursively enumerable.
(c) Define P, NP, NPH and NPC problems with example.
Instructions:
- The marks are indicated in the right-hand margin.
- There are NINE questions in this paper.
- Attempt FIVE questions in all.
- Question No. 1 is compulsory.
Q.1 Choose the correct answer for any seven of the following:
Regular expressions are closed under
Extended transition function is
From the options given below, the pair having different expressive powers is
For the language $ \{a^p \mid p \text{ is a prime}\} $, the statement which holds true is
Which one of the following statements is true?
A class of language that is closed under
CFG can be recognized by
A given grammar is called ambiguous, if
The output of the Mealy machine depends
The logic of pumping lemma is a good example of
Q.2 Solve both questions :
For each of the following languages, construct a DFA that accepts the language. In all cases, the
alphabet is {0, 1}:
(i) {w : the length of w is divisible by three}
(ii) {w : 110 is not a substring of w}
(iii) {w : w contains at least five 1's}
(iv) {w : w contains the substring 1011}
(v) {w : w contains at least two 1's and at most two 0's}
State and proof pumping lemma for regular languages.
Q.3 Solve both questions :
Using pumping lemma, show that the language $ A = \{ww \mid w \in \{0, 1\}^*\} $ is not regular.
Let A be a non-empty regular language. Prove that there exists an NFA that accepts A and that has exactly one accept state.
Convert each of the following regular expressions to an NFA: (i) $ (0 \cup 1) 1^* 000 (0 \cup 1)^* $ (ii) $ (((10)^*(001) \cup 10))^* $ (iii) $ (baa + abb)^* $
Q.4 Solve this question :
(a) Prove the following two properties: (i) Regular sets are closed over the intersection
operation.
(ii) Regular sets are closed over the union operation.
(b) Represent the language that contains strings over $ \Sigma = \{0, 1\} $ and has even
number of
0's.
(c) Convert the following DFA to a regular expression:

Q.5 Solve this question :
(a) Construct context-free grammars that generate the following languages. In all cases $
\Sigma
=
\{a, b\} $: (i) $ a^*b $ (ii) $ (ab)^* $
(b) Construct a CFG for the set of non-negative odd integers.
Q.6 Solve both questions :
Let A and B be context-free languages over the same alphabet $ \Sigma $.
(i) Prove that the union $ A \cup B $ of A and B is also context-free.
(ii) Prove that the concatenation AB of A and B is also context-free.
(iii) Prove that the star $ A^* $ of A is also context-free.
Determine a CFG without unit production equivalent to the CFG given below: $ S \rightarrow a \mid Xb \mid aYa \mid b \mid aa $, $ X \rightarrow Y $, $ Y \rightarrow b \mid X $
Q.7 Solve this question :
(a) Find the CNF (Chomsky Normal Form) for the following CFG: $ S \rightarrow ABA $, $ A
\rightarrow aA \mid \epsilon $, $ B \rightarrow bB \mid \epsilon $
(b) Eliminate null productions from the following CFG: $ S \rightarrow Xa $, $ X
\rightarrow
aX
\mid bX \mid \epsilon $
(c) Convert the following grammar to GNF: $ A_1 \rightarrow A_2 A_3 $, $ A_2 \rightarrow
A_3
A_1
\mid b $, $ A_3 \rightarrow A_1 A_2 \mid a $
Q.8 Solve both questions :
Construct npda that accepts the following languages on $ \Sigma = \{a, b, c\} $:
(i) $ L = \{a^n b^{2n} : n \ge 0\} $
(ii) $ L = \{wcw^R : w \in \{a,b\}^*\} $
(iii) $ L = \{w : n_a(w) = 2n_b(w)\} $
Design a PDA that accepts the language $ L = \{a^n b^m a^n : m, n > 0\} $
Q.9 Solve this question :
(a) Design a Turing machine that recognizes strings containing equal number of 0's and 1's.
(b) Let $ L_1 $ be recursive and $ L_2 $ recursively enumerable. Show that $ L_2 - L_1
$
is
necessarily recursively enumerable.
(c) Define P, NP, NPH and NPC problems with example.
Instructions:
- The marks are indicated in the right-hand margin.
- There are NINE questions in this paper.
- Attempt FIVE questions in all.
- Question No. 1 is compulsory.
Questions
Choose the correct alternatives for any seven of the following :
The output of the Moore Machine depends (a) only on present state (b) only on current input symbol (c) both on present state and current input symbol (d) none of the above
The logic of Pumping lemma is a good example of (a) the pigeon-hole principle (b) the divide and conquer technique (c) recursion (d) iteration
Recursively enumerable languages are not closed under (a) union (b) intersection (c) complementation (d) concatenation
The language is a (a) regular language (b) context-free language (c) non-context-free (d) none of the above
A language is denoted by a regular expression . Which of the following is not a legal string within ? (a) (b) (c) (d) none of the above
Context free languages are not closed under (a) union (b) intersection (c) concatenation
Recursive languages are (a) a proper superset of CFLs. (b) Always recognizable (c) Also called type 0 languages (d) Recognizable by Turing Machines
Choose the incorrect statements (a) Every subset of a countable set is countable (b) The class of DPDA is not countable (c) the class of TMs is countable (d) the class of LBA is countable
Which of the following statements is true? (a) The language is regular language (b) The union of 2 recursive languages is Recursive. (c) Recursive enumerable languages are closed under complementation. (d) Recursive languages are not closed under complementation
In case of TM, by reading input , TM (a) may go to halt-final state (b) may go to halt-non final state (c) may go to infinite loop (d) All of the above
Answer the following:
Obtain the regular expression for the following sets :
Describe in simple English the language represented by the regular expression .
Answer the following:
Construct NFA equivalent to the following Regular expression : .
Construct an NFA with moves for the regular expression .
Construct NFA for the Set of all strings over with alternate 0's and 1's.
Answer the following:
Construct a DFA for the regular expression .
Find out the regular expression for the following FA : [Table required]
Answer the following:
Prove the following two properties : (i) Regular sets are closed over the union operation (ii) Regular sets are closed over the intersection operation
Show with the help of pumping lemma that following languages are not regular :
Answer the following:
Give the CFG for each of the languages defined by the following regular expressions :
Construct a CFG for the following language set : .
Answer the following:
For the grammar , which is defined as $S \rightarrow aB \mid bA$ where is the starting symbol, show the leftmost derivation, rightmost derivation and parse tree for the string 'bbaaba'.
Determine a CFG without unit production equivalent to the CFG given below : $S \rightarrow Abb$ $A \rightarrow Bb$ $B \rightarrow Sa$
Answer the following:
Find the CNF (Chomsky Normal Form) for the following CFG : $S \rightarrow aSa \mid bSb \mid a \mid b \mid aa \mid bb$
Eliminate null productions from the following CFG : $A \rightarrow aBb \mid bBa$ $B \rightarrow abB \mid bB \mid \epsilon$
Convert the following grammar to GNF : $S \rightarrow ABA \mid AB \mid BA \mid AA \mid A \mid B$ $A \rightarrow aA \mid a$ $B \rightarrow bB \mid b$
Answer the following:
Design a PDA that accepts all palindrome strings over .
Design a PDA that accepts the language .
Show that is not a context-free language.
Instructions:
- The marks are indicated in the right-hand margin.
- There are NINE questions in this paper.
- Attempt FIVE questions in all.
- Question No. 1 is compulsory.
Questions
Choose the correct answer for any seven of the following :
The output of the Moore Machine depends (i) only on present state (ii) only on current input symbol (iii) both on present state and current input symbol (iv) None of the above
The logic of pumping lemma is a good example of (i) the pigeon-hole principle (ii) the divide-and-conquer technique (iii) recursion (iv) iteration
Regular languages are closed under (i) union (ii) intersection (iii) complementation (iv) All of the above
The language is a (i) regular language (ii) context-free language (iii) non context-free language (iv) None of the above
A language is denoted by a regular expression . Which of the following is not a legal string within ? (i) (ii) (iii) (iv) None of the above
Context-free languages are not closed under (i) union (ii) intersection (iii) concatenation
Context-free languages are (i) a proper superset of regular languages (ii) recognizable by PDA (iii) also called type 2 languages (iv) All of the above
Choose the incorrect statements : (i) Every subset of a countable set is countable (ii) The class of DPDA is not countable (iii) The class of TMs is countable (iv) The class of LBA is countable
Which of the following statements is true? (i) The language is regular language. (ii) The union of 2 recursive languages is recursive. (iii) Recursive enumerable languages are closed under complementation. (iv) Recursive languages are not closed under complementation.
In case of TM, in which of the following cases a string will be accepted? (i) Entire string has been consumed and TM halts in the final state (ii) Entire string has been consumed and TM halts is the non-final state (iii) Entire string has not been consumed and TM halts is in any state
Answer the following:
Obtain the regular expression for the following sets :
Show that .
Answer the following:
Construct NFA equivalent to the following regular expression : .
Construct an NFA with moves for the regular expression .
Construct an NFA for the set of all strings over with exactly two .
Answer the following:
Construct a DFA for the regular expression .
Find out the regular expression for the following transition diagram : [Diagram required]
Answer the following:
Prove the following two properties : (i) Regular sets are closed over the concatenation operation (ii) Regular sets are closed over the complement operation.
Show with the help of pumping lemma that following language is not regular : .
Represent the language that contains strings over and has even number of 0's.
Answer the following:
Give the CFG for each of the languages defined by the following regular expressions :
Construct a CFG for the set of non-negative odd integers.
Answer the following:
For the grammar , which is defined as $S \rightarrow aB \mid bA$ where is the starting symbol, show the leftmost derivation, rightmost derivation and parse tree for the string 'abbbaa'.
Determine a CFG without unit production equivalent to the CFG given below : $S \rightarrow a \mid Xb \mid aYa \mid b \mid aa$ $X \rightarrow Y$ $Y \rightarrow b \mid X$
Answer the following:
Find the CNF (Chomsky Normal Form) for the following CFG : $S \rightarrow ABA$ $A \rightarrow aaA \mid \epsilon$ $B \rightarrow bB \mid \epsilon$
Eliminate null productions from the following CFG : $S \rightarrow Xa$ $X \rightarrow aX \mid bX \mid \epsilon$
Convert the following grammar to GNF : $A_1 \rightarrow A_2 A_3$ $A_2 \rightarrow A_3 A_1 \mid b$ $A_3 \rightarrow A_1 A_2 \mid a$
Answer the following:
Design a PDA that accepts the language .
Design a PDA that accepts the language .
Design a TM that recognizes strings containing equal number of 0's and 1's.
Instructions:
- The marks are indicated in the right-hand margin.
- There are NINE questions in this paper.
- Attempt FIVE questions in all.
- Question No. 1 is compulsory.
Questions
Define any seven of the following :
Applications of automata theory
Finite automata
Transition graph
Epsilon transition
Regular expression
Regular language
Turing acceptable
Mealy machine
Reducibility
Enumerable language
Answer the following:
Design an FA that accepts set of strings containing exactly four 1's in every string over alphabets .
Design an NFA for the language .
Answer the following:
Design a deterministic finite automata which accepts set of strings such that every string containing "00" as sub-string but not "000" as sub-string.
Show that if is regular, so will be also regular.
Answer the following:
Write a regular expression over alphabets contains at least one "a" and at least one "b".
Prove that is not regular language.
Answer the following:
What do you mean by closer properties of regular language? Define some important closer properties.
Prove that, if and is regular, then is also regular language.
Answer the following:
Explain ambiguities in context free grammar and languages.
Find context free grammar for the regular expression .
Answer the following:
Show that the following grammar is ambiguous : $S \rightarrow AB \mid aaB$ $A \rightarrow a \mid Aa$ $B \rightarrow b$
Define parse tree with its applications in finite automata.
Answer the following:
What do you mean by push down automata? Explain its move.
Using pumping lemma, prove that language is not context free.
Answer the following:
Explain turing machine for computing function.
Write in brief about NP complete problem.
Instructions:
- The marks are indicated in the right-hand margin.
- There are NINE questions in this paper.
- Attempt FIVE questions in all.
- Question No. 1 is compulsory.
Questions
Choose the correct option of the following (any seven) :
The output of the Moore machine depends (i) only on present state (ii) only on current input symbol (iii) both on present state and current input symbol (iv) None of the above
The logic of pumping lemma is a good example of (i) the pigeon-hole principle (ii) the divide and conquer technique (iii) recursion (iv) iteration
Recursively enumerable languages are not closed under (i) union (ii) intersection (iii) complementation (iv) concatenation
The language is a (i) regular language (ii) context-free language (iii) non-context-free language (iv) None of the above
A language is denoted by a regular expression . Which of the following is not a legal string within ? (i) (ii) (iii) (iv) None of the above
Context-free languages are not closed under (i) union (ii) intersection (iii) concatenation
Recursive languages are (i) a proper superset of CFLs (ii) always recognizable (iii) also called type 0 languages (iv) recognizable by Turing machines
Choose the incorrect statement : (i) Every subset of a countable set is countable (ii) The class of DPDA is not countable (iii) The class of TMs is countable (iv) The class of LBA is countable
Which of the following statements is true? (i) The language is regular language (ii) The union of 2 recursive languages is recursive (iii) Recursive enumerable languages are closed under complementation (iv) Recursive languages are not closed under complementation
In case of TM, by reading input , TM (i) may go to halt-final state (ii) may go to halt-non-final state (iii) may go to infinite loop (iv) All of the above
Answer the following:
Obtain the regular expression for the following sets :
Differentiate between Moore and Mealy machines.
Differentiate between NFA and DFA.
Answer the following:
Construct NFA equivalent to the following regular expression : .
Construct an NFA for the following set : Set of all strings over containing at least two 0's.
Construct NFA for the set of strings over of alternate 0's and 1's.
Answer the following:
Construct a DFA for the regular expression .
Find out the regular expression for the following FA : [Table required]
Answer the following:
Construct a Moore machine equivalent to the following Mealy machine : [Table required]
Prove the following two properties : (i) Regular sets are closed over the union operation (ii) Regular sets are closed over the intersection operation.
Show with the help of pumping lemma that the following language is not regular : .
Answer the following:
Give the CFG for the following languages :
Find a CFG for the following regular expression : .
Let be a context-free grammar, which is defined as . Find the CFL generated by .
Answer the following:
Find a regular grammar for the following regular expression : .
Determine a CFG without unit production equivalent to the CFG given below : $S \rightarrow ABCD; A \rightarrow a; B \rightarrow C | b; C \rightarrow D; D \rightarrow c$.
Find the CNF (Chomsky Normal Form) for the following CFG : $S \rightarrow aAbB; A \rightarrow Ab | b; B \rightarrow Ba | a$.
Eliminate the null productions from the following CFG : $S \rightarrow ABA; A \rightarrow aA | \epsilon; B \rightarrow bB | \epsilon$.
Answer the following:
Prove that the CFL's are not closed under intersection.
Design a PDA to accept the language by empty stack.
Design a PDA to accept the language by empty stack.
Prove using pumping lemma that the following language is not CFL : .
Answer the following:
Design a TM over to accept the language .
Design a Turing machine for the regular expression .
Instructions:
- The marks are indicated in the right-hand margin.
- There are NINE questions in this paper.
- Attempt FIVE questions in all.
- Question No. 1 is compulsory.
Questions
Answer the following:
Explain the differences between NFA and DFA.
Design a DFA which accepts all strings which are ending with 101 over an alphabet {0, 1}.
Answer the following:
Obtain the regular expression for the following sets :
Construct an NFA (without using Thompson's rule) for the following set : Set of strings over with alternate 0's and 1's.
Answer the following:
Give DFA for the following NFA ($s$ is the final state) : [Table required]
Construct an NFA using move for .
Answer the following:
Give DFA for the NFA constructed in Question No. 3 (b).
Find out the regular expression for the following transition diagram : [Diagram required]
Answer the following:
Design a Moore machine to determine the residue mode 4 for each binary string treated as integer.
Design a Mealy machine that uses its state to remember the last symbol read and emits output whenever current input matches the previous one, and emits otherwise.
Answer the following:
Construct a Moore machine equivalent to the following Mealy machine : [Table required]
Show using pumping lemma that the language is regular or not.
Answer the following:
Reduce the grammar given by $S \rightarrow aAa; A \rightarrow Sb / bcc / DaA; C \rightarrow abb / DD; E \rightarrow ac; D \rightarrow aDA$ into an equivalent grammar by removing useless symbols and useless productions from it.
Convert the following grammar into CNF : $S \rightarrow aAD; A \rightarrow aB / bAB; B \rightarrow b; D \rightarrow d$
Answer the following:
Let be the grammar given by $S \rightarrow aABB / aAA; A \rightarrow aBB / a; B \rightarrow bBB / A$ Construct the PDA that accepts the language generated by this grammar .
Define deterministic push-down automata. Explain with an example.
Answer the following:
Give a Turing machine—that computes one's complement of a binary number;
Give a Turing machine—that shifts the input string over the alphabet by one position right by inserting '#' as the first character.
Answer the following:
Explain about deterministic context-free language and deterministic PDA.
Show that is a CSL.