Question Bank UNIT I

Similar documents
(b) If G=({S}, {a}, {S SS}, S) find the language generated by G. [8+8] 2. Convert the following grammar to Greibach Normal Form G = ({A1, A2, A3},

INSTITUTE OF AERONAUTICAL ENGINEERING

St.MARTIN S ENGINEERING COLLEGE Dhulapally, Secunderabad

1. (a) Explain the procedure to convert Context Free Grammar to Push Down Automata.

SYLLABUS. Introduction to Finite Automata, Central Concepts of Automata Theory. CHAPTER - 3 : REGULAR EXPRESSIONS AND LANGUAGES

VTU QUESTION BANK. Unit 1. Introduction to Finite Automata. 1. Obtain DFAs to accept strings of a s and b s having exactly one a.

Theory of Computation (Classroom Practice Booklet Solutions)

AC68 FINITE AUTOMATA & FORMULA LANGUAGES JUNE 2014

AC68 FINITE AUTOMATA & FORMULA LANGUAGES DEC 2013

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY

Chomsky Normal Form and TURING MACHINES. TUESDAY Feb 4

SCHEME FOR INTERNAL ASSESSMENT TEST 3

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018

Decidability (What, stuff is unsolvable?)

Theory of Computation Turing Machine and Pushdown Automata

Sri vidya college of engineering and technology

THEORY OF COMPUTATION (AUBER) EXAM CRIB SHEET

NODIA AND COMPANY. GATE SOLVED PAPER Computer Science Engineering Theory of Computation. Copyright By NODIA & COMPANY

60-354, Theory of Computation Fall Asish Mukhopadhyay School of Computer Science University of Windsor

Closure under the Regular Operations

GEETANJALI INSTITUTE OF TECHNICAL STUDIES, UDAIPUR I

Theory of Computation

Theory Of Computation UNIT-II

CSCI 2200 Foundations of Computer Science Spring 2018 Quiz 3 (May 2, 2018) SOLUTIONS

FORMAL LANGUAGES, AUTOMATA AND COMPUTATION

Non-context-Free Languages. CS215, Lecture 5 c

CS 154. Finite Automata vs Regular Expressions, Non-Regular Languages

Pushdown Automata. Notes on Automata and Theory of Computation. Chia-Ping Chen

CSE 105 THEORY OF COMPUTATION. Spring 2018 review class

TAFL 1 (ECS-403) Unit- III. 3.1 Definition of CFG (Context Free Grammar) and problems. 3.2 Derivation. 3.3 Ambiguity in Grammar

Context-Free Languages (Pre Lecture)

The View Over The Horizon

CPS 220 Theory of Computation

CS375: Logic and Theory of Computing

Before We Start. The Pumping Lemma. Languages. Context Free Languages. Plan for today. Now our picture looks like. Any questions?

Notes for Comp 497 (Comp 454) Week 10 4/5/05

Foundations of Informatics: a Bridging Course

Turing s thesis: (1930) Any computation carried out by mechanical means can be performed by a Turing Machine

Automata and Computability. Solutions to Exercises

CS5371 Theory of Computation. Lecture 9: Automata Theory VII (Pumping Lemma, Non-CFL, DPDA PDA)

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018

Final exam study sheet for CS3719 Turing machines and decidability.

cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska

TURING MAHINES

Theory of Computation - Module 4

Automata and Computability. Solutions to Exercises

Notes for Comp 497 (454) Week 10

Closure Properties of Context-Free Languages. Foundations of Computer Science Theory

NPDA, CFG equivalence

Theory & Practice Book. Computer Science & IT. for. Public Sector Exams

CSE 105 THEORY OF COMPUTATION

MA/CSSE 474 Theory of Computation

Introduction to Turing Machines. Reading: Chapters 8 & 9

The Post Correspondence Problem

Theory of Computation - Module 3

Theory Bridge Exam Example Questions

Uses of finite automata

CS375 Midterm Exam Solution Set (Fall 2017)

Harvard CS 121 and CSCI E-207 Lecture 10: CFLs: PDAs, Closure Properties, and Non-CFLs

Automata & languages. A primer on the Theory of Computation. Laurent Vanbever. ETH Zürich (D-ITET) October,

Part 3 out of 5. Automata & languages. A primer on the Theory of Computation. Last week, we learned about closure and equivalence of regular languages

CS 301. Lecture 18 Decidable languages. Stephen Checkoway. April 2, 2018

Properties of Context-free Languages. Reading: Chapter 7

Theory of Computation (IV) Yijia Chen Fudan University

CS Lecture 28 P, NP, and NP-Completeness. Fall 2008

Properties of Context-Free Languages. Closure Properties Decision Properties

UNIT-VIII COMPUTABILITY THEORY

Languages, regular languages, finite automata

Finite Automata Theory and Formal Languages TMV026/TMV027/DIT321 Responsible: Ana Bove

What languages are Turing-decidable? What languages are not Turing-decidable? Is there a language that isn t even Turingrecognizable?

Theory of Computation (II) Yijia Chen Fudan University

Automata Theory CS F-08 Context-Free Grammars

DD2371 Automata Theory

Formal Languages, Automata and Models of Computation

This lecture covers Chapter 7 of HMU: Properties of CFLs

Reducability. Sipser, pages

DM17. Beregnelighed. Jacob Aae Mikkelsen

V Honors Theory of Computation

CSE 105 Homework 1 Due: Monday October 9, Instructions. should be on each page of the submission.

Context Free Languages. Automata Theory and Formal Grammars: Lecture 6. Languages That Are Not Regular. Non-Regular Languages

6.1 The Pumping Lemma for CFLs 6.2 Intersections and Complements of CFLs

Pushdown Automata. We have seen examples of context-free languages that are not regular, and hence can not be recognized by finite automata.

Context-Free Grammar

Automata Theory. CS F-10 Non-Context-Free Langauges Closure Properties of Context-Free Languages. David Galles

CS5371 Theory of Computation. Lecture 12: Computability III (Decidable Languages relating to DFA, NFA, and CFG)

Properties of Context-Free Languages

An automaton with a finite number of states is called a Finite Automaton (FA) or Finite State Machine (FSM).

Turing Machines A Turing Machine is a 7-tuple, (Q, Σ, Γ, δ, q0, qaccept, qreject), where Q, Σ, Γ are all finite

TDDD65 Introduction to the Theory of Computation

Functions on languages:

Context Free Languages: Decidability of a CFL

CSCE 551 Final Exam, Spring 2004 Answer Key

Turing machines and linear bounded automata

Ogden s Lemma for CFLs

Computer Sciences Department

Part 4 out of 5 DFA NFA REX. Automata & languages. A primer on the Theory of Computation. Last week, we showed the equivalence of DFA, NFA and REX

Section 14.1 Computability then else

CS Lecture 29 P, NP, and NP-Completeness. k ) for all k. Fall The class P. The class NP

CISC4090: Theory of Computation

Transcription:

Siddhivinayak Technical Campus School of Engineering & Research Technology Department of computer science and Engineering Session 2016-2017 Subject Name- Theory of Computation Subject Code-4KS05 Sr No. UNIT I Question Bank 1. Design a DFA that contain a set of all string containing 1bb as a substring over ={1,b} 2. Construct DFA to accept the following languages Over alphabet (0,1 I. (i)the set of all strings ended with 011 (ii)the set of all strings which do not Contain three consecutive 0 s. Marks 3. Define DFA. Construct DFA for set of string over{a,b,c} having bca as substring 4. Convert following NFA into DFA δ a b q 0 q 0, q 1 q 1 q 1 q 2 q 2 *q 2 q 2,q 3 q 2 q 3 q 2 Ф 5. Construct a deterministic automata(dfa) equivalent to NFA M=({q 0, q 1 },{0,1},δ,q 0, {q 0 }} whose transition diagram is given below Q 0 1 ->(q 0) q 0 q 1 q 1 q 1 {q 0,q 1 } 6. Construct a deterministic automata equivalent to NFA, M=({q 0,q 1,q 2,q 3 },{a,b},δ,q 0, {q 3 }) Where δ is defined by its state table. Q 0 1 ->q 0 q 0, q 1 q 0 q 1 q 2 q 1 q 2 q 3 q 3 (q 3) Ø q 2 7. Prove that if L is accepted by an NFA, then there exists a DFA that accepts L 04 8. Covert the following NFA with transitions to equivalent NFA without

transitions for following diagram 9. Find equivalent NFA without transitions for following diagram 05 10. Construct Moore machine from following mealy machine 11. Construct Moore machine from following mealy machine 12. Construct Moore machine to convert each occurrence of substring 100 by101 13. Design a Moore machine to determine residue mod 2 for each binary string treated as binary integer.

14. Design a Moore machine to determine residue mod 3 for each binary string treated as binary integer. 15. Convert the following Mealy machine to Moore machine Input a Input b Present State Next State Output Next State Output q 1 q 3 0 q 2 0 q 2 q 1 1 q 4 0 q 3 q 2 1 q 1 1 q 4 q 4 1 q 3 0 16. Design a Moore Machine for binary input Sequence,if it ends in 101, output is A, if itends in 110 output is B otherwise C. 17. Construct NFA which accepts all prefix of string aab. 18. Minimize the following DFA δ 0 1 q 0 q 1 q 5 q 1 q 6 q 2 *q 2 q 6 q 2 q 3 q 2 q 6 *q 4 q 5 q 7 q 5 q 2 q 6 q 6 q 6 q 4 q 7 q 6 q 2 19. Construct the minimum state automation equivalent to following FA whose transition table is Q 0 1 13 13 q 0 q 1 q 2 q 1 q 4 q 3 q 2 q 4 q 3 (q 3) q 5 q 6 (q 4) q 7 q 6 q 5 q 3 q 6 q 6 q 6 q 6 q 7 q 4 q 6 20. Convert following RE into FA : 10+(0+11)0*1 UNIT- II 1. Construct the regular expression corresponding to state diagram described by 05

2. Construct the regular expression for given transition diagram 05 3. Construct the regular expression for given transition diagram 05 4. Construct the regular expression for given transition diagram 5. Show that the following language are Regular or not: i) L={a p /P is prime} ii) L={ ώώ / ώ is (a,b)* } 6. Design Finite Automata without transitions for the regular expression((a+b)*de)* 05 7. State and explain the pumping lemma with an example. What is its application? 8. Using pumping lemma show that the following language are not regular: i) L={0 i2 /I is an integer i>=1} ii) L={0 i 1 i /i>=1} 9. Let G={ [A 0, A 1 ], [a, b], P, A 0 } where P consist of A 0 ->aa 1 A 1 ->ba 1 A 1 ->a A 1 ->ba 0 Construct Transition system M accepting L(G) 10. Find Right and Left Linear grammer for: i) 0 * (1(0+1)) * ii) (((01+10) * 11) * 00 ) * 11. Find Right and Left Linear grammer for:

L={a n b m /n>=2,m>=3} 12. Write the regular expression for the language: i) L={a n b m /(n+m) is even} ii) For the set of strings with even no of 0 s followed by odd number of 1 s for the language L={0 2n 1 2m+1 /n>=0,m>=0} 13. Explain in brief the closure properties of regular sets. UNIT III 1. Write a CFG to generate the language L= {0 m 1 n 0 m+n /m,n>=1}, 2. Convert the following grammar into CNF: S->abAB, A->bAB / Є, B->Baa/A/Є 3. Construct a PDA for the language. (i) L= {ww R / w is in (0+1)*} (ii) L= {a 2n cb n / n>=1} 4. (b)convert the following to GNF:[] G= ({A 1, A 2, A 3 }, {a, b}, P, A 1 ) where P consist of A 1 ->A 2 A 3, A2->A 3 A 1 /b, A3->A 1 A 2 /a 5. Construct Turing Machine that accepts the following Language on {a,b} (i) L= {aba*b}. (ii) L= {w: w is even} 6. Explain the properties of CFLs. 7. Eliminate null production, unit production, useless production, from the following grammer (i) S->aS/A/c A->a B->aa C->acb (ii) S->a/aA/B/C A->aB/ Є B->Aa C->aCD D->ddd 8. Let G=<V,T,P,S> be a grammer whose productions are: S->aB/bA A-> a/as/baa B->b/bSaBB For the string aaabbabbba,find i) Left most derivation ii) Right most derivation iii) Parse tree for each derivation

UNIT IV 1. Explain in brief different types of turning machine. 2. Explain in brief Multi dimentional turing machine 05 3. Explain in brief i) Multitape turing machine ii) Two way infinite tape turing machine 4. Design a Turning Machine to compute the multiplication of two numbers. 5. Construct Turing Machine that accepts the following Language on {a, b} i) L= {aba*b}. ii) L= {w: w is even}. 6. Explain in brief Church s Hypothesis. 7. Design a Turing Machine that computes 09 f(x,y)= x-y if x>=y = 0 if x<y 8. Construct a Turing Machine that recognize a language {a n b n c n /n>=0} 9. Construct a Turing Machine that recognize a language {a n b n c n /n>=1} 10. Construct a Turing Machine that recognize a language {0 n 1 n /n>=0} 11. Construct a Turing Machine that recognize a language {0 n 1 n /n>=1} 12. Design a Turing Machine that computes the function f(m,n)=m+n 13. Design a Turing Machine that computes the function f(m,n)=m*n Or Design a Turning Machine to compute the multiplication of two numbers. UNIT V 1. Define Linear bounded automation 03 2. Find Linear bounded automation that accepts the language L={a n! /n>=0} 3. Find Linear bounded automation that accepts the language L={WW/W ɛ (a,b)*} 4. Give (LR/0) grammar for the following production S ->Sc S->SA/A A->aSb/ab 5. Find the grammer generating the set accepted by LBA whose transition table is as follows: 6. Explain the closure property of DCFL s 7. Explain following grammer in detail : i) Type 0 ii) Type 1 iii) Type 2

iv) Type 3 8. Explain the Chomsky Hierarchy?Explain with example? 9. Show that L={Wɛ{a,b}*:n a (W) n b (W)}is a deterministic context free 10. Show that the languages. 10 i) L 1 ={0 n 1 m /n=m and n>=1} ii) L 2= {0 n 1 m /n=2m and n>=1} is a deterministic context free-language 11. Show that L={a n b n / n>=1}u {a}is a deterministic. If yes construct DPDA for it 05 12. Show that there exists some LBA M, for every context sensitive language L not including Such that L=(L) 13. Give unrestricted context sensitive grammer for: L={a i b i c i /i>=1} 14. Show that the family of context sensitive languages is closed under reversal UNIT- VI 1. Prove the following i) The complement of recursive language is recursive. ii) The Union of two recursive language is recursive. 2. Describe in brief what is halting problem 3. Prove that the Turing Machine M halts on input W is undecidable. 4. Explain the properties of recursive and recursively enumerable languages in detail 5. Explain Universal turing machine 6. Determine whether the following pairs (A, B) have a solution or not, if yes give solution, if no why? 7. Determine whether the following pairs (A, B) have a solution or not, if yes give solution, if no why? i) A={1,10111,10} B={111,10,0} ii) A={10,011,101} B={101,11,011} 8. Show that the following function are recursive: i) n+m ii) nm 9. Show that the addition and multiplication of two positive integers is total recursive function. 10. Does the PCP with two lists x=(b,bab 3,ba) y=(b,baa) have a solution?