0% found this document useful (0 votes)
26 views2 pages

Toc Summer 2021

The document contains a summer exam for the Theory of Computation subject. It consists of 5 questions testing concepts related to formal languages and automata theory like regular expressions, finite automata, context-free grammars, pushdown automata, Turing machines and more. Students are required to attempt all questions which can be answered in short paragraphs or by drawing diagrams.

Uploaded by

Jayraj Rajput
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)
26 views2 pages

Toc Summer 2021

The document contains a summer exam for the Theory of Computation subject. It consists of 5 questions testing concepts related to formal languages and automata theory like regular expressions, finite automata, context-free grammars, pushdown automata, Turing machines and more. Students are required to attempt all questions which can be answered in short paragraphs or by drawing diagrams.

Uploaded by

Jayraj Rajput
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/ 2

Seat No.: ________ Enrolment No.

___________

GUJARAT TECHNOLOGICAL UNIVERSITY


BE - SEMESTER–VI (NEW) EXAMINATION – SUMMER 2021
Subject Code:2160704 Date:05/08/2021
Subject Name:Theory of Computation
Time:02:30 PM TO 05:00 PM Total Marks: 70
Instructions:
1. Attempt all questions.
2. Make suitable assumptions wherever necessary.
3. Figures to the right indicate full marks.

Q.1 (a) Define DFA and NFA and NFA- Λ 03


(b) Write Regular Expressions corresponding to each of the following subsets of {0,1}* 04
(i) The language of all strings containing both 101 and 010 as substrings.
(ii) The language of all strings that do not end with 01.
(c) Use the principle of mathematical induction to prove that 07
1 +3 +5 + … +(2n-1) = n2 for all n>0 where r is an odd integer & n is the number of
terms in the sum.
Q.2 (a) Define onto, one-to-one, and bijection functions. 03
(b) Using constructive approach determine NFA- Λ for the regular expression 04
(0 + 1)*1(0 + 1).
(c) Convert the CFG, G ({S,A,B},{a,b},P , S) to CNF , where P is as follows 07
S → aAbB
A → Ab | b
B → Ba | a
OR
(c) Convert the Mealy machine shown in given figure into Moore machine. 07

Q.3 (a) Define CFG. When is a CFG called an ‘ambiguous CFG’? 03


(b) Draw FA for accepting: The strings with odd no of 1’s and odd no of 0’s. 04
(c) Convert following NFA- Λ to NFA 07
q δ(q, Λ) δ(q, 0) δ(q, 1)
A {B} {A} φ
B {D} {C} φ
C φ φ {B}
D φ {D} φ
OR
Q.3 (a) Give recursive definitions of the extended transition functions, δ* for DFA and NFA. 03
(b) For the language L = { xcxr | x → {a,b}* } design a PDA(Push Down Automata). 04
(c) Write Kleene’s Theorem part-I, Any regular language can be accepted by a finite 07
automation.
1
Q.4 (a) State pumping lemma for regular languages. 03
(b) Explain push down automata with example. 04
(c) Minimize the DFA shown in Fig: 07

OR
Q.4 (a) What is Turing Machine? Write advantages of TM over FSM. 03
(b) Write a short note on Universal Turing Machine. 04
(c) Convert the following grammar to a PDA: 07
I → a | b | Ia | Ib | I0 | I1
E → I | E * E | E + E | (E)
Q.5 (a) What are the applications of regular expressions and finite automata? 03
(b) Consider following grammar: 04
S → ASB | Λ
A → aAS | a
B → SbS | A | bb
i. Eliminate useless symbols, if any.
ii. Eliminate Λ productions.
(c) Draw a Turing Machine(TM) to accept Palindromes over {a,b}. (Even as well as Odd 07
Palindromes).
OR
Q.5 (a) Define grammar and chomsky hierarchy. 03
(b) Write a short note on church-turing thesis. 04
(c) Write a Turing Machine to copy strings. 07

*************

You might also like