FORMAL LANGUAGES AND AUTOMATA THEORY - B.Tech 6th Semester Exam., 2019
FORMAL LANGUAGES AND AUTOMATA THEORY
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.
-
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.
-
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.
-
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.
-
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)^* \)
-
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\}^*\} \)
-
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.
-
Construct an npda corresponding to the grammar: \( S \rightarrow aABB \mid aAA \), \( A \rightarrow aBB \mid a \), \( B \rightarrow bBB \mid A \)
-
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\}^*\} \)
-
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.