PART – A
1. List the various forms of proofs.
2. Design deterministic finite automata for the set of all strings having 01 as a substring.
3. Define Structural Induction.
Proves properties of recursively defined structures (like trees or graphs) by confirming the base case
and the inductive step. It’s used for proving properties of data structures, algorithms, and grammars in
computer science.
4. Give the applications of Finite Automata.
• Lexical Analysis: DFA iden*fies tokens (e.g., keywords, iden*fiers) in source code for
programming languages.
• [Link] Matching: DFA is used in search engines and editors to match and highlight pa@erns in
text.
• Text Processing: DFA-based search and replace func*ons work by iden*fying and modifying text
pa@erns.
• Network Protocol Verifica;on: Used to validate sequences in communica*on protocols, ensuring
correct request and response sequences.
5. Define automata.
• Mathematical models for computational processes, designed to process a sequence of inputs
and change states according to rules.
• Types include Finite Automata (FA), Pushdown Automata (PDA), and Turing Machines
(TM), each with varying levels of power.
6. Design NFA for the set of all strings not having 11 as a substring.
7. List any four algebraic laws of Regular languages.
8. Define equivalent pair of states.
Two states are equivalent if, for every possible string input, both lead to either acceptance or rejection.
Minimizing an automaton often involves finding and merging such states.
9. Write the closure properties of Regular languages.
• Union: The union of two regular languages is also regular.
• Intersec;on: The intersec*on of two regular languages is also regular.
• Complement: The complement of a regular language is also regular.
• Concatena;on: The concatena*on of two regular languages is also regular.
• Kleene Star: The Kleene star of a regular language is also regular.
10. Verify the given language is regular. L={0n1n| n≥1}
11. Write the regular expression for the language L contains set of all strings having alternate 0’s and
1’s.
12. How will you identify the equivalent pair of states in an automaton?
• Par;;on Refinement Algorithm: Starts with an ini*al par**on (final and non-final states)
and refines it un*l no further division is possible.
• Myhill-Nerode Theorem: Useful for proving regularity of languages by tes*ng state
dis*nguishability.
13. Is the Grammar is ambiguous for the production S->SS(S)/(S)/S(S)S/ε
14. What are the different types of languages accepted by PDA?
Context-Free Languages: Recognized by non-deterministic PDA.
Context-Sensitive Languages: Certain restricted context-sensitive languages can also be recognized by
enhanced PDAs.
15. Verify the given grammar is ambiguous or not.
E→E+T|T, T→T*F|F, F→(E)|id
16. Consider the CFG, E->E+E/E*E/a/b. Whether this suffers from Ambiguity? Justify.
17. Is PDA superior over NFA in the sense of language acceptance? Justify the answer.
18. Give the languages of PDA.
Context-Free Languages: Formed by grammars that can be parsed using a PDA, such as balancing
symbols (e.g., parentheses).
19. What are useless symbols in a Grammar?
Symbols that never participate in deriving terminal strings are termed useless. These are often
eliminated to simplify grammar.
20. Define universal TM.
A Turing machine that can emulate any other Turing machine's behavior, serving as a theoretical model
of general-purpose computation.
21. Remove Unit productions from the given grammar.
S → 0X | 1Y | Z, X → 0S | 00, Y → 1 | X, Z → 01
22. Define instantaneous description in Turing Machine.
It represents the current computation state, the contents of the tape, and the head position, capturing a
snapshot of the machine's progress.
23. Define unit production. Give example.
A production where one non-terminal derives another single non-terminal.
e.g., A→B. Used to simplify context-free grammars.
24. Differentiate multi tape and multiple TM.
Multi-tape TM: Has several tapes, allowing concurrent access to multiple symbols.
Multiple TMs: Multiple independent TMs running in parallel, each on its own input.
25. What is recursively enumerable language?
26. Define the class of NP problem.
27. What is meant by halting problem of a TM?
28. State P and NP problems.
P (Polynomial Time): Problems solvable in polynomial time, e.g., sorting.
NP (Non-deterministic Polynomial Time): Problems verifiable in polynomial time, e.g., certain
combinatorial and search problems.
29. What is unsolvable problem? Give example.
Problems for which no algorithm can provide a solution, such as the Halting Problem and Post’s
Correspondence Problem.
30. When do you say a Problem is NP Hard.
A problem is NP-Hard if solving it efficiently would also provide efficient solutions to all problems in NP.
PART – B
Prove by induction the following:
1. For all n≥1, 12 + 22 + 32….n2 = {n(n + 1) (2n + 1)} / 6
2. Design DFA to accept the following strings over the alphabets{a,b}. The set of all strings having
aba as the substring.
Given a binary string S, the task is to write a program for DFA Machine that accepts a set of all strings over
w ∈ (a, b)* which contains “aba” as a substring.
Examples :
Input-1 : ababa
Output : Accepted
Explanation : "ababa" consists "aba"
Input-2 : abbbb
Output : Not accepted
Explanation : "abbbb" does not consist "aba"
Approach : Below is the designed DFA Machine for the given problem. Construct a transition table for DFA
states and analyze the transitions between each state. Below are the steps –
Desired Language:
L = {aba, baba, abab, aababbb.....}
Explanation:
1. Firstly, there will be 4states.(say q0, q1, q2, q3) , with q0 being initial state and q3 being final state.
2. Initially we will be in q0 state, now we start reading the given string.
• When we read ‘b’, we will remain in the same state
• If we read ‘a’, then it transits to state q1.
3. Assuming that now we are in q1 state.
• When we read ‘a’, we will remain in the same state.
• If we read ‘b’, we will transits to state q2.
4. Assuming that now we are in q2 state.
• If we read ‘a’, it transits to state q3.
• If we read ‘b’, it transits to state q0.
5. Assuming we are in final state(q3)
• We remain in the same state, when we read ‘a’ or ‘b’.
6. All strings which are accepted by this DFA will have “aba” as its substring.
Transition Table :
Final state
Current state a b
q0 q1 q0
q1 q1 q2
q2 q3 q0
q3 q3 q3
3. If E is an ε -NFA to accept the language L then there exists an equivalent DFA D to accept the
same language L, ie. E(L) = D(L). Prove.
4. Design DFA accept the following strings over the alphabets{0,1}. The set of all strings begins with
01 and ends with 11.
5. State and prove Mutual Induction.
6. Construct Deterministic Finite automata to accept the following languages:
i. Binary equivalent of the numbers divisible by 2 (3)
ii. Strings does not have the substring 00. (3)
7. State and prove Pumping Lemma is not regular.
8. Design a ε-NFA for the regular expression (a+b)*(aa+bb)
9. Elaborate the steps to convert the DFA to Regular expression.
10. Prove the Equivalence between FA and RE with examples.
11. Elaborate the state elimination method to convert the DFA to Regular expression with an example.
12. Construct ε –NFA from the Regular expression, (a+b*)*ba*
13. Design a CFG to derive strings of palindromes of 0’s and 1’s.
14. Construct PDA for L={anbm cn+m| m,n≥1}
15. Using the following grammar derive the string ((a,a),a) using left most derivation and also draw a
parse tree.
S → (L) | a L → L,S | S (3+3)
16. Construct PDA for L={anb2n | n≥1}
17. For the Grammar S->A1B, A->0A/ε, B->0B/1B/ε. Find the Left -Most and Right-Most derivation
of the following string 00101.
18. Convert the given grammar S→0S1 | A, A→1A0 | S | ε to its equivalent PDA.
19. Convert the following grammar into CNF form.
S → cBA | A, A→cB | AbbS, B→aaa
20. Design a Turing machine to implement the function f(x)=x+1
21. State and prove pumping lemma for CFL.
22. Convert the given CFG into CNF. S→AB A→bAA|aS|b B→aBB|bS|b
23. Elaborate on the process involved in converting given CFG into CNF with an example.
24. Illustrate the equivalence between PDA and CFL.
25. Write short notes on Chomsky hierarchy of grammar.
26. State and prove Rice theorem.
27. Brief the rules for drafting CFG to CNF. Elaborate with one example each.
28. Explain the diagonal language Ld.
29. Prove Lu is recursively enumerable.
30. Discuss undecidable problem about Turing machine.
PART – C
1. Prove that if L is accepted by an NFA with ε-transitions, then L is accepted by a DFA.
2. Explain different forms of proofs with examples.
3. Problems on ε –NFA to DFA and NFA to DFA
4. Design a DFA to accept string having even number a’s and b’s over the alphabet {a,b}. Check
the given string abaabbab is accepted by the DFA.
5. Find the Regular Expression for the given DFA using Rij method.
0 1
→q0 q1 q0
z q1 q1
6. Find the minimum state DFA for (ab)*abb.
7. Using Pumping lemma for the regular languages, prove the following language L={ambn | m>n}
is not regular.
8. Conversion of Finite Automata to Regular Expression.
b. Find the Regular Expression for the given DFA using state elimination method.
9. Find the minimum state DFA for (0+1)*10.
10. If L is accepted by some PDA N which is accepting by empty stack then there exist an equivalent
PDA P to accept the same language by entering into final state. Prove.
11. Convert the following PDA M to CFG.
δ(q0,0,Z0) = {( q0,X Z0)}
δ(q0,0,X) = {( q0,X X)}
δ(q0,1,X) = {( q1, ε)}
δ(q1,1,X) = {( q1, ε)}
δ(q1, ε,X) = {( q1, ε)}
δ(q1, ε, Z0) = {( q1, ε)}
12. Let G be defined by using the following productions,
S→bA | aB A→bAA | aS | a B →aBB | bS | b
For the string aaabbabbba find i) Left most derivation ii) Right most derivation iii) Parse Tree
(3+3+4)
ii) Right most derivation
iii) Parse Tree
13. Prove that if there exists a PDA P that accepts a language by final state then there exists an equivalent
PDA N that accepts the same language by empty stack.
14. Design a PDA to accept the following language.
L={wwr | w ε (0,1)*}
15. If L is accepted by some PDA N which is accepting by empty stack then there exist an equivalent PDA
P to accept the same language by entering into final state. Prove.
16. Convert the following grammar into GNF.
X1→X2X3
X2 → X3X1 | b
X3→ X3X1 | a
17. Design a TM to perform proper subtraction.
18. Convert the following CNF into GNF.
S→AB
A → BS | b
B→ SA | a
19. Design a TM to verify the set of parentheses is balanced. Also write the configurations of TM for the
string w = (()()) (6+4)
20. Find the Greibach Normal form for the grammar
S→AA | 1 A→SS | 0
21. Prove the universal language L is recursively enumerable but not recursive.
22. State and prove Rice Theorem.
23. Discuss on undecidable problems about Turing Machine.
24. Prove Lne is recursively enumerable.
25. Discuss NP- Class problem with an example.
26. Problems on Post Correspondence Problem(PCP)