Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
92 views6 pages

Theory of Computing Question

Theory Of Computing Question
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
92 views6 pages

Theory of Computing Question

Theory Of Computing Question
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 6
Depart; ment of C, Mawl ‘Omputer Sci ineeri vn at Sn on Egerig : i See Code: cse.giyt | Str BS. (Engg) Final Exam om 20 ime: 3 hours Course Title: Theory of Computing Total marks: 70 Ans, ‘wer any 7 (Seven) from the followi 1g questions. Se *equence must be maintained w answering each question, 1. a) Define th © follows (Alphas msn the const of auomaa henry 3 (ii) Languages (iii) Problems ») Us edges» Net induction prove the statement “Every tee has one more node than thas 3 9 i *) Explain different types of proof that often occur inthe theory of computation. 4 2 - in For any two sets 4 and B, prove that, AUB = ANB. 5 )Define finite automaton, Design a five-state machine which acceps all he strings that start 5 and end with the same symbol 3. a) The following are the state diagrams of two DFAs Mi and M2. Answer the following 4 questions about each of these machines. What isthe start state? What isthe set of accept states? ‘What sequence of states does the machine go through on input aabb? Does the machine accept the string aabb? ‘v. Does the machine accept the string €? ).“Non-determinism is a generalization of determinism” — Justify this statement. 3 ©). Give the formal definition ofthe following NFA. 3 ep 6 3 4, a) Prove that, the class of regular languages is closed under union operation. b) Convert the following NFA into an equivalent DFA. 5 a) °) a) ») b) =) b) b) °) What is a regular expression? Mention its application areas. Prove that, ifa language is described by a regular expression, then it is regular. Convert the regular expression (a U ab)*aba to an equivalent NFA. Define Context Free Grammar (CFG). Design CFGs generating the following languages: (i) The set {0°I"| n>~ 1}, is the set ofall strings of one or more 0's followed by an equal number of 1’s (i) The set strings of « and 6 of the form ab” where x= 2y Describe the languages accepted by the following grammars: @ — S+bSb)A Anadle (ii) SaSbs|bSaS|e What is Chomsky Normal Form (CNF)? Why should non-generating symbols have to eliminate before non-reachable symbols to eliminate useless symbols? Begin with the grammar S=ASBle AnaAS\a B-SbS|A|bb (i) Eliminate production (ii) Eliminate any unit productions in the resulting grammar (iii) Eliminate any useless symbols in the resulting grammar (iv) Put the resulting grammar into CNF Design a PDA that recognizes the language{0"1"|n > 0). Give the formal definition of Turing Machine(TM). Elaborate the transition function, ‘A Turing Machine (TM) can do everything that a real computer can do ~ Justify this statement. Briefly explain the configuration of a TM. How can you define algorithm? What do you know about Hilbert’s problem and Church- Turing thesis? / oF | gv ce Department of Computer Science and Engineering C haan Bhashani Science and Technology University 'Year 1* Semester B.Sc. (Engg,) Final Examination, 2019 Fad Tie: Theory ‘of Computation Course Code: CSE-3111 a . Total marks: 70 : [Answer any seven questions and answer all parts of a question consecutively) 7 2 Expl fave traditionally central ereas of ths theory a8X|b; X>Xbla b) Explain ambiguity in context free grammar with appropriate example. ©) Convert the following context free grammar (CFG) into Chomsky normal form (CNF)- S$ ASB AaaAS|ale B-»SbS|A [bb 8° a) Write the formal definition of Push Down Automata (PDA). 'b) Design a {ush Down Automata (PDA) p to accept the language Layer = (wo | wis in O41)*} 9 9) Prove that, Apr4 is a decideble language. 'b) Discuss the diagonalization method with proper example, ©) Explain parse tree with examples. 4 oS partme, ‘nt of Com, ‘i favilana Bhashans Putt Science and Engineering 3" Year 1 ‘cience and Technolog : Sameer gy University : Su Cod: ese 14 - Se. Engg.) Final Examination 2018 \ e | hours Course Title: Theory of Computation : Full Marks: 70 1. a) Expinng (Answer Any Seven from the following questions) : ° i 2) Sie dito ot Posed ofa bas aomsoamahine 3 | poe nce 8 hore Ue inition to prove tat fr every 4 Soa isa factor of a" b", escribe the star ‘closure and positive closure. operation in Language. 3 2 a) Desi iy ne ‘an NFA to accept All strings containing exactly 4 0s of an even number of Is. 2 esign NFA or DFA to accept all strings that has contains an even number of 0s or 2 ‘exactly two Is. ©) Prove that the following DFA accepts, L = {w|w contain the substring 0101). 6 3. a) For the following language L, construct a NFA that accepts the language where 3 alphabet is (0,1). L = {w |w from RHS 2% symbol is‘) Give formal definition forthe following NFA. b ¢) Convert this NFA to an equivalent DFA by subset construction. 4 0, Sew) 01 0 Co 4. a) For the following regular expressions, give two strings that are members and two 3 strings that are not members of the language described by the expression, 1 (aU bau bb)(a Ub) = and the alphabet is ={a, b}.' | b) Convert the following regular expressions to a NFA. | (0u1)+00000U1) + c) Convert the following DFA to a regular expressiba. Pagelof2 = 5. a) by ») °) a) b) ») 9 a) b) ° Describe the pigeonhole principle, Explain how i relate with the pumping lemma, ie oper Jemma to prove that the following languages are not regular. Give formal definition of context free grammar for the following set of rules. S$ 3 05|14| € A OBIS" B > 0Alia Construct context-free grammars that generate the following language. Alphabet = {0,1}. L(G) = {WW?: W € {a,b} »). Explain ambiguity in context free grammar with example Let G = (V,_,R,S) be the context-free grammar, Where V = {4,B,5), Alphabet = {a,b), Sis the start variable, and R consists of the below rules. Prove that ababba belongs to L(G). S > aB\bA A > alaS|BAA B ~ bjbs|ABB State the properties of the formal definition of Pushdown Automata. Design a Push Down Automata (PDA) to recognize the following language, L={a™b"|m 1}. Draw transition diagram of this Turing Machine. Construct a turing machine to compute the function f(x,y) = x+y ‘When can we say that a language is decidable? Let L = {w:w is a prime number}. Prove that L is decidable. EQUALpe4 = ((My, Mz): My and M; are DFAs that accept the same languages} isa DFA. Reduce it if possible. Define Additive and Constant factor approximation algorithms with example. ae _— y Department of Co Mawlana Bhashani 3 Year 1* Semest mputer Science and Engineering Science and Technology University Course Code: CSH 311 er B.Sc, (Engg,) Final Examination 2017 Time: 3 Hours Course Title: Theory of Computing 1 a) b) a) b) a) b) °) a) b) . a) b) a) ») a ») °) D) ») a) ») Total Marks: 70 (Answer any seven from the following questions) What are the traditionall : th ly central areas of theory of computation? How they are 6 linked? Briefly describe them with the central eine fine the following terms: Sequences, Tuples, Strings and Languages. A For any two sets A and B, prove that AUB = A nB. 7 What are the different types of Proof? Briefly explain Proof by Contradiction. 5 What do you understand by Finite Automata? With state disgram show the 4 ‘example of an automatic door controller. Give the formal definition of computation of a finite state machine. 3 How to design finite automata? 3 Prove that the class of regular languages is closed under union operation. 5 Non-determinism is a generalization of determinism. Justify this statement. 5 Give the formal definition of non-deterministic finite automata (NFA). How 5 NFA does differ from DFA? Construct a DFA for the language L = {a"b, n>=0} 5 What is a regular expression? Mention its application areas. 5 Prove that, if a language is described by a regular expression then itis regular. 5 Define Context-Free Grammar formally. 3 Prove that the language {On In2n: n20} is not context-free. 5 Give a CFG for all binary strings with an even number of O's. 2 Give the formal definition of Push Down Automata(PDA). What are the 5 advantages of PDA over NFA? Give the formal definition of Turing Machine(TM). Elaborate the transition 5 function of a TM. Construct a Turing Machine to accept palindromes in an alphabet set 2={a,b}. 6 Trace the strings “ab” and “abba”. Which language is Recursively Enumereble? What are the properties of 4 recursively enumerable languages?

You might also like