Download as pdf
Download as pdf
You are on page 1of 15
Module 1. Module 2. Module 3. Module 4. Module §. Module 6. Module 7. ~ Syllabus ~ Basics of Strings and Alphabets Finite Automata — DFA, transition graphs, regular languages, non deterministic FA, equivalence of DFA and NDFA. Regular grammars, regular expressions, equivalence between regular languages, properties of regular languages, pumping lemma. Context Free Languages — Leftmost and rightmost derivation, parsing and ambiguity, ambiguity in grammar and languages, normal forms Pushdown Automata - NDPDA, DPDA, context free languages and PDA, comparison of deterministic and non-deterministic versions, closure properties, pumping lemma for CFL. Turing Machines, variations, halting problem, PCP. Chomsky Hierarchy, LR(k) Grammars, properties of LR(k) grammars, Decidability and Recursively Enumerable Languages LOWS Theory of Computation PUNJAB TECHNICAL UNIVERSITY QUESTION PAPERS UNIVERSITY QUESTION PAPER, DEC.-2014 SECTION-A @ 1. (a) What is.a string ? Ans. Refer to Chapter No. 1 Q.No. 1(2) on Page No. 1 (b) What is the criteria for acceptability of a string by a finite automaton ? {ns. A string is accepted by the automaton if and only it automaton halts in an accepting state after reading the string. The set of accepting states is denoted by F, and the correspondence between the two models is given by F = {a Q/ MQ) = 1) Thus a finite automaton is formally defined as a 5 - tuple (Q, E, 5+ dor (c) Define a phrase structure grammar. ‘Ans. Refer to Chapter No. 7 Q.No. 22 (Point no. 4) on Page No. 104 (d) What are recursively enumerable sets ? ” ‘ans. A recursively enlmerable set is a set whose members can simply be numbered More formally, a recursively enumerable set is a set for which there exist a mapping between every of its elements and the integer numbers. (e) Define terminal and non-terminal symbol. tans. A terminal symbol is a unique indivisible object used in the generation of strings. A noneterminal symbol is a unique object but divisible, used in the generation of string. A non- terminal symbol will be constructed from the terminal symbols; the number of terminal symbols ina nonterminal symbol may vary; it Is also called a variable. (f) What is a transition graph ? ‘Ans. Refer to Chapter No. 2 Q.No. 13(a) (g) What is a derivation tree ? ‘Ans. Refer to Chapter No. 4 Q.No. 30 on Page No. 57 (h) Define leftmost and rightmost derivation. ‘Ans. Refer to Chapter No. 4 Q.No. 33 on Page No. 58 (i) State pumping lemma for regular sets. ‘Ans. Pumping lemma for regular sets : Let L be a regular set, then there is a constant n such that if z is a word in L, and IzI>n, we may write z = uvw in such a way that luvisn, vi21 and for all iz0 uv'w is in L. () What is Chomsky Normal Form ? ‘Ans. Refer to Chapter No..4 Q.No. 38 on Page No. 60 SECTION -B Q 2. What is Post correspondence Problem ? Ans. Refer to Chapter No. 6 Q.No. 54 on Page No. 96 5 F). on Page No. 8 Toc LORDS Theory of Computation boDparaornm lar language te the properties of regu fe foter to Chapter No. 3 Q.No. 28 on Page No. 34 annals grammar S -> SbSla, show G Is ambiguous. oso prove that G is ambiguous, we have to find a weL(G), which is ambi ci ee ppababacL(G), Then we get two derivation trees for w. Thus, G is ambiguous consider w = sep ‘Two derivation trees of abababa 5. Give regular expression to each of subsets of {a,b} (a) Set of all strings containing exactly 2a's (b) Set of all strings containing substring aa. Ans. (a) btab‘ab* {b) (a+b)" aa (a+b) 6. Discuss the relation between languages and types of automata with help of diagram. ‘Ans. Refer to Chapter No. 7 Q.No. 22 on Page No. 103 SECTION-C Q’7. Show the equivalence of DFA and NDFA. ‘Ans. A DFA can simulate the behaviour of an NFA by increasing its number of states The DFA does not contain any null move and any transitional functions of a state and input Teaching to more than one states, ‘i ‘ita language L is accepted by an NOFA, then there exists a DFA that accepts L' . Let M be an NDFA denoted by (Q, £, 8, do, F). which accepts L.. We construct a DFA M' = (Q',£, 8 q', F'} Where Q' contains the subsets of Q, ie., Q’ = 20 Q! may be denoted by [44,q5, ... Init tate qe ie [a1da, ... dq] @8 a single state where Gda, Gn € Q Final state F’ = set of all states in Q\ contain Transiona ineton ie ees taining at least one final state of M. 8 (041, ay nn Qpha) = [P1,P2, Toc

You might also like