Assignment - 1 TOC
Assignment - 1 TOC
Assignment – 1
c. Construct a Mealy’s Machine that takes a binary number as input and produces
2’s Complement of that number as output. Assume that the string is read from
Least Significant Bit (LSB) to Most Significant Bit (MSB) and end carry is
discarded.
d. Construct a Moore’s Machine that takes set of all string over ∑ = {0,1} and
produces “A” as Output if string ends with “10” or produces “B” as Output if
the String ends with “11” other produces “C”.
e. Construct an NFA over ∑ = {a,b} for set of all strings in which 3rd symbol from
the Right Hand Side (RHS) is “a”.
f. Convert the following Regular Expression to DFA.
a (a + b)* b + b (a + b)* a.
10. Construct a Context Free Grammar (CFG) for the following defined over ∑ = {a, b}:
1. L = {ai bj ck | i = j + k}
2. L = {ai bj ck | i = j or j = k}
3. L = {ai bj ck | j > i + k}