FORMAL LANGUAGES AND AUTOMATA THEORY
2021105503
B.Tech 5th Semester Exam., 2021
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):
Ask AI
Q1.1
Which of the following statements is/are False?
Ask AI
Q1.2
Enumerator is a Turing machine with
Ask AI
Q1.3
The language $ \{a^m b^n c^{m+n} \mid m, n \ge 1\} $ is
Ask AI
Q1.4
The maximum number of states of a DFA converted from an NFA with $ n $ states is
Ask AI
Q1.5
If $ L_1 $ and $ L_2 $ are context-free languages, $ L_1 - L_2 $ is
Ask AI
Q1.6
Which of the following does not have left recursions?
Ask AI
Q1.7
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?
Ask AI
Q1.8
_____ is the acyclic graphical representation of a grammar.
Ask AI
Q1.9
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
Ask AI
Q1.10
The construction time for DFA from an equivalent NFA ($ m $ number of node) is
Ask AI
Q.2 Solve both questions :
Ask AI
Q2.1
Tabulate Chomsky hierarchy of grammar with an example for each.
Ask AI
Q2.2
Design a finite state machine abstract model for Parity checker.
Ask AI
Q.3 Solve both questions :
Ask AI
Q3.1
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.
Ask AI
Q3.2
Construct a push-down automata that accepts the following language: $ L = \{uawb : u \text{ and } w \in (a,b)^* \text{ and } |u| = |w|\} $
Ask AI
Q.4 Solve both questions :
Ask AI
Q4.1
Design a Turing machine (TM) to compute $ n \mod 2 $.
Ask AI
Q4.2
Design a DFA corresponding to regular expression $ 1^*(10)^* $
Ask AI
Q.5 Solve both questions :
Ask AI
Q5.1
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.
Ask AI
Q5.2
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?Ask AI
Q.6 Solve both questions :
Ask AI
Q6.1
Show that the language $ L = \{a^{n!} : n \ge 0\} $ is not regular or not context-free language.
Ask AI
Q6.2
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.
Ask AI
Q.7 Solve both questions :
Ask AI
Q7.1
State and prove pumping lemma for regular sets.
Ask AI
Q7.2
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 $
Ask AI
Q.8 Solve both questions :
Ask AI
Q8.1
Show that the sum function $ f(x, y) = x + y $ is primitive recursive.
Ask AI
Q8.2
Construct a PDA that accepts the language $ L = \{a^{2n}bc \mid n \ge 0\} $ by final state and empty stack.
Ask AI
Q.9 Write short notes on the following:
Ask AI
Q9.1
Ask AI
2021V2105503
B.Tech 5th Semester Exam., 2021
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):
Ask AI
Q1.1
Which of the following statements is/are False?
Ask AI
Q1.2
Enumerator is a Turing machine with
Ask AI
Q1.3
The language is
Ask AI
Q1.4
The maximum number of states of a DFA converted from an NFA with states is
Ask AI
Q1.5
If and are context-free languages, is
Ask AI
Q1.6
Which of the following does not have left recursions?
Ask AI
Q1.7
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?
Ask AI
Q1.8
_____ is the acyclic graphical representation of a grammar.
Ask AI
Q1.9
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
Ask AI
Q1.10
The construction time for DFA from an equivalent NFA ($ m $ number of node) is
Ask AI
Q.2 Solve both questions :
Ask AI
Q2.1
Tabulate Chomsky hierarchy of grammar with an example for each.
Ask AI
Q2.2
Design a finite state machine abstract model for Parity checker.
Ask AI
Q.3 Solve both questions :
Ask AI
Q3.1
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.
Ask AI
Q3.2
Construct a push-down automata that accepts the following language: $ L = {uawb : u \text{ and } w \in (a,b)^* \text{ and } |u| = |w|} $
Ask AI
Q.4 Solve both questions :
Ask AI
Q4.1
Design a Turing machine (TM) to compute .
Ask AI
Q4.2
Design a DFA corresponding to regular expression
Ask AI
Q.5 Solve both questions :
Ask AI
Q5.1
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.
Ask AI
Q5.2
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?Ask AI
Q.6 Solve both questions :
Ask AI
Q6.1
Show that the language is not regular or not context-free language.
Ask AI
Q6.2
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.
Ask AI
Q.7 Solve both questions :
Ask AI
Q7.1
State and prove pumping lemma for regular sets.
Ask AI
Q7.2
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 $
Ask AI
Q.8 Solve both questions :
Ask AI
Q8.1
Show that the sum function is primitive recursive.
Ask AI
Q8.2
Construct a PDA that accepts the language by final state and empty stack.
Ask AI
Q.9 Write short notes on the following:
Ask AI
Q9.1
Ask AI
2020105503
B.Tech 5th Semester Exam., 2020
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):
Ask AI
Q1.1
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?
Ask AI
Q1.2
Which of the following versions of Unix came up with YACC first?
Ask AI
Q1.3
A pushdown automata can be represented as $ PDA = \epsilon \text{-} NFA + [\text{stack}] $.
Ask AI
Q1.4
A language accepted by deterministic pushdown automata is closed under which of the following?
Ask AI
Q1.5
A _____ is context free grammar with atmost one non-terminal in the right handside of the production.
Ask AI
Q1.6
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?
Ask AI
Q1.7
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?
Ask AI
Q1.8
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}?
Ask AI
Q1.9
The decision problem is the function from string to
Ask AI
Q1.10
A language L may not be accepted by a turing machine if
Ask AI
Q.2 Solve both questions :
Ask AI
Q2.1
Write the context-free grammar to create palindrome over {a, b}.
Ask AI
Q2.2
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.
Ask AI
Q.3 Solve both questions :
Ask AI
Q3.1
Design a turing machine to compute the sum of two positive integers m and n.
Ask AI
Q3.2
Design a NPDA for accepting the string $ L = $ set of all palindrome over {a, b} by the empty stack and by final state.
Ask AI
Q.4 Solve both questions :
Ask AI
Q4.1
Construct finite automaton corresponding to the regular expression: $ (a+b)^*c d^*e $
Ask AI
Q4.2
Explain the multi-tape version of turing machine and its significance.
Ask AI
Q.5 Solve both questions :
Ask AI
Q5.1
Show given grammar over alphabet {a, b} verify whether it is ambiguous or unambiguous : $ S \rightarrow a / abSb / aAb $, $ A \rightarrow bS / aAAb $
Ask AI
Q5.2
Show that $ L = $ palindrome over {a, b} is not regular.
Ask AI
Q.6 Solve both questions :
Ask AI
Q6.1
Prove that if L is generated by a CFG, then L is accepted by a non-deterministic PDA by empty stack.
Ask AI
Q6.2
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 $
Ask AI
Q.7 Solve both questions :
Ask AI
Q7.1
Design a turing machine that accepts all palindromes over $ \Sigma = \{a, b\} $.
Ask AI
Q7.2
Explain Myhill-Nerode theorem for minimization of automata with suitable example.
Ask AI
Q.8 Solve both questions :
Ask AI
Q8.1
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.
Ask AI
Q8.2
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.
Ask AI
Q.9 Write short notes on the following:
Ask AI
Q9.1
Ask AI
2020V2105503
B.Tech 5th Semester Exam., 2020
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):
Ask AI
Q1.1
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?
Ask AI
Q1.2
Which of the following versions of Unix came up with YACC first?
Ask AI
Q1.3
A pushdown automata can be represented as $ PDA = \epsilon \text{-} NFA + [\text{stack}] $.
Ask AI
Q1.4
A language accepted by deterministic pushdown automata is closed under which of the following?
Ask AI
Q1.5
A _____ is context free grammar with atmost one non-terminal in the right handside of the production.
Ask AI
Q1.6
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?
Ask AI
Q1.7
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?
Ask AI
Q1.8
What is the minimum number of states in deterministic finite automata (DFA) for string starting with and ending with a over alphabet {a, b}?
Ask AI
Q1.9
The decision problem is the function from string to
Ask AI
Q1.10
A language L may not be accepted by a turing machine if
Ask AI
Q.2 Solve both questions :
Ask AI
Q2.1
Write the context-free grammar to create palindrome over {a, b}.
Ask AI
Q2.2
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.
Ask AI
Q.3 Solve both questions :
Ask AI
Q3.1
Design a turing machine to compute the sum of two positive integers m and n.
Ask AI
Q3.2
Design a NPDA for accepting the string set of all palindrome over {a, b} by the empty stack and by final state.
Ask AI
Q.4 Solve both questions :
Ask AI
Q4.1
Construct finite automaton corresponding to the regular expression:
Ask AI
Q4.2
Explain the multi-tape version of turing machine and its significance.
Ask AI
Q.5 Solve both questions :
Ask AI
Q5.1
Show given grammar over alphabet {a, b} verify whether it is ambiguous or unambiguous : $ S \rightarrow a / abSb / aAb A \rightarrow bS / aAAb $
Ask AI
Q5.2
Show that palindrome over {a, b} is not regular.
Ask AI
Q.6 Solve both questions :
Ask AI
Q6.1
Prove that if L is generated by a CFG, then L is accepted by a non-deterministic PDA by empty stack.
Ask AI
Q6.2
Design a pushdown automaton for the following context-free grammar: $ S \rightarrow aB \mid bA $, ,
Ask AI
Q.7 Solve both questions :
Ask AI
Q7.1
Design a turing machine that accepts all palindromes over .
Ask AI
Q7.2
Explain Myhill-Nerode theorem for minimization of automata with suitable example.
Ask AI
Q.8 Solve both questions :
Ask AI
Q8.1
Prove that if L is the language generated by an unrestricted grammar , then L is recognized by a turing machine.
Ask AI
Q8.2
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.
Ask AI
Q.9 Write short notes on the following:
Ask AI
Q9.1
Ask AI
2019051611
B.Tech 6th Semester Exam., 2019
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:
Ask AI
Q1.1
The word 'formal' in formal languages means
Ask AI
Q1.2
Which of the following statements is true?
Ask AI
Q1.3
Which of the following pairs of regular expressions are equivalent?
Ask AI
Q1.4
Which of the following pairs have DIFFERENT expressive powers?
Ask AI
Q1.5
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?
Ask AI
Q1.6
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)?

Ask AI
Q1.7
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?
Ask AI
Q1.8
A PDM behaves like an FSM when the number of auxiliary memory it has, is
Ask AI
Q1.9
Define Turing machine in brief.
Ask AI
Q1.10
A finite automaton with _____ is equivalent to push-down automata.
Ask AI
Q.2 Solve this question :
Ask AI
Q2.1
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.Ask AI
Q.3 Solve both questions :
Ask AI
Q3.1
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 $
Ask AI
Q3.2
Let $ G = (V, T, S, P) $ be a right-linear grammar. Prove that the language generated using the grammar G is a regular.
Ask AI
Q.4 Solve both questions :
Ask AI
Q4.1
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 Ask AI
Q4.2
Prove the following equation : $ (1+00^*1) + (1+00^*1)(0+10^*1)^*(0+10^*1) $ = $ 0^*1(0+10^*1)^* $
Ask AI
Q.5 Solve this question :
Ask AI
Q5.1
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\}^*\} $
Ask AI
Q.6 Solve both questions :
Ask AI
Q6.1
Convert the grammar into Chomsky normal form: $ S \rightarrow aB \mid AB $, $ A \rightarrow aab \mid \lambda $, $ B \rightarrow bbA $
Ask AI
Q6.2
Show that the family of unambiguous context-free languages is not closed under union.
Ask AI
Q.7 Solve this question :
Ask AI
Q7.1
Construct an npda corresponding to the grammar: $ S \rightarrow aABB \mid aAA $, $ A \rightarrow aBB \mid a $, $ B \rightarrow bBB \mid A $
Ask AI
Q.8 Solve this question :
Ask AI
Q8.1
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\}^*\} $
Ask AI
Q.9 Solve both questions :
Ask AI
Q9.1
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?
Ask AI
Q9.2
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.
Ask AI
2019V4051611
B.Tech 6th Semester Exam., 2019
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:
Ask AI
Q1.1
The word 'formal' in formal languages means
Ask AI
Q1.2
Which of the following statements is true?
Ask AI
Q1.3
Which of the following pairs of regular expressions are equivalent?
Ask AI
Q1.4
Which of the following pairs have DIFFERENT expressive powers?
Ask AI
Q1.5
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?
Ask AI
Q1.6
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)?

Ask AI
Q1.7
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?
Ask AI
Q1.8
A PDM behaves like an FSM when the number of auxiliary memory it has, is
Ask AI
Q1.9
Define Turing machine in brief.
Ask AI
Q1.10
A finite automaton with _____ is equivalent to push-down automata.
Ask AI
Q.2 Solve this question :
Ask AI
Q2.1
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.Ask AI
Q.3 Solve both questions :
Ask AI
Q3.1
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 $
Ask AI
Q3.2
Let $ G = (V, T, S, P) $ be a right-linear grammar. Prove that the language generated using the grammar G is a regular.
Ask AI
Q.4 Solve both questions :
Ask AI
Q4.1
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 Ask AI
Q4.2
Prove the following equation : $ (1+00^*1) + (1+00^*1)(0+10^*1)^*(0+10^*1) $ = $ 0^*1(0+10^*1)^* $
Ask AI
Q.5 Solve this question :
Ask AI
Q5.1
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\}^*\} $
Ask AI
Q.6 Solve both questions :
Ask AI
Q6.1
Convert the grammar into Chomsky normal form: $ S \rightarrow aB \mid AB $, $ A \rightarrow aab \mid \lambda $, $ B \rightarrow bbA $
Ask AI
Q6.2
Show that the family of unambiguous context-free languages is not closed under union.
Ask AI
Q.7 Solve this question :
Ask AI
Q7.1
Construct an npda corresponding to the grammar: $ S \rightarrow aABB \mid aAA $, $ A \rightarrow aBB \mid a $, $ B \rightarrow bBB \mid A $
Ask AI
Q.8 Solve this question :
Ask AI
Q8.1
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\}^*\} $
Ask AI
Q.9 Solve both questions :
Ask AI
Q9.1
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?
Ask AI
Q9.2
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.
Ask AI
2018051611
B.Tech 6th Semester Exam., 2018
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:
Ask AI
Q1.1
Regular expressions are closed under
Ask AI
Q1.2
Extended transition function is
Ask AI
Q1.3
From the options given below, the pair having different expressive powers is
Ask AI
Q1.4
For the language $ \{a^p \mid p \text{ is a prime}\} $, the statement which holds true is
Ask AI
Q1.5
Which one of the following statements is true?
Ask AI
Q1.6
A class of language that is closed under
Ask AI
Q1.7
CFG can be recognized by
Ask AI
Q1.8
A given grammar is called ambiguous, if
Ask AI
Q1.9
The output of the Mealy machine depends
Ask AI
Q1.10
The logic of pumping lemma is a good example of
Ask AI
Q.2 Solve both questions :
Ask AI
Q2.1
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}Ask AI
Q2.2
State and proof pumping lemma for regular languages.
Ask AI
Q.3 Solve both questions :
Ask AI
Q3.1
Using pumping lemma, show that the language $ A = \{ww \mid w \in \{0, 1\}^*\} $ is not regular.
Ask AI
Q3.2
Let A be a non-empty regular language. Prove that there exists an NFA that accepts A and that has exactly one accept state.
Ask AI
Q3.3
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)^* $
Ask AI
Q.4 Solve this question :
Ask AI
Q4.1
(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:
Ask AI
Q.5 Solve this question :
Ask AI
Q5.1
(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.Ask AI
Q.6 Solve both questions :
Ask AI
Q6.1
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.Ask AI
Q6.2
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 $
Ask AI
Q.7 Solve this question :
Ask AI
Q7.1
(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 $Ask AI
Q.8 Solve both questions :
Ask AI
Q8.1
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)\} $Ask AI
Q8.2
Design a PDA that accepts the language $ L = \{a^n b^m a^n : m, n > 0\} $
Ask AI
Q.9 Solve this question :
Ask AI
Q9.1
(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.Ask AI
2018V4051611
B.Tech 6th Semester Exam., 2018
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:
Ask AI
Q1.1
Regular expressions are closed under
Ask AI
Q1.2
Extended transition function is
Ask AI
Q1.3
From the options given below, the pair having different expressive powers is
Ask AI
Q1.4
For the language $ \{a^p \mid p \text{ is a prime}\} $, the statement which holds true is
Ask AI
Q1.5
Which one of the following statements is true?
Ask AI
Q1.6
A class of language that is closed under
Ask AI
Q1.7
CFG can be recognized by
Ask AI
Q1.8
A given grammar is called ambiguous, if
Ask AI
Q1.9
The output of the Mealy machine depends
Ask AI
Q1.10
The logic of pumping lemma is a good example of
Ask AI
Q.2 Solve both questions :
Ask AI
Q2.1
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}Ask AI
Q2.2
State and proof pumping lemma for regular languages.
Ask AI
Q.3 Solve both questions :
Ask AI
Q3.1
Using pumping lemma, show that the language $ A = \{ww \mid w \in \{0, 1\}^*\} $ is not regular.
Ask AI
Q3.2
Let A be a non-empty regular language. Prove that there exists an NFA that accepts A and that has exactly one accept state.
Ask AI
Q3.3
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)^* $
Ask AI
Q.4 Solve this question :
Ask AI
Q4.1
(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:
Ask AI
Q.5 Solve this question :
Ask AI
Q5.1
(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.Ask AI
Q.6 Solve both questions :
Ask AI
Q6.1
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.Ask AI
Q6.2
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 $
Ask AI
Q.7 Solve this question :
Ask AI
Q7.1
(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 $Ask AI
Q.8 Solve both questions :
Ask AI
Q8.1
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)\} $Ask AI
Q8.2
Design a PDA that accepts the language $ L = \{a^n b^m a^n : m, n > 0\} $
Ask AI
Q.9 Solve this question :
Ask AI
Q9.1
(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.Ask AI
2017051611
B.Tech Examination, 2017
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
Ask AI
Q1
Choose the correct alternatives for any seven of the following :
a)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
b)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
c)Recursively enumerable languages are not closed under (a) union (b) intersection (c) complementation (d) concatenation
d)The language is a (a) regular language (b) context-free language (c) non-context-free (d) none of the above
e)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
f)Context free languages are not closed under (a) union (b) intersection (c) concatenation
g)Recursive languages are (a) a proper superset of CFLs. (b) Always recognizable (c) Also called type 0 languages (d) Recognizable by Turing Machines
h)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
i)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
j)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
14 marksAsk AI
Q2
Answer the following:
a)12 marksObtain the regular expression for the following sets :
b)2 marksDescribe in simple English the language represented by the regular expression .
Ask AI
Q3
Answer the following:
a)4 marksConstruct NFA equivalent to the following Regular expression : .
b)5 marksConstruct an NFA with moves for the regular expression .
c)5 marksConstruct NFA for the Set of all strings over with alternate 0's and 1's.
Ask AI
Q4
Answer the following:
a)7 marksConstruct a DFA for the regular expression .
b)7 marksFind out the regular expression for the following FA : [Table required]
Ask AI
Q5
Answer the following:
a)6 marksProve the following two properties : (i) Regular sets are closed over the union operation (ii) Regular sets are closed over the intersection operation
b)8 marksShow with the help of pumping lemma that following languages are not regular :
Ask AI
Q6
Answer the following:
a)9 marksGive the CFG for each of the languages defined by the following regular expressions :
b)5 marksConstruct a CFG for the following language set : .
Ask AI
Q7
Answer the following:
a)9 marksFor 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'.
b)5 marksDetermine a CFG without unit production equivalent to the CFG given below : $S \rightarrow Abb$ $A \rightarrow Bb$ $B \rightarrow Sa$
Ask AI
Q8
Answer the following:
a)5 marksFind the CNF (Chomsky Normal Form) for the following CFG : $S \rightarrow aSa \mid bSb \mid a \mid b \mid aa \mid bb$
b)4 marksEliminate null productions from the following CFG : $A \rightarrow aBb \mid bBa$ $B \rightarrow abB \mid bB \mid \epsilon$
c)5 marksConvert 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$
Ask AI
Q9
Answer the following:
a)5 marksDesign a PDA that accepts all palindrome strings over .
b)5 marksDesign a PDA that accepts the language .
c)4 marksShow that is not a context-free language.
Ask AI
2016051611
B.Tech Examination, 2016
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
Ask AI
Q1
Choose the correct answer for any seven of the following :
a)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
b)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
c)Regular languages are closed under (i) union (ii) intersection (iii) complementation (iv) All of the above
d)The language is a (i) regular language (ii) context-free language (iii) non context-free language (iv) None of the above
e)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
f)Context-free languages are not closed under (i) union (ii) intersection (iii) concatenation
g)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
h)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
i)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.
j)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
14 marksAsk AI
Q2
Answer the following:
a)10 marksObtain the regular expression for the following sets :
b)4 marksShow that .
Ask AI
Q3
Answer the following:
a)4 marksConstruct NFA equivalent to the following regular expression : .
b)5 marksConstruct an NFA with moves for the regular expression .
c)5 marksConstruct an NFA for the set of all strings over with exactly two .
Ask AI
Q4
Answer the following:
a)7 marksConstruct a DFA for the regular expression .
b)7 marksFind out the regular expression for the following transition diagram : [Diagram required]
Ask AI
Q5
Answer the following:
a)6 marksProve the following two properties : (i) Regular sets are closed over the concatenation operation (ii) Regular sets are closed over the complement operation.
b)4 marksShow with the help of pumping lemma that following language is not regular : .
c)4 marksRepresent the language that contains strings over and has even number of 0's.
Ask AI
Q6
Answer the following:
a)9 marksGive the CFG for each of the languages defined by the following regular expressions :
b)5 marksConstruct a CFG for the set of non-negative odd integers.
Ask AI
Q7
Answer the following:
a)9 marksFor 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'.
b)5 marksDetermine 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$
Ask AI
Q8
Answer the following:
a)5 marksFind the CNF (Chomsky Normal Form) for the following CFG : $S \rightarrow ABA$ $A \rightarrow aaA \mid \epsilon$ $B \rightarrow bB \mid \epsilon$
b)4 marksEliminate null productions from the following CFG : $S \rightarrow Xa$ $X \rightarrow aX \mid bX \mid \epsilon$
c)5 marksConvert 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$
Ask AI
Q9
Answer the following:
a)4 marksDesign a PDA that accepts the language .
b)4 marksDesign a PDA that accepts the language .
c)6 marksDesign a TM that recognizes strings containing equal number of 0's and 1's.
Ask AI
2015051611
B.Tech Examination, 2015
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
Ask AI
Q1
Define any seven of the following :
a)Applications of automata theory
b)Finite automata
c)Transition graph
d)Epsilon transition
e)Regular expression
f)Regular language
g)Turing acceptable
h)Mealy machine
i)Reducibility
j)Enumerable language
14 marksAsk AI
Q2
Answer the following:
a)7 marksDesign an FA that accepts set of strings containing exactly four 1's in every string over alphabets .
b)7 marksDesign an NFA for the language .
Ask AI
Q3
Answer the following:
a)7 marksDesign a deterministic finite automata which accepts set of strings such that every string containing "00" as sub-string but not "000" as sub-string.
b)7 marksShow that if is regular, so will be also regular.
Ask AI
Q4
Answer the following:
a)7 marksWrite a regular expression over alphabets contains at least one "a" and at least one "b".
b)7 marksProve that is not regular language.
Ask AI
Q5
Answer the following:
a)7 marksWhat do you mean by closer properties of regular language? Define some important closer properties.
b)7 marksProve that, if and is regular, then is also regular language.
Ask AI
Q6
Answer the following:
a)7 marksExplain ambiguities in context free grammar and languages.
b)7 marksFind context free grammar for the regular expression .
Ask AI
Q7
Answer the following:
a)7 marksShow that the following grammar is ambiguous : $S \rightarrow AB \mid aaB$ $A \rightarrow a \mid Aa$ $B \rightarrow b$
b)7 marksDefine parse tree with its applications in finite automata.
Ask AI
Q8
Answer the following:
a)7 marksWhat do you mean by push down automata? Explain its move.
b)7 marksUsing pumping lemma, prove that language is not context free.
Ask AI
Q9
Answer the following:
a)7 marksExplain turing machine for computing function.
b)7 marksWrite in brief about NP complete problem.
Ask AI
2014051611
B.Tech Examination, 2014
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
Ask AI
Q1
Choose the correct option of the following (any seven) :
a)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
b)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
c)Recursively enumerable languages are not closed under (i) union (ii) intersection (iii) complementation (iv) concatenation
d)The language is a (i) regular language (ii) context-free language (iii) non-context-free language (iv) None of the above
e)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
f)Context-free languages are not closed under (i) union (ii) intersection (iii) concatenation
g)Recursive languages are (i) a proper superset of CFLs (ii) always recognizable (iii) also called type 0 languages (iv) recognizable by Turing machines
h)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
i)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
j)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
14 marksAsk AI
Q2
Answer the following:
a)10 marksObtain the regular expression for the following sets :
b)2 marksDifferentiate between Moore and Mealy machines.
c)2 marksDifferentiate between NFA and DFA.
Ask AI
Q3
Answer the following:
a)4 marksConstruct NFA equivalent to the following regular expression : .
b)5 marksConstruct an NFA for the following set : Set of all strings over containing at least two 0's.
c)5 marksConstruct NFA for the set of strings over of alternate 0's and 1's.
Ask AI
Q4
Answer the following:
a)7 marksConstruct a DFA for the regular expression .
b)7 marksFind out the regular expression for the following FA : [Table required]
Ask AI
Q5
Answer the following:
a)5 marksConstruct a Moore machine equivalent to the following Mealy machine : [Table required]
b)5 marksProve the following two properties : (i) Regular sets are closed over the union operation (ii) Regular sets are closed over the intersection operation.
c)4 marksShow with the help of pumping lemma that the following language is not regular : .
Ask AI
Q6
Answer the following:
a)6 marksGive the CFG for the following languages :
b)4 marksFind a CFG for the following regular expression : .
c)4 marksLet be a context-free grammar, which is defined as . Find the CFL generated by .
Ask AI
Q7
Answer the following:
a)4 marksFind a regular grammar for the following regular expression : .
b)3 marksDetermine 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$.
c)3 marksFind the CNF (Chomsky Normal Form) for the following CFG : $S \rightarrow aAbB; A \rightarrow Ab | b; B \rightarrow Ba | a$.
d)4 marksEliminate the null productions from the following CFG : $S \rightarrow ABA; A \rightarrow aA | \epsilon; B \rightarrow bB | \epsilon$.
Ask AI
Q8
Answer the following:
a)3 marksProve that the CFL's are not closed under intersection.
b)4 marksDesign a PDA to accept the language by empty stack.
c)4 marksDesign a PDA to accept the language by empty stack.
d)3 marksProve using pumping lemma that the following language is not CFL : .
Ask AI
Q9
Answer the following:
a)7 marksDesign a TM over to accept the language .
b)7 marksDesign a Turing machine for the regular expression .
Ask AI
2013105301
B.Tech Examination, 2013
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
Ask AI
Q1
Answer the following:
a)7 marksExplain the differences between NFA and DFA.
b)7 marksDesign a DFA which accepts all strings which are ending with 101 over an alphabet {0, 1}.
Ask AI
Q2
Answer the following:
a)7 marksObtain the regular expression for the following sets :
b)7 marksConstruct an NFA (without using Thompson's rule) for the following set : Set of strings over with alternate 0's and 1's.
Ask AI
Q3
Answer the following:
a)7 marksGive DFA for the following NFA ($s$ is the final state) : [Table required]
b)7 marksConstruct an NFA using move for .
Ask AI
Q4
Answer the following:
a)7 marksGive DFA for the NFA constructed in Question No. 3 (b).
b)7 marksFind out the regular expression for the following transition diagram : [Diagram required]
Ask AI
Q5
Answer the following:
a)7 marksDesign a Moore machine to determine the residue mode 4 for each binary string treated as integer.
b)7 marksDesign 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.
Ask AI
Q6
Answer the following:
a)7 marksConstruct a Moore machine equivalent to the following Mealy machine : [Table required]
b)7 marksShow using pumping lemma that the language is regular or not.
Ask AI
Q7
Answer the following:
a)7 marksReduce 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.
b)7 marksConvert the following grammar into CNF : $S \rightarrow aAD; A \rightarrow aB / bAB; B \rightarrow b; D \rightarrow d$
Ask AI
Q8
Answer the following:
a)7 marksLet 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 .
b)7 marksDefine deterministic push-down automata. Explain with an example.
Ask AI
Q9
Answer the following:
a)7 marksGive a Turing machine—that computes one's complement of a binary number;
b)7 marksGive a Turing machine—that shifts the input string over the alphabet by one position right by inserting '#' as the first character.
Ask AI
Q10
Answer the following:
a)7 marksExplain about deterministic context-free language and deterministic PDA.
b)7 marksShow that is a CSL.
Ask AI