DHANALAKSHMI SRINIVASAN INSTITUTE OF RESEARCH AND TECHNOLOGY SIRUVACHUR, PERAMBALUR DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
|
|
- Duane Parker
- 6 years ago
- Views:
Transcription
1 DHANALAKSHMI SRINIVASAN INSTITUTE OF RESEARCH AND TECHNOLOGY SIRUVACHUR, PERAMBALUR DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING Third Year CSE( Sem:V) CS2303- THEORY OF COMPUTATION PART B-16 MARKS UNIT-I AUTOMATA 1.If L is accepted by an NFA with ε-transition then show that L is accepted by an NFA without ε-transition. 1.Write the NFA regular expression. 2. Prove the Relation. 2. Construct a DFA equivalent to the NFA. M=({p,q,r},{0,1}, δ,p,{q,s}) Where δis defined in the following table. δ 0 1 p {q,s} {q} q {r} {q,r} r {s} {p} s - {p} 2.Write the tuples of NFA. 3.Find the States. 4.Draw the equivalent DFA diagram 3. Show that the set L={a n b n /n>=1} is not a regular. (6) b)construct a DFA equivalent to the NFA given below: (10) 0 1 p {p,q} P q r R r s - s s S 2.Write the tuples of NFA. 3.Find the States.
2 4.Draw the equivalent DFA diagram 4.Check whether the language L=(0 n 1 n /n>=1) is regular or not? Justify your answer. 1.Assume the regular function. 2.Find the value of W. 3.Prove the Condition. 4.Apply the value k=0,1,2. 5.By the values of xy k z it is identified the function is regular or not. 4. Define NFA with ε-transition. Prove that if L is accepted by an NFA with ε- transition then L is also accepted by a NFA without ε-transition. NFA- ε theorem. 5. Construct DFA equivalent to the NFA given below: 2.Write the tuples of NFA. 3.Find the States. 4.Draw the equivalent DFA diagram 6. Prove that a language L is accepted by some ε NFA if and only if L is accepted by some DFA. NFA Language theorem. 7. Consider the following ε NFA.Compute the ε closure of each state and find it s equivalent DFA. ε A b C p {q} {p} Ф Ф q {r} ф {q} Ф *r Ф ф ф {r}
3 2.Write the tuples of NFA. 3.Find the Existing or new States 4.Draw the equivalent DFA diagram 8. Convert the following NFA to it s equivalent DFA 0 1 p {p,q} {p} q {r} {r} r {s} ф *s {s} {s} 2.Write the tuples of NFA. 3.Find the Existing or new States 4.Draw the equivalent DFA diagram UNIT-II REGULAR EXPRESSIONS AND LANGUAGES 1.Construct an NFA equivalent to (0+1)*(00+11) 1.Find the function for each value. 2.Identify the cases. 3.Draw the diagram based on the function. 2.Construct a Regular expression corresponding to the state diagram given in the following figure. 1.Find the Appropriate Cases for the Given function. 2.Eliminate the states one by one. 3.Write the final R value.
4 3. Show that the set E={0 i 1 i i>=1} is not Regular. 1.Assume the regular function. 2.Find the value of W. 3.Prove the Condition. 4.Apply the value k=0,1,2. 5.By the values of xy k z it is identified the function is regular or not. 4. Construct an NFA equivalent to the regular expression (0+1)*(00+11)(0+1)*. 1.Find the function for each value. 2.Identify the cases. 3.Draw the diagram based on the function. 5.Obtain the regular expression denoting the language accepted by the following DFA by using the formula Rij k 1.Write the General formula for the conversion of Finite automata to regular expression. 2. Find the value of i,j,k. 3.Find the value by applying k=0,1 4.Apply the values in the formul and find the final regular expression R. 6. Define a Regular set using pumping lemma Show that the language L={0i 2 / i is an integer,i>=1} is not regular 1.Assume the regular function. 2.Find the value of Wand states as n=2. 3.Prove the Condition. 4.Apply the value k=0,1,2. 5.By the values of xy k z it is identified the function is regular or not 7.Find whether the following languages are regular or not. (i) L={w ε{a,b} w=w R }. (ii) L={0 n 1 m 2 n+m,n,m>=1} (iii) L={1 k k=n 2,n>=1}. (4) (iv) L1/L2={x for some y εl2,xy εl1},where L1 and L2 are any two languages and
5 L1/L2 is the quotient of L1 and L2. 1.Assume the regular function. 2.Find the value of Wand states as n=2. 3.Prove the Condition. 4.Apply the value k=0,1,2. 5.By the values of xy k z it is identified the function is regular or not UNIT-III CONTEXT FREE GRAMMARS AND LANGUAGES 1. Let G be a CFG and let a=>w in G. Then show that there is a leftmost derivation of w. Theorem of CFG. 2. Let G be a grammar s->ob/1a, A->O/OS/1AA, B->1/1S/OBB. For the string find its leftmost derivation and derivation tree. 1.Find the left most derivations. 2.Write the Right most derivations for the tree. 3.Construct the accurate derivation tree. 3. If G is the grammar S->Sbs/a, Show that G is ambiguous. 1.Find the left most derivations. 2.Write the Right most derivations for the tree. 3.Construct the accurate derivation tree. 4.Show that E->E+E/E*E/(E)/id is ambiguous. 1.Find the First left most derivations. 2.Find the Second left most derivations. 3.Construct Parse tree for the left most derivations and Right most derivations. 5.Construct a Context free grammar G which accepts N(M), where M=({q0, q1},{a,b},{z0,z},δ,q0,z0,φ) and where δ is given by δ(q0,b,z0)={(q0,zz0)} δ(q0, ε,z0)={(q0, ε)} δ(q0,b,z)={(q0,zz)} δ(q0,a,z)={(q1,z)} δ(q1,b,z)={(q1, ε)} δ(q1,a,z0)={(q0,z0)}
6 1. Construct a Context free grammar. 2. Apply the formula. 6. If L is Context free language then prove that there exists PDA M such that L=N(M). Context free language Theorem and its steps. 7. Construct a PDA accepting {a n b m a n /m,n>=1} by empty stack. Also construct the corresponding context-free grammar accepting the same set. 1.Write the Appropriate CFG. 2.Find the Values. 8. Find the left most and right most derivation corresponding to the tree. 1.Find the First left most derivations. 2.Find the Second left most derivations.
7 UNIT-IV PROPERTIES OF CONTEXTFREE LANGUAGES 1.Convert to Greibach Normal Form the grammar G=({A1, A2, A3},{a,b},P,A1 ) where P consists of the following. A1 ->A2 A3, A2 - >A3 A1 /b,a3 ->A1 A2 /a. 1. Write the grammar definition. 2. Find the form of a grammar. 3. Replace the variables. 4. Construct the GNF. 2.Convert the grammar S->AB, A->BS/b, B->SA/a into Greibach NormalForm 1. Write the grammar definition. 2. Find the form of a grammar. 3. Replace the variables. 4. Construct the GNF.. 3.Construct a equivalent grammar G in CNF for the grammar G1 where G1 =({S,A,B},{a,b},{S->bA/aB,A->bAA/aS/a, B->aBB/bS/b},S). 1. Write the grammar definition. 2. Find the form of a grammar. 3. Replace the variables. 4. Construct the GNF. 4.Begin with the grammar S->0A0/1B1/BBA->CB->S/AC->S/ ε and simplify using the safe order Eliminate ε-productions Eliminate unit production Eliminate useless symbols Put the (resultant) grammar in Chomsky Normal Form. 1. write down the start variable 2. find a rule and replace 3.find a rule and replace 4.find a rule and replace 5.find a rule and replace. 5.Explain the Construction of an equivalent grammar in CNF for thegrammar G=({S,A,B}{a,b},P,S) where P={S->bA ab, A->bAA as a, B->aBB bs b} (10) 1. write down the start variable 2. find a rule and replace 3.find a rule and replace 4.find a rule and replace 5.find a rule and replace.
8 UNIT-V UNDECIDABILITY 1.Define the language Ld and show that Ld is not recursively enumerable language. Recursively enumerable Languages M is said to generate a string w if and only if at some point M writes w# on the output tape. G(M) = {w M generates w} Note: M need not generate strings in order. It is also possible that M generates some strings many times! Definition: L is recursively enumerable (r.e.) iff there is a TM M such that L = G(M). 2.Explain the Halting problem. Is it decidable or undecidable problem. In computability theory, the halting problem is the problem of determining, from a description of an arbitrary computer program and an input, whether the program will finish running or continue to run forever. Alan Turing proved in 1936 that a general algorithm to solve the halting problem for all possible program-input pairs cannot exist. A key part of the proof was a mathematical definition of a computer and program, which became known as a Turing machine; the halting problem is undecidable over Turing machines. It is one of the first examples of a decision problem. 3.Define Universal language Lu.Show that Lu is recursively enumerable but not recursive. The Universal Language Lu is a set of binary strings which can be modeled by a turning machine. 4.Obtain the code for the TM M=({q1,q2,q3},{0,1},{0,1,B}, δ,q1,b,{q2}) With the moves δ(q1,1)=(q3,0,r) δ(q3,0)=(q1,1,r) δ(q3,1)=(q2,0,r) δ(q3,b)=(q3,1,l) δ(q3,b)=(q3,1,l) 1. Identify the mapping Function. 2. Note the codes for function. 3. The code for Tm can be written.
9 5. Define Ld and show that Ld is not recursively enumerable. Recursively enumerable Languages M is said to generate a string w if and only if at some point M writes w# on the output tape. G(M) = {w M generates w} Note: M need not generate strings in order. It is also possible that M generates some strings many times! Definition: L is recursively enumerable (r.e.) iff there is a TM M such that L = G(M). 6.Define the universal language and show that it is recursively enumerable but not recursive. A language is recursively enumerable if some Turing machine accepts it Let be a L recursively enumerable language and the Turing Machine that accepts it M w L w if then halts in a final state M if w L then M halts in a non-final state or loops forever. 7.State and Prove Rice s Theorem for recursive index sets. It is more complicated to find out whether L is or is not recursively enumerable (rec. enum.) Rice has a theorem: L is rec. enum. if and only if satisfies 3 conditions.
VALLIAMMAI ENGNIEERING COLLEGE SRM Nagar, Kattankulathur 603203. DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING Year & Semester : III Year, V Semester Section : CSE - 1 & 2 Subject Code : CS6503 Subject
More informationROEVER COLLEGE OF ENGINEERING AND TECHNOLOGY Elambalur, Perambalur DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING UNIT-I AUTOMATA
ROEVER COLLEGE OF ENGINEERING AND TECHNOLOGY Elambalur, Perambalur 621 220 DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING Year & Semester : III / V Subject Code : CS6503 Subject Name : Theory of Computation
More informationQUESTION BANK CS2303 THEORY OF COMPUTATION
QUESTION BANK CS2303 THEORY OF COMPUTATION UNIT-I AUTOMATA PART-A(2-MARKS) 1 What is Computation? and Write short notes on TOC. 2 Define Automaton 3 Define Inductive and Deductive proof 4 Define hypothesis.
More informationR10 SET a) Construct a DFA that accepts an identifier of a C programming language. b) Differentiate between NFA and DFA?
R1 SET - 1 1. a) Construct a DFA that accepts an identifier of a C programming language. b) Differentiate between NFA and DFA? 2. a) Design a DFA that accepts the language over = {, 1} of all strings that
More informationDepartment of Computer Science and Engineering
SHRI ANGALAMMAN COLLEGE OF ENGINEERING AND TECHNOLOGY (AN ISO 9001:2008 Certified Institution) SIRUGANOOR, TRICHY 621 105 Department of Computer Science and Engineering QUESTION BANK Subject Code /Title:
More informationJNTUWORLD. Code No: R
Code No: R09220504 R09 SET-1 B.Tech II Year - II Semester Examinations, April-May, 2012 FORMAL LANGUAGES AND AUTOMATA THEORY (Computer Science and Engineering) Time: 3 hours Max. Marks: 75 Answer any five
More informationQUESTION BANK. Formal Languages and Automata Theory(10CS56)
QUESTION BANK Formal Languages and Automata Theory(10CS56) Chapter 1 1. Define the following terms & explain with examples. i) Grammar ii) Language 2. Mention the difference between DFA, NFA and εnfa.
More informationMultiple Choice Questions
Techno India Batanagar Computer Science and Engineering Model Questions Subject Name: Formal Language and Automata Theory Subject Code: CS 402 Multiple Choice Questions 1. The basic limitation of an FSM
More informationUNIT I PART A PART B
OXFORD ENGINEERING COLLEGE (NAAC ACCREDITED WITH B GRADE) DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING LIST OF QUESTIONS YEAR/SEM: III/V STAFF NAME: Dr. Sangeetha Senthilkumar SUB.CODE: CS6503 SUB.NAME:
More informationCT32 COMPUTER NETWORKS DEC 2015
Q.2 a. Using the principle of mathematical induction, prove that (10 (2n-1) +1) is divisible by 11 for all n N (8) Let P(n): (10 (2n-1) +1) is divisible by 11 For n = 1, the given expression becomes (10
More informationQUESTION BANK. Unit 1. Introduction to Finite Automata
QUESTION BANK Unit 1 Introduction to Finite Automata 1. Obtain DFAs to accept strings of a s and b s having exactly one a.(5m )(Jun-Jul 10) 2. Obtain a DFA to accept strings of a s and b s having even
More informationComputer Sciences Department
1 Reference Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER 3 D E C I D A B I L I T Y 4 Objectives 5 Objectives investigate the power of algorithms to solve problems.
More informationSkyup's Media. PART-B 2) Construct a Mealy machine which is equivalent to the Moore machine given in table.
Code No: XXXXX JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY, HYDERABAD B.Tech II Year I Semester Examinations (Common to CSE and IT) Note: This question paper contains two parts A and B. Part A is compulsory
More information(a) R=01[((10)*+111)*+0]*1 (b) ((01+10)*00)*. [8+8] 4. (a) Find the left most and right most derivations for the word abba in the grammar
Code No: R05310501 Set No. 1 III B.Tech I Semester Regular Examinations, November 2008 FORMAL LANGUAGES AND AUTOMATA THEORY (Computer Science & Engineering) Time: 3 hours Max Marks: 80 Answer any FIVE
More informationCS210 THEORY OF COMPUTATION QUESTION BANK PART -A UNIT- I
CS210 THEORY OF COMPUTATION QUESTION BANK PART -A UNIT- I 1) Is it true that the language accepted by any NDFA is different from the regular language? Justify your answer. 2) Describe the following sets
More informationClosure Properties of CFLs; Introducing TMs. CS154 Chris Pollett Apr 9, 2007.
Closure Properties of CFLs; Introducing TMs CS154 Chris Pollett Apr 9, 2007. Outline Closure Properties of Context Free Languages Algorithms for CFLs Introducing Turing Machines Closure Properties of CFL
More informationFinal Course Review. Reading: Chapters 1-9
Final Course Review Reading: Chapters 1-9 1 Objectives Introduce concepts in automata theory and theory of computation Identify different formal language classes and their relationships Design grammars
More information1. Which of the following regular expressions over {0, 1} denotes the set of all strings not containing 100 as a sub-string?
Multiple choice type questions. Which of the following regular expressions over {, } denotes the set of all strings not containing as a sub-string? 2. DFA has a) *(*)* b) ** c) ** d) *(+)* a) single final
More informationT.E. (Computer Engineering) (Semester I) Examination, 2013 THEORY OF COMPUTATION (2008 Course)
*4459255* [4459] 255 Seat No. T.E. (Computer Engineering) (Semester I) Examination, 2013 THEY OF COMPUTATION (2008 Course) Time : 3 Hours Max. Marks : 100 Instructions : 1) Answers to the two Sections
More informationFinite Automata Theory and Formal Languages TMV027/DIT321 LP4 2016
Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2016 Lecture 15 Ana Bove May 23rd 2016 More on Turing machines; Summary of the course. Overview of today s lecture: Recap: PDA, TM Push-down
More informationActually talking about Turing machines this time
Actually talking about Turing machines this time 10/25/17 (Using slides adapted from the book) Administrivia HW due now (Pumping lemma for context-free languages) HW due Friday (Building TMs) Exam 2 out
More informationTheory of Computation, Homework 3 Sample Solution
Theory of Computation, Homework 3 Sample Solution 3.8 b.) The following machine M will do: M = "On input string : 1. Scan the tape and mark the first 1 which has not been marked. If no unmarked 1 is found,
More informationCS5371 Theory of Computation. Lecture 8: Automata Theory VI (PDA, PDA = CFG)
CS5371 Theory of Computation Lecture 8: Automata Theory VI (PDA, PDA = CFG) Objectives Introduce Pushdown Automaton (PDA) Show that PDA = CFG In terms of descriptive power Pushdown Automaton (PDA) Roughly
More informationAUBER (Models of Computation, Languages and Automata) EXERCISES
AUBER (Models of Computation, Languages and Automata) EXERCISES Xavier Vera, 2002 Languages and alphabets 1.1 Let be an alphabet, and λ the empty string over. (i) Is λ in? (ii) Is it true that λλλ=λ? Is
More informationRegular Languages (14 points) Solution: Problem 1 (6 points) Minimize the following automaton M. Show that the resulting DFA is minimal.
Regular Languages (14 points) Problem 1 (6 points) inimize the following automaton Show that the resulting DFA is minimal. Solution: We apply the State Reduction by Set Partitioning algorithm (särskiljandealgoritmen)
More informationVALLIAMMAI ENGINEERING COLLEGE
VALLIAMMAI ENGINEERING COLLEGE SRM Nagar, Kattankulathur 603 203 DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING QUESTION BANK V SEMESTER CS6503 - Theory of Computation Regulation 2013 Academic Year 2017
More information1. [5 points each] True or False. If the question is currently open, write O or Open.
University of Nevada, Las Vegas Computer Science 456/656 Spring 2018 Practice for the Final on May 9, 2018 The entire examination is 775 points. The real final will be much shorter. Name: No books, notes,
More information1. Provide two valid strings in the languages described by each of the following regular expressions, with alphabet Σ = {0,1,2}.
1. Provide two valid strings in the languages described by each of the following regular expressions, with alphabet Σ = {0,1,2}. (a) 0(010) 1 Examples: 01, 00101, 00100101, 00100100100101 (b) (21 10) 0012
More informationAUTOMATA THEORY AND COMPUTABILITY
AUTOMATA THEORY AND COMPUTABILITY QUESTION BANK Module 1 : Introduction to theory of computation and FSM Objective: Upon the completion of this chapter you will be able to Define Finite automata, Basic
More informationCS 44 Exam #2 February 14, 2001
CS 44 Exam #2 February 14, 2001 Name Time Started: Time Finished: Each question is equally weighted. You may omit two questions, but you must answer #8, and you can only omit one of #6 or #7. Circle the
More informationLimitations of Algorithmic Solvability In this Chapter we investigate the power of algorithms to solve problems Some can be solved algorithmically and
Computer Language Theory Chapter 4: Decidability 1 Limitations of Algorithmic Solvability In this Chapter we investigate the power of algorithms to solve problems Some can be solved algorithmically and
More informationDecision Properties for Context-free Languages
Previously: Decision Properties for Context-free Languages CMPU 240 Language Theory and Computation Fall 2018 Context-free languages Pumping Lemma for CFLs Closure properties for CFLs Today: Assignment
More informationComputation Engineering Applied Automata Theory and Logic. Ganesh Gopalakrishnan University of Utah. ^J Springer
Computation Engineering Applied Automata Theory and Logic Ganesh Gopalakrishnan University of Utah ^J Springer Foreword Preface XXV XXVII 1 Introduction 1 Computation Science and Computation Engineering
More information1. Provide two valid strings in the languages described by each of the following regular expressions, with alphabet Σ = {0,1,2}.
1. Provide two valid strings in the languages described by each of the following regular expressions, with alphabet Σ = {0,1,2}. (a) 0(010) 1 (b) (21 10) 0012 (c) 1 (200) 100 01 Examples: 1, 200, 111,
More informationTheory Bridge Exam Example Questions Version of June 6, 2008
Theory Bridge Exam Example Questions Version of June 6, 2008 This is a collection of sample theory bridge exam questions. This is just to get some idea of the format of the bridge exam and the level of
More informationDecidable Problems. We examine the problems for which there is an algorithm.
Decidable Problems We examine the problems for which there is an algorithm. Decidable Problems A problem asks a yes/no question about some input. The problem is decidable if there is a program that always
More informationLearn Smart and Grow with world
Learn Smart and Grow with world All Department Smart Study Materials Available Smartkalvi.com TABLE OF CONTENTS S.No DATE TOPIC PAGE NO. UNIT-I FINITE AUTOMATA 1 Introduction 1 2 Basic Mathematical Notation
More informationThe Turing Machine. Unsolvable Problems. Undecidability. The Church-Turing Thesis (1936) Decision Problem. Decision Problems
The Turing Machine Unsolvable Problems Motivating idea Build a theoretical a human computer Likened to a human with a paper and pencil that can solve problems in an algorithmic way The theoretical machine
More informationUniversal Turing Machine Chomsky Hierarchy Decidability Reducibility Uncomputable Functions Rice s Theorem Decidability Continued
CD5080 AUBER odels of Computation, anguages and Automata ecture 14 älardalen University Content Universal Turing achine Chomsky Hierarchy Decidability Reducibility Uncomputable Functions Rice s Decidability
More information14.1 Encoding for different models of computation
Lecture 14 Decidable languages In the previous lecture we discussed some examples of encoding schemes, through which various objects can be represented by strings over a given alphabet. We will begin this
More informationLanguages and Compilers
Principles of Software Engineering and Operational Systems Languages and Compilers SDAGE: Level I 2012-13 3. Formal Languages, Grammars and Automata Dr Valery Adzhiev vadzhiev@bournemouth.ac.uk Office:
More informationTOPIC PAGE NO. UNIT-I FINITE AUTOMATA
TABLE OF CONTENTS SNo DATE TOPIC PAGE NO UNIT-I FINITE AUTOMATA 1 Introduction 1 2 Basic Mathematical Notation Techniques 3 3 Finite State systems 4 4 Basic Definitions 6 5 Finite Automaton 7 6 DFA NDFA
More informationCS/B.Tech/CSE/IT/EVEN/SEM-4/CS-402/ ItIauIafIaAblll~AladUnrtel1ity
CS/B.Tech/CSE/IT/EVEN/SEM-4/CS-402/2015-16 ItIauIafIaAblll~AladUnrtel1ity ~ t; ~~ ) MAULANA ABUL KALAM AZAD UNIVERSITY OF TECHNOLOGY, WEST BENGAL Paper Code: CS-402 FORMAL LANGUAGE AND AUTOMATA THEORY
More informationI have read and understand all of the instructions below, and I will obey the Academic Honor Code.
Midterm Exam CS 341-451: Foundations of Computer Science II Fall 2014, elearning section Prof. Marvin K. Nakayama Print family (or last) name: Print given (or first) name: I have read and understand all
More informationCpSc 421 Final Solutions
CpSc 421 Final Solutions Do any eight of the ten problems below. If you attempt more than eight problems, please indicate which ones to grade (otherwise we will make a random choice). This allows you to
More informationCS154 Midterm Examination. May 4, 2010, 2:15-3:30PM
CS154 Midterm Examination May 4, 2010, 2:15-3:30PM Directions: Answer all 7 questions on this paper. The exam is open book and open notes. Any materials may be used. Name: I acknowledge and accept the
More informationTheory of Computation Dr. Weiss Extra Practice Exam Solutions
Name: of 7 Theory of Computation Dr. Weiss Extra Practice Exam Solutions Directions: Answer the questions as well as you can. Partial credit will be given, so show your work where appropriate. Try to be
More informationContext-Free Grammars
Context-Free Grammars 1 Informal Comments A context-free grammar is a notation for describing languages. It is more powerful than finite automata or RE s, but still cannot define all possible languages.
More informationUniversity of Nevada, Las Vegas Computer Science 456/656 Fall 2016
University of Nevada, Las Vegas Computer Science 456/656 Fall 2016 The entire examination is 925 points. The real final will be much shorter. Name: No books, notes, scratch paper, or calculators. Use pen
More informationTheory of Computation
Theory of Computation For Computer Science & Information Technology By www.thegateacademy.com Syllabus Syllabus for Theory of Computation Regular Expressions and Finite Automata, Context-Free Grammar s
More informationUNIT 1 SNS COLLEGE OF ENGINEERING
1 SNS COLLEGE OF ENGINEERING DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING THEORY OF COMPUTATION TWO MARKS WITH ANSWERS UNIT 1 1. Define set. A set is a collection of objects. E.g.: The collection of
More informationDefinition 2.8: A CFG is in Chomsky normal form if every rule. only appear on the left-hand side, we allow the rule S ǫ.
CS533 Class 02b: 1 c P. Heeman, 2017 CNF Pushdown Automata Definition Equivalence Overview CS533 Class 02b: 2 c P. Heeman, 2017 Chomsky Normal Form Definition 2.8: A CFG is in Chomsky normal form if every
More informationAmbiguous Grammars and Compactification
Ambiguous Grammars and Compactification Mridul Aanjaneya Stanford University July 17, 2012 Mridul Aanjaneya Automata Theory 1/ 44 Midterm Review Mathematical Induction and Pigeonhole Principle Finite Automata
More informationFinite Automata. Dr. Nadeem Akhtar. Assistant Professor Department of Computer Science & IT The Islamia University of Bahawalpur
Finite Automata Dr. Nadeem Akhtar Assistant Professor Department of Computer Science & IT The Islamia University of Bahawalpur PhD Laboratory IRISA-UBS University of South Brittany European University
More informationContext Free Grammars. CS154 Chris Pollett Mar 1, 2006.
Context Free Grammars CS154 Chris Pollett Mar 1, 2006. Outline Formal Definition Ambiguity Chomsky Normal Form Formal Definitions A context free grammar is a 4-tuple (V, Σ, R, S) where 1. V is a finite
More informationPART-A. 1. What is Object Oriented Analysis and Design?
V.S.B. ENGNIEERING COLLEGE DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING V.S.B. ENGINEERING COLLEGE, KARUR Academic Year: 2017-2018 (ODD Semester) Class/Year/Semester: CSE A & B /III/V Questions Bank
More informationNormal Forms for CFG s. Eliminating Useless Variables Removing Epsilon Removing Unit Productions Chomsky Normal Form
Normal Forms for CFG s Eliminating Useless Variables Removing Epsilon Removing Unit Productions Chomsky Normal Form 1 Variables That Derive Nothing Consider: S -> AB, A -> aa a, B -> AB Although A derives
More informationMidterm Exam II CIS 341: Foundations of Computer Science II Spring 2006, day section Prof. Marvin K. Nakayama
Midterm Exam II CIS 341: Foundations of Computer Science II Spring 2006, day section Prof. Marvin K. Nakayama Print family (or last) name: Print given (or first) name: I have read and understand all of
More informationCSE 105 THEORY OF COMPUTATION
CSE 105 THEORY OF COMPUTATION Spring 2017 http://cseweb.ucsd.edu/classes/sp17/cse105-ab/ Today's learning goals Sipser Ch 1.2, 1.3 Design NFA recognizing a given language Convert an NFA (with or without
More information1. Draw the state graphs for the finite automata which accept sets of strings composed of zeros and ones which:
P R O B L E M S Finite Autom ata. Draw the state graphs for the finite automata which accept sets of strings composed of zeros and ones which: a) Are a multiple of three in length. b) End with the string
More informationTheory of Computations Spring 2016 Practice Final Exam Solutions
1 of 8 Theory of Computations Spring 2016 Practice Final Exam Solutions Name: Directions: Answer the questions as well as you can. Partial credit will be given, so show your work where appropriate. Try
More informationECS 120 Lesson 16 Turing Machines, Pt. 2
ECS 120 Lesson 16 Turing Machines, Pt. 2 Oliver Kreylos Friday, May 4th, 2001 In the last lesson, we looked at Turing Machines, their differences to finite state machines and pushdown automata, and their
More informationSpecialized Grammars. Overview. Linear Grammars. Linear Grammars and Normal Forms. Yet Another Way to Specify Regular Languages
Overview Specialized Grammars Linear Grammars and Normal Forms. Introduce right-linear and left-linear grammars and use these to prove that regular languages are a proper subset of context-free languages.
More informationTheory of Computations Spring 2016 Practice Final
1 of 6 Theory of Computations Spring 2016 Practice Final 1. True/False questions: For each part, circle either True or False. (23 points: 1 points each) a. A TM can compute anything a desktop PC can, although
More informationFinite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018
Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018 Lecture 11 Ana Bove April 26th 2018 Recap: Regular Languages Decision properties of RL: Is it empty? Does it contain this word? Contains
More informationRecursively Enumerable Languages, Turing Machines, and Decidability
Recursively Enumerable Languages, Turing Machines, and Decidability 1 Problem Reduction: Basic Concepts and Analogies The concept of problem reduction is simple at a high level. You simply take an algorithm
More informationTheory of Programming Languages COMP360
Theory of Programming Languages COMP360 Sometimes it is the people no one imagines anything of, who do the things that no one can imagine Alan Turing What can be computed? Before people even built computers,
More informationDerivations of a CFG. MACM 300 Formal Languages and Automata. Context-free Grammars. Derivations and parse trees
Derivations of a CFG MACM 300 Formal Languages and Automata Anoop Sarkar http://www.cs.sfu.ca/~anoop strings grow on trees strings grow on Noun strings grow Object strings Verb Object Noun Verb Object
More informationDefinition: A context-free grammar (CFG) is a 4- tuple. variables = nonterminals, terminals, rules = productions,,
CMPSCI 601: Recall From Last Time Lecture 5 Definition: A context-free grammar (CFG) is a 4- tuple, variables = nonterminals, terminals, rules = productions,,, are all finite. 1 ( ) $ Pumping Lemma for
More informationContext-Free Languages & Grammars (CFLs & CFGs) Reading: Chapter 5
Context-Free Languages & Grammars (CFLs & CFGs) Reading: Chapter 5 1 Not all languages are regular So what happens to the languages which are not regular? Can we still come up with a language recognizer?
More informationR10 SET a) Explain the Architecture of 8085 Microprocessor? b) Explain instruction set Architecture Design?
Code No: R22054 COMPUTER ORGANIZATION (Com. to CSE, ECC) 1. a) Explain the Architecture of 8085 Microprocessor? b) Explain instruction set Architecture Design? 2. Explain Memory Subsystem Organization
More informationYet More CFLs; Turing Machines. CS154 Chris Pollett Mar 8, 2006.
Yet More CFLs; Turing Machines CS154 Chris Pollett Mar 8, 2006. Outline Algorithms for CFGs Pumping Lemma for CFLs Turing Machines Introduction to Cocke-Younger- Kasami (CYK) algorithm (1960) This is an
More informationLanguages and Automata
Languages and Automata What are the Big Ideas? Tuesday, August 30, 2011 Reading: Sipser 0.1 CS235 Languages and Automata Department of Computer Science Wellesley College Why Take CS235? 1. It s required
More informationTAFL 1 (ECS-403) Unit- V. 5.1 Turing Machine. 5.2 TM as computer of Integer Function
TAFL 1 (ECS-403) Unit- V 5.1 Turing Machine 5.2 TM as computer of Integer Function 5.2.1 Simulating Turing Machine by Computer 5.2.2 Simulating Computer by Turing Machine 5.3 Universal Turing Machine 5.4
More informationFrom Theorem 8.5, page 223, we have that the intersection of a context-free language with a regular language is context-free. Therefore, the language
CSCI 2400 Models of Computation, Section 3 Solutions to Practice Final Exam Here are solutions to the practice final exam. For some problems some details are missing for brevity. You should write complete
More informationEnumerations and Turing Machines
Enumerations and Turing Machines Mridul Aanjaneya Stanford University August 07, 2012 Mridul Aanjaneya Automata Theory 1/ 35 Finite Sets Intuitively, a finite set is a set for which there is a particular
More informationDecision Properties of RLs & Automaton Minimization
Decision Properties of RLs & Automaton Minimization Martin Fränzle formatics and Mathematical Modelling The Technical University of Denmark Languages and Parsing MF Fall p./ What you ll learn. Decidable
More informationLimits of Computation p.1/?? Limits of Computation p.2/??
Context-Free Grammars (CFG) There are languages, such as {0 n 1 n n 0} that cannot be described (specified) by finite automata or regular expressions. Context-free grammars provide a more powerful mechanism
More informationCSE 105 THEORY OF COMPUTATION
CSE 105 THEORY OF COMPUTATION Spring 2016 http://cseweb.ucsd.edu/classes/sp16/cse105-ab/ Today's learning goals Sipser Ch 3.2, 3.3 Define variants of TMs Enumerators Multi-tape TMs Nondeterministic TMs
More information3 rd Year - Computer Science and Engineering,
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING 3 rd Year - Computer Science and Engineering, 5th Semester Theory of Computation QUESTION BANK 2 Marks Question and Answer 1. Define set. A set is a collection
More informationSource of Slides: Introduction to Automata Theory, Languages, and Computation By John E. Hopcroft, Rajeev Motwani and Jeffrey D.
Source of Slides: Introduction to Automata Theory, Languages, and Computation By John E. Hopcroft, Rajeev Motwani and Jeffrey D. Ullman And Introduction to Languages and The by J. C. Martin Basic Mathematical
More informationFormal Languages and Automata
Mobile Computing and Software Engineering p. 1/3 Formal Languages and Automata Chapter 3 Regular languages and Regular Grammars Chuan-Ming Liu cmliu@csie.ntut.edu.tw Department of Computer Science and
More informationOutline. Language Hierarchy
Outline Language Hierarchy Definition of Turing Machine TM Variants and Equivalence Decidability Reducibility Language Hierarchy Regular: finite memory CFG/PDA: infinite memory but in stack space TM: infinite
More informationTuring Machines. A transducer is a finite state machine (FST) whose output is a string and not just accept or reject.
Turing Machines Transducers: A transducer is a finite state machine (FST) whose output is a string and not just accept or reject. Each transition of an FST is labeled with two symbols, one designating
More informationPS3 - Comments. Describe precisely the language accepted by this nondeterministic PDA.
University of Virginia - cs3102: Theory of Computation Spring 2010 PS3 - Comments Average: 46.6 (full credit for each question is 55 points) Problem 1: Mystery Language. (Average 8.5 / 10) In Class 7,
More informationLECTURE NOTES THEORY OF COMPUTATION
LECTURE NOTES ON THEORY OF COMPUTATION P Anjaiah Assistant Professor Ms. B Ramyasree Assistant Professor Ms. E Umashankari Assistant Professor Ms. A Jayanthi Assistant Professor INSTITUTE OF AERONAUTICAL
More informationDEV BHOOMI INSTITUTE OF TECHNOLOGY DEHRADUN
DEV BHOOMI INSTITUTE OF TECHNOLOGY DEHRADUN Department of Computer Science and Engg. HAND BOOK Session 2016-17 Class : 2 nd yr / 4 th sem Syllabus Course Name: Computer Organization Course Code:TCS -401
More informationCSE 105 THEORY OF COMPUTATION
CSE 105 THEORY OF COMPUTATION Spring 2018 http://cseweb.ucsd.edu/classes/sp18/cse105-ab/ Today's learning goals Sipser Section 2.2 Define push-down automata informally and formally Trace the computation
More informationLecture 18: Turing Machines
Lecture 18: Turing Machines Some Languages are not Context-Free At the end of the last section, we used the Pumping Lemma for Context Free Languages to prove that there are languages that are not context
More informationComputability Summary
Computability Summary Recursive Languages The following are all equivalent: A language B is recursive iff B = L(M) for some total TM M. A language B is (Turing) computable iff some total TM M computes
More informationModels of Computation II: Grammars and Pushdown Automata
Models of Computation II: Grammars and Pushdown Automata COMP1600 / COMP6260 Dirk Pattinson Australian National University Semester 2, 2018 Catch Up / Drop in Lab Session 1 Monday 1100-1200 at Room 2.41
More information1. (10 points) Draw the state diagram of the DFA that recognizes the language over Σ = {0, 1}
CSE 5 Homework 2 Due: Monday October 6, 27 Instructions Upload a single file to Gradescope for each group. should be on each page of the submission. All group members names and PIDs Your assignments in
More informationA Characterization of the Chomsky Hierarchy by String Turing Machines
A Characterization of the Chomsky Hierarchy by String Turing Machines Hans W. Lang University of Applied Sciences, Flensburg, Germany Abstract A string Turing machine is a variant of a Turing machine designed
More informationNondeterministic Finite Automata (NFA): Nondeterministic Finite Automata (NFA) states of an automaton of this kind may or may not have a transition for each symbol in the alphabet, or can even have multiple
More informationAutomata Theory TEST 1 Answers Max points: 156 Grade basis: 150 Median grade: 81%
Automata Theory TEST 1 Answers Max points: 156 Grade basis: 150 Median grade: 81% 1. (2 pts) See text. You can t be sloppy defining terms like this. You must show a bijection between the natural numbers
More informationTuring Machine Languages
Turing Machine Languages Based on Chapters 23-24-25 of (Cohen 1997) Introduction A language L over alphabet is called recursively enumerable (r.e.) if there is a Turing Machine T that accepts every word
More informationCISC 4090 Theory of Computation
CISC 4090 Theory of Computation Turing machines Professor Daniel Leeds dleeds@fordham.edu JMH 332 Alan Turing (1912-1954) Father of Theoretical Computer Science Key figure in Artificial Intelligence Codebreaker
More informationt!1; R 0! 1; R q HALT
CS 181 FINA EXAM SPRING 2014 NAME UCA ID You have 3 hours to complete this exam. You may assume without proof any statement proved in class. (2 pts) 1 Give a simple verbal description of the function f
More informationReflection in the Chomsky Hierarchy
Reflection in the Chomsky Hierarchy Henk Barendregt Venanzio Capretta Dexter Kozen 1 Introduction We investigate which classes of formal languages in the Chomsky hierarchy are reflexive, that is, contain
More informationCS21 Decidability and Tractability
CS21 Decidability and Tractability Lecture 9 January 26, 2018 Outline Turing Machines and variants multitape TMs nondeterministic TMs Church-Turing Thesis decidable, RE, co-re languages Deciding and Recognizing
More information