Formal Languages & Automata Theory (BTCS-T-PC-015) - End Term Exam - 2022-2023

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

Silicon Institute of Technology

Silicon Hills, Bhubaneswar


| An Autonomous Institute |

5th Semester B.Tech. End Term Examination 2022-23


Formal Languages & Automata Theory(BTCS-T-PC-015)
Duration: 03:00 Full Marks: 60

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

Convert the given epsilon NFA to its corresponding DFA.


b Minimize the following DFA .
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

(A is the initial state and C is the final state)


4 Answer any One
a Prove that the Class of Regular language are closed under concatenation and star operation.
7
b
Show that L = {ap | p is a prime} is not regular. 7
5 Answer any One
a Convert the following grammar to its equivalent grammar in CNF. (Here Ʌ stand for
7
epsilon)
S → aY | Ybb | Y
X → Ɛ|a
Y → aXY | bb | XXa
b Using the CYK algorithm determine, whether the string w = “aabbb” is in the language
7
generated by the given grammar:
S → AB
A → BB | a
B → AB | b
6 Answer any One
a
Design a PDA for L = {anbncm | for all m,n >0 }. Process the string "abbc" using 7
Instantaneous Description (ID) of the PDA.
b State and proof Pumping Lemma for Context Free Languages.
7
7 Answer any One
a For any nonmpty alphabet Σ, show that there exist languages that are not Recursively
7
Enumerable. Show that the language L = { < G, w > | G is a CFG that generates w } is a
Recursive language.
b Define Turing Decidable and Turing Recognizable lanuage. How these class of languages
7
are related to each other. Also prove that,
L= { < R, w> | R is a Regular Expression that generates w } is Turing decidable.

You might also like