Mid Sem TOC
Mid Sem TOC
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
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.
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}.
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.