0% found this document useful (0 votes)
1K views1 page

Toc Question Paper

The document is a midterm exam for a course on Theory of Computation. It contains 3 questions with multiple parts testing students' knowledge of formal languages and automata. Question 1 covers definitions of DFAs, NDFAs, ambiguity in grammar, and Moore and Mealy machines. Question 2 involves simplifying a grammar and proving a language is regular. Question 3 tests construction of PDAs and minimum state automata. Question 4 covers regular expressions and language generation from grammars.

Uploaded by

Sahil
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1K views1 page

Toc Question Paper

The document is a midterm exam for a course on Theory of Computation. It contains 3 questions with multiple parts testing students' knowledge of formal languages and automata. Question 1 covers definitions of DFAs, NDFAs, ambiguity in grammar, and Moore and Mealy machines. Question 2 involves simplifying a grammar and proving a language is regular. Question 3 tests construction of PDAs and minimum state automata. Question 4 covers regular expressions and language generation from grammars.

Uploaded by

Sahil
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

MID TERM EXAMINATION

FOURTH SEMESTER [B. TECH.] APRIL 2021


Paper Code: ETCS 206 Subject: TOC
Time: 1 Hour 30 Min. Maximum Marks: 30

Note: Attempt any Three questions including Q. No. 1 which is compulsory.

Q1 Answer the following questions: (5*2=10)


a) Differentiate between DFA and NDFA with the help of suitable examples.
b) Define ambiguity in grammar? Can it be removed? if yes, how?
c) Design a DFA to accept all strings over {a,b} which contains even number of a’s and
even number of b’s.
d) Differentiate between mealy and moore machines.
e) Explain the Chomsky Classification of language.
Q2 a) Simplify the grammar: (7)
S→aA, A→aaA/λ, B→bc/bbC, C→B
b) Prove L={abn : n>=0} to be regular using pumping lemma. (3)
Q3 a) Construct a PDA to accept the language L={anb3n: n>=0} (5)
b) Construct the minimum state automata equivalent to finite automata given by (Q0 is the
initial state and Q3,Q4 are final states): (5)
State a b
→Q0 (initial state) Q1 Q2
Q1 Q4 Q3
Q2 Q4 Q3
Q3 (Final state) Q5 Q6
Q4 (Final state) Q7 Q6
Q5 Q3 Q6
Q6 Q6 Q6
Q7 Q4 Q6

Q4 a) Construct the regular expression for the DFA shown below: (5)

b) Find the language for the grammar G=({S}, {a,b}, {S}, {P}) with P given as:
S→aSa/bSb/ λ (5)

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy