Professional Documents
Culture Documents
Formal Languages & Automata Theory (BTCS-T-PC-015) - End Term Exam - 2022-2023
Formal Languages & Automata Theory (BTCS-T-PC-015) - End Term Exam - 2022-2023
Formal Languages & Automata Theory (BTCS-T-PC-015) - End Term Exam - 2022-2023
1 Answer All
a Differentiate DFA, NFA with respect to their transition function.
1
b Construct a DFA that accept set of string starting with 0 and not ends with 1 over Σ = {0,
1
1}.
c Write Regular Expression for the language that contains a set of string over a's and b's
1
where the third character from the beginning is a.
d What is the difference between the number of states of minimized DFA accepting the
1
laguage generated by the regular expression (a + b) and (a + b) * ?
e Construct CFG for the language L= { x ϵ {0, 1}* | x has equal number of 0's and 1's}.
1
f When a grammar is called left recurssive. How to remove direct left recursion.
1
g What is Instantaneous Descriptions (ID) of Turing machine. Dicuss with one example.
1
h What is a Turing Machine with STAY option. How it can be simulated with a standard
1
Turing machine.
i
Which of the following is true for the language L = { ap | p is a prime number } 1
a. It is not accepted by a Turing Machine
b. It is regular but not context-free
c. It is context-free but not regular
d. It is neither regular nor context-free, but accepted by a Turing machine
j Let P be a regular language and Q be context-free language such that Q ⊆ P. (For example,
1
let P be the language represented by the regular expression a*b* and Q be {anbn | n >= 0).
Then which of the following is ALWAYS regular?
a. P ∩ Q
b. P – Q
c. ∑* – P
d. ∑* – Q
2 Answer All
a Construct a DFA that accept all binary string starts with 10 over Σ={0,1}.
3
b Find regular expression for the following NFA usin Arden's theorem.
3
c If, G = (V ,Σ , P , S ) where R ={ S → aS b, S →ε }
1 1 1 1 1 1 1 1 1 3
G2= (V2,Σ2, P2, S2) where R2 ={ S2 → cS2d, S2 →ε }
Then find L(G) = L(G1) ∪ L(G2).
d Convert the following grammar into an equivalent one with no useless productions:
3
S → aaB | abA | aaS
A → aA
B → ab | b
C → ad
e State the Post correspondence problem. Find the solution for the instance of PCP with A =
3
(a, b, ca, abc) and B = (ab, ca, a, c). [P. T. O.]
3 Answer any One
a
7
State 0 1
-------
-> A B F
B G C
*C A C
D C G
E H F
F C G
G G E
H G C