JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD B.Tech III FORMAL LANGUAGES AND AUTOMATA THEORY Previous Question Paper (March - 2021 - R18)
Answer any five questions. All questions carry equal marks.
Main
Convert the following Mealy Machine into an equivalent Moore Machine. (figure 1)
Answer
To convert a Mealy machine to a Moore machine, we split states based on the output associated with incoming transitions. If a state q has multiple incoming transitions with different outputs, we create multiple versions of q (e.g., q/0 and q/1) to ensure the output is consistent for every state in the Moore machine.
1. Identify all unique (state, output) pairs from the Mealy machine transitions.
2. Create a new state in the Moore machine for each unique pair.
3. For each new state, define the output as the output component of the pair.
4. For each transition in the original Mealy machine from state q to state p with input 'a' and output 'x', create a transition in the Moore machine from the state representing (q, any) to the state representing (p, x) with input 'a'.
5. If the initial state of the Mealy machine has no incoming transitions, create a new initial state with a default output, or if it does, ensure the Moore machine initial state reflects the output produced by the Mealy machine's initial transitions.
Convert the following NFA into equivalent DFA.
Answer
The conversion of an NFA to a DFA uses the subset construction algorithm (also known as powerset construction) to track all possible states the NFA could be in after a specific input sequence.
1. Start State: The start state of the DFA is the epsilon-closure of the NFA's start state.
2. Transition Function: For each DFA state (which is a set of NFA states) and each input symbol 'a', the new DFA state is the epsilon-closure of the union of all NFA states reachable from the current set on input 'a'.
3. Final States: Any DFA state that contains at least one final state from the original NFA is marked as a final state in the DFA.
4. Iteration: Repeat the transition process for all new sets of states until no new sets are created. If a set of states has no transitions for an input, it maps to a dead state (trap state).
Construct Moore for the input from (0+1)* that give residue modulo 4 of input treated as binary.
Answer
Sign in to view the complete answer paper.
Construct the minimum state automata equivalent to the following. (figure 2)
Answer
Sign in to view the complete answer paper.
Describe the following sets by regular expressions:
i) The set of all strings of a's and b's beginning with 'aa'
ii) The set of all strings of a's and b's beginning with 'b' and ending with 'aa'
iii) The set of all strings of a's and b's with atleast two consecutive a's
Answer
Sign in to view the complete answer paper.
State pumping lemma for regular languages. Prove that the following language {an | n is a prime number} is not regular.
Answer
Sign in to view the complete answer paper.
Construct the NFA with ε transition for the following expression (0+1)*00(0+1)*
Answer
Sign in to view the complete answer paper.
Construct the regular expression for the following finite automata. (figure 3)
Answer
Sign in to view the complete answer paper.
Find CFG for the language L = { ai bj ck | i=j }.
Answer
Sign in to view the complete answer paper.
Let G be the grammar S→aB | bA, A→a | aS | bAA, B→b | bS | aBB. Find a Right most derivation for the string “aaabbabbba” and also draw the derivation Tree.
Answer
Sign in to view the complete answer paper.
Design a PDA for the following language L = { 0n 12n | n≥1 }.
Answer
Sign in to view the complete answer paper.
Construct the CFG for the PDA M = ({q0,q1}, {0,1}, {R,Z0}, δ, q0, Z0, Φ ) where δ is given by:
δ(q0,1,R)=(q0,RR)
δ(q0,0,R)=(q1,R)
δ(q1,0,Z0)=(q0,Z0)
δ(q0,ε,Z0)=(q0,ε)
δ(q1,1,R)=(q1,ε)
Answer
Sign in to view the complete answer paper.
Convert the following grammar to Greibach Normal Form:
S→ABA | AB | BA | AA | B
A→aA | a
B→bB | b
Answer
Sign in to view the complete answer paper.
Reduce the following grammar such that there are no unit productions:
S → AA
A → B | BB
B → abB | b | bb
Answer
Sign in to view the complete answer paper.
Design a Turing Machine to accept the language L = { WCWR | w in (0+1)* }.
Answer
Sign in to view the complete answer paper.
Discuss about Post Correspondence Problem.
Answer
Sign in to view the complete answer paper.