LOYOLA COLLEGE (AUTONOMOUS), CHENNAI – 600 034
|
B.Sc. DEGREE EXAMINATION –MATHEMATICS
FIFTH SEMESTER – APRIL 2007
MT 5404 – FORMAL LANGUAGES AND AUTOMATA
Date & Time: 04/05/2007 / 1:00 – 4:00 Dept. No. Max. : 100 Marks
PART A
Answer all questions. Each question carries two marks. 10×2=20
- Define context – free grammar and give an example.
- Write a grammar to generate all palindromes over {a,b}
- Show that every regular language is a context free language.
- Define the concatenation of two languages and give an example.
- Show that the PSL is closed under reflection.
- Define an unambiguous grammar.
- Show that SSS, Sa, Sb is ambiguous.
- Construct a finite automation that accepts exactly those input strings of 0’s and 1’s that end in 11.
- Construct a DFA to test whether a given positive integer is divisible by 2.
- Define a non – deterministic finite automation.
PART B
Answer any five questions. Each question carries 8 marks. 5×8=40
- Prove that PSL is closed under union.
- Let G be a grammar with SAaS|SS|a, ASbA|SS|ba. For the string aabbaaa find
- a left most derivation
- a right most derivation
- Construct a grammar G for the language L(G) = {anbam / n, m 1}
- Discuss about the Chomskian hierarchy
- Prove that L={ai / i is a prime} is not a CFL.
- Give an ambiguous and an unambiguous grammar to generate L={anbn / n1}.
- Construct a DFA to test whether a given positive integer is divisible by 3.
- Give a deterministic finite automation accepting the set of all strings over {0,1} with three consecutive 0’s.
PART C
Answer any two questions. Each question carries 20 marks. 2×20=40
- a) Write a note on the construction of CNF
- b) Find a grammar in CNF equivalent to a grammar whose productions are
SaAbB, AaA|a, BbB|b (5+15)
- State and prove uvwxy theorem.
|
|
- Construct a DFA for the NDFA given below
a b
- a) Construct a DFA accepting all strings over {0,1} having even number of 0’s.
- b) Let G = ( N, T, P, S), N = {S, A}, T = {a,b}, P = { SaA, A bS, Ab}.
Find L(G) and also construct an NDFA accepting L(G) (10+10)
Latest Govt Job & Exam Updates: