You are on page 1of 11
Registration No.:__\\S ors \ PNR No:: 116172CSE40914 COURSE CODE : CSE322 COURSE NAME : FORMAL LANGUAGES AND AUTOMATION THEORY Time Allowed: 01:30 hrs Read the following instructions carefully before attempting the question paper. 4. This question paper divided into two parts A and B. 2. Part A contains 5 questions of 2 marks each. All questions are compulsory. 3, Part B contains 3 questions of 10 marks each. In each question attempt either ‘question (a) or (b), incase both (a) and (b) questions are attempted for any question then only the first attempted question will be evaluated. Max. Marks: 40 4, Answer all questions in serial order. 5, Do not write or mark anything on the question paper except your registration number at the designated space. PARTA Qt a) Differentiate between NFA and DFA? [2 Marks] b) Differentiate between Mealy and Moore Machine. [2 Marks] c) Find out the regular expression for the given regular set. L={1, 01, 10, 010, 0010, .... [2 Marks } @ Sel of Strings of a's and b's ending withthe string abb. So L = {abb, aabb, babb, aaabb. ababb,...} ipa peste e) Define Type-0 Grammar [2 Marks ] PARTB Q2.a) Construct the minimum state deterministic finite Automation equivalent to the following transition diagram {10 Marks] start ® i 1S Marks] i ie a a Construct a Mealy Machine equivalent to the Moore machine given in the following Present |W | Sexe “Tass roe q Fao lap tas |@ G1 [qs [qo {> G2_ | q4 [ae a qs zene en 2 (5 Marks} Q3 a) Construct the NFA from given RE : (atb)*+a*b(aa)* [10 Marks | oR 'b) (i) Show that L = {0'l 41} is not regular. [5 Marks’ (ii) Describe the following sets by regular expressions: (a) (101 } (b) fabba} (c) {01,10} [5 Mart (d) fabb,2, b, bba} (9) (1, 11, 111, .....3 Q4 a) Find a regular expression conesponding to each of the following subsets of {a. b}. (a) The set of all strings containing exactly 2 a's (b) The set of all strings containing at least 2a's Ic) The set of all strings containing at most 2a! s. Cd) The set of all strings containing the substring ea. (ON OR b) (i) Explain chomsky classification of languages (li) construct a regular grammar G generating the P=b'a(b+a)* oo — End of Q M Y. > Registration No, | 1% o\! SS" PNR No:: 116162CSE27744 COURSE CODE : CSE322 COURSE NAME : FORMAL LANGUAGES AND AUTOMATION THEORY Time Alfowed: 01:30 hrs Max Merks 40 1. This paper divided a tro parte A and 8