Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
52 views
4 pages
Endsem 1
Uploaded by
jahnavi poluru
AI-enhanced title
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
Download
Save
Save endsem1 For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
0 ratings
0% found this document useful (0 votes)
52 views
4 pages
Endsem 1
Uploaded by
jahnavi poluru
AI-enhanced title
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
Carousel Previous
Carousel Next
Download
Save
Save endsem1 For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
Download now
Download
You are on page 1
/ 4
Search
Fullscreen
18 NOV 2018 Reg.No. : Amrita Vishwa Vidyapeetham School of Engineering, Bengaluru Campus B.Tech. Degree Examination November 2018 Fifth Semester Computer Science and Engineering 15CSE303 Theory of Computation Time: Three hours Maximum marks: 100 co Course Outcomes COI | Understand and apply the properties of formal languages C02 _| Illustrate grammar and grammar transformations for formal languages CO3_| Construct finite state machines CO4 | Apply stack data structures for automata COS _| Design and develop computing devices such as Turing machines Answer all questions 1 (@) Find the language accepted by the DFA given in Fig. 1 a 2} cor (b) The automaton Ay is specified by the diagram given in Fig, 2. [3] Co3 i) Translate the graphical representation of Aj into the form of a S-tuple, (S,2,6,50,F). i) The transition function is 6 and the extended transition function is 6*. What is 6*($0, 00010)? Show the steps.4 (©) Design a DFA to accept the following: All strings that start with 0 has odd length [3] CO3 and that start with I has even length on 5) = {0, 1). (a) Let M denote the non-deterministic finite automaton and L(M) denote the [4] COI language accepted by M. Define M and L(M). (b) Given the Nondeterministic Finite Automaton (NFA) A over 2= {a,b,c} [3] CO3 (Fig. 3), which of the statements about A are correct? Fig.3 abe € L(A) and cba € L(A) A accepts precisely the strings which contain the sequence ab. A accepts precisely the strings where neither of the last two symbols is the symbol . (©) Draw NFA to accept all strings matching the regular expression ((01)"+ [3] COS ‘1)+0+using Thompson’s algorithm, (@) Convert the NFA given in Fig. 4 to minimized DFA using subset construction [7] CO3 method. Fig. 4 (b) Identify whether the following languages are regular? 8] col i) Lt = (0*1"2" | (k = morm = n)andk + m+n > 2 ii) 12 = (0'1"2"|(& = morm = n)andk + m+n <2 iii) 13 = (012"|k +m +n > 2) (@) Derive the regular expression for the automaton given in Fig. 5. B] cos Page 2 0f 418 NOV 2018 (©) Let REPLACE be an operation on languages such that REPLACE(L) isanew [3] COL language that is identical to L, except that each ‘a’ in a string is replaced with “ec. For example, if L = {a, ab, aabb, bbb}, then REPLACE(L) = {cc, ecb, ccechb, bbb}. Show that the set of regular languages is closed under REPLACE operation. (©) Which of the following are true? Prove your answer. {4] cor baa €a'b*a‘b" bra’ Nath = at ube ii) ab ned"=0 iv) abed € (a(ed)*by (a) Find the S-grammar for the regular expression (aa"b + bb‘a). Is your [3] C02 grammar regular? Give reason. (b) Write a regular expression to recognize all the valid monetary amounts starting [3] COI with the Rupee symbol ® with an optional decimal point and a two-digit fractional amount; if it is larger than three digits, then commas separate billions, millions and thousands (e.g, % 101.99 or & 10,000 or & 1,670,439,444.49). (©) Generate the right linear and the left linear grammar for the language generated [4] CO2 by the regular expression (a + b)*a(a +b)". The syntax of formulas of propositional logic over the atomic propositionsp, q, ris given by the following rules: © p.q.r-are formulas. + true, false are formulas, If Aisa formula then A, (A) are formulas. + IfA,Bare formulas then A A B, Av Bare formulas. To avoid ambiguity,consider the following precedence rules: ‘© binds stronger than A and v (i.e. — holds higher precedence) © Abinds stronger than V (@) Construct a CFG over = {p,9,7,(), A, V,-ytrue, false} [4] co2 whose language is the set of syntactically correct formulas. Designyour grammar such that the conventions about binding strength arereflected by the parse trees. (b) Draw parse tree for p A (qv 1). B] C02 (©) Show the left-most derivation for p A q Vr. B} co2 (@) Consider the context free grammar G = (V,5,S,R) where Vis {S,A,B), Sis [3] C02 {a,b} and R consists of the following rules: S>AlB AaS|a BobS|b Is this grammar ambiguous? Justify your answer. R Page 3 of 4&) @ i ) Consider the following context-free grammar G that describes regular [7] CO2 expressions over the alphabet (0, 1}: R > (R)|R+RIRRIRe [Ol The alphabet of G consists of the symbols (, }, +, , 0, and 1. Here + and deseribe the union and star operators, while 0 and describe the minimum string. Represent the above CFG in Chomsky Normal Form, Construct a Push Down Automaton (PDA) for the language L = {ab"a"'b™ + [10] CO4 n,m 2 0}. Draw the transition diagram for the construction. Consider the Turing Machine (TM) automaton given in the table below: a a (ee eet [SLOR)[2YL)_-_[GLYR) = | {(s2,0L)] - [G6O.XR[62¥D] — | P = f= [= se [65 a ee a Show diagrammatic representation of the above automaton. 22] cos Show the trace (ID) of the above machine for the strings 0011, 0110. [4] cos Given TM(T) with f = {0,1,B}, 2 = {0,1}, Bis end of string, and 6 as: [4] cos [input 0 [input 1 [input B q0_| GI, 1,R) | Gl, 0,R) | @l,0,R) al_| @2, 1,1) [G@l. 0, R) | @2, 0,1) initial tapes, determine the final tape when T halts, itial position, For each of the followin; assuming that T begins i -]B]B]O[o]1|1[B]B B/B]B)B/B)B]B]B].. Define the following: [10} cos i) ‘Type 2 grammar ii) Multi-dimensional Turing machine Linear bound automata Recursively enumerable language Language that is recognized by the finite automata Page 4 of 6
You might also like
Theory of Computation ALL PYQ (Pran Tehare)
PDF
No ratings yet
Theory of Computation ALL PYQ (Pran Tehare)
14 pages
Model 2 QN
PDF
No ratings yet
Model 2 QN
3 pages
It3401 CTCD Question Bank (1-5)
PDF
No ratings yet
It3401 CTCD Question Bank (1-5)
23 pages
At Important Questions For See
PDF
No ratings yet
At Important Questions For See
6 pages
15-Chomsky Hierarchy
PDF
No ratings yet
15-Chomsky Hierarchy
12 pages
Introduction To Automata and Languages: 19CSE214 - Theory of Computation
PDF
No ratings yet
Introduction To Automata and Languages: 19CSE214 - Theory of Computation
422 pages
NFA To Minimized DFA
PDF
No ratings yet
NFA To Minimized DFA
32 pages
ACD Course Assignment
PDF
No ratings yet
ACD Course Assignment
9 pages
1 Introduction
PDF
No ratings yet
1 Introduction
70 pages
18CS54 QB Cse Odd21-22
PDF
No ratings yet
18CS54 QB Cse Odd21-22
12 pages
13-Push Down Automata (PDA)
PDF
No ratings yet
13-Push Down Automata (PDA)
24 pages
Sem QB
PDF
No ratings yet
Sem QB
5 pages
Question Bank For Theory of Computation Regulation 2013
PDF
No ratings yet
Question Bank For Theory of Computation Regulation 2013
9 pages
Theory of Computation ALL PYQ (Pran Tehare)
PDF
No ratings yet
Theory of Computation ALL PYQ (Pran Tehare)
16 pages
9-Regular Grammar
PDF
No ratings yet
9-Regular Grammar
26 pages
At QB
PDF
No ratings yet
At QB
13 pages
End Sem
PDF
No ratings yet
End Sem
4 pages
Toc Pyq Apna Engineering Wallah
PDF
No ratings yet
Toc Pyq Apna Engineering Wallah
19 pages
FLAT-Question Bank Final
PDF
No ratings yet
FLAT-Question Bank Final
9 pages
STM Unit 5 Important Questions
PDF
No ratings yet
STM Unit 5 Important Questions
3 pages
Toc MQP
PDF
No ratings yet
Toc MQP
6 pages
All Questions Papers
PDF
No ratings yet
All Questions Papers
18 pages
TOC EXAMNINATION QUESTION Bank
PDF
No ratings yet
TOC EXAMNINATION QUESTION Bank
6 pages
Theory of Computation
PDF
No ratings yet
Theory of Computation
5 pages
Imp Flat
PDF
No ratings yet
Imp Flat
9 pages
TAFL
PDF
No ratings yet
TAFL
7 pages
Model - I - TOC - QP - B - Scheme of Evaluation
PDF
No ratings yet
Model - I - TOC - QP - B - Scheme of Evaluation
11 pages
FLAT
PDF
No ratings yet
FLAT
7 pages
Name Asu Id: CSE 355 Theory of Computing ID: - Spring 2012 - Colbourn Midterm # 1 Page 1 of 7 16 February 2012
PDF
No ratings yet
Name Asu Id: CSE 355 Theory of Computing ID: - Spring 2012 - Colbourn Midterm # 1 Page 1 of 7 16 February 2012
5 pages
Apna Ipu Wallah Toc
PDF
No ratings yet
Apna Ipu Wallah Toc
16 pages
Idoc - Pub - Question Bank For Theory of Computation Regulation 2013 PDF
PDF
No ratings yet
Idoc - Pub - Question Bank For Theory of Computation Regulation 2013 PDF
9 pages
ATCDQB
PDF
No ratings yet
ATCDQB
17 pages
Toc Complete
PDF
No ratings yet
Toc Complete
14 pages
Ilovepdf Merged 3
PDF
No ratings yet
Ilovepdf Merged 3
13 pages
CS6503-THEORY OF COMPUTATION-1977516805-updated TOC
PDF
No ratings yet
CS6503-THEORY OF COMPUTATION-1977516805-updated TOC
10 pages
CS3452 - TOC - QB New - V2
PDF
No ratings yet
CS3452 - TOC - QB New - V2
10 pages
Toc Modl Paper
PDF
No ratings yet
Toc Modl Paper
4 pages
Solution To Midterm 1
PDF
No ratings yet
Solution To Midterm 1
5 pages
TOC - Question Bank
PDF
No ratings yet
TOC - Question Bank
6 pages
Toc (BCS503) - Assignment - 1
PDF
100% (1)
Toc (BCS503) - Assignment - 1
5 pages
4RCS04
PDF
No ratings yet
4RCS04
2 pages
ATC YT Question
PDF
No ratings yet
ATC YT Question
17 pages
TOC Question Bank
PDF
No ratings yet
TOC Question Bank
5 pages
Panimalar Engineering College
PDF
No ratings yet
Panimalar Engineering College
6 pages
23cb1302-Flat 2024-25
PDF
No ratings yet
23cb1302-Flat 2024-25
7 pages
QUESTION BANK Toc
PDF
No ratings yet
QUESTION BANK Toc
10 pages
ACSE0404
PDF
No ratings yet
ACSE0404
5 pages
CT1 101931 18CSC301T SetB QP
PDF
No ratings yet
CT1 101931 18CSC301T SetB QP
3 pages
Flatter
PDF
No ratings yet
Flatter
8 pages
Cs3452 - Toc - QB New
PDF
No ratings yet
Cs3452 - Toc - QB New
10 pages
Ilovepdf Merged
PDF
No ratings yet
Ilovepdf Merged
9 pages
Dec14 Question Paper Vtu
PDF
No ratings yet
Dec14 Question Paper Vtu
3 pages
Atc Question Paper
PDF
No ratings yet
Atc Question Paper
7 pages
Tts2918-V.jaganraja-Question Bank
PDF
No ratings yet
Tts2918-V.jaganraja-Question Bank
5 pages
QB Toc
PDF
No ratings yet
QB Toc
11 pages
21CS1503 Toc QB
PDF
No ratings yet
21CS1503 Toc QB
6 pages
Toc Cie Papers
PDF
No ratings yet
Toc Cie Papers
5 pages
TOC Question Bank - Unit - 1 - 2 - 3 - 4 - 2022
PDF
No ratings yet
TOC Question Bank - Unit - 1 - 2 - 3 - 4 - 2022
7 pages
CST301 2023
PDF
No ratings yet
CST301 2023
3 pages
Cse 3107
PDF
No ratings yet
Cse 3107
2 pages
CS6503-Theory of Computation
PDF
No ratings yet
CS6503-Theory of Computation
9 pages
Toc QB It
PDF
No ratings yet
Toc QB It
15 pages
114AG112017
PDF
No ratings yet
114AG112017
2 pages
Theory of Computation
PDF
No ratings yet
Theory of Computation
11 pages
CS8503 Iq R17
PDF
No ratings yet
CS8503 Iq R17
7 pages