NATIONAL INSTITUTE OF TECHNOLOGY JAMSHEDPUR
Department of Computer Science and Engineering
Spring Mid Semester Examination -2023
MCA (2nd Year): 4th Semester Course Code: CA3405
Course Name: Finite Language and Automata Theory Time: 2:00 Hours
Name of Faculty: Dr. Jitesh Pradhan Max. Marks: 30
Note: First six questions are compulsory.
Question seven has two parts, please attend only one part.
Please draw neat and clean transition diagrams while answering the questions.
Qus. 1: Construct a DFA accepting all strings over {0, 1} ending with 010 or 0010. Also write the 3
regular expression for the same.
Qus. 2: Using pumping lemma, show that the following set is not regular: 3
L = {an bm | 0 < n < m}.
Qus. 3: Using the principle of mathematical induction, prove that: 3
1² + 2² + 3² + .... + n² = (1/6){n(n + 1)(2n + 1} for all n ∈ N.
Qus. 4: Show that there do not exist two integers n, m ∈ Z such that (n4 − 4m) = 2. 3
Qus. 5: If A = {a, b} and B = {b, c}, find: (A∩B)*, ((A*)∩(B*)), and ((A-B)*∪(B-A)*). 3
Qus. 6: Consider the language L = {w ∈ {a, b} * | w does not contain three or more consecutive 1’s}. 3
Find the regular grammar that will generate all the strings of L and design a minimal DFA
that will accept L.
Qus. 7: Consider the regular expression: RE = 00(0+1)*(01+10)(0+1)*, design the following 12
machines:
a) ∈ - NDFA that will accept the language generated by RE.
b) NDFA equivalent to the ∈ - NDFA generated in the 7. (a).
c) DFA equivalent to the NDFA generated in the 7. (b).
d) Minimal DFA equivalent to the DFA generated in the 7. (c).
OR
a) Let G = ({A, B, C, D}, {a, b}, P, A), where P consist of: A → aA | bB, B → aC | aD, 6
C → a | bB | bD, D → b | bA. Construct a NDFA accepting L(G) and find its equivalent
minimal DFA representation.
b) Construct a regular grammar accepting L = {w ∈ {a, b}* | w is a string over {a, b} such 3
that number of b’s is 3 mod 4}.
c) Consider the following Deterministic Finite Automation M: 3
Find the regular expression of M. Let us assume that S denotes the set of seven-bit binary
strings in which the first, fourth, and last bits are 1. Find the number of strings in S that are
accepted by M.