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

FLAT PAPER Gtu

This document is an examination paper for the Formal Language and Automata Theory subject at Gujarat Technological University. It includes various questions related to finite automata, context-free grammars, and Turing machines, with specific tasks such as proving ambiguities, designing automata, and converting between different forms. The exam is scheduled for December 7, 2023, and consists of multiple questions with a total of 70 marks.

Uploaded by

thedev.het
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)
40 views2 pages

FLAT PAPER Gtu

This document is an examination paper for the Formal Language and Automata Theory subject at Gujarat Technological University. It includes various questions related to finite automata, context-free grammars, and Turing machines, with specific tasks such as proving ambiguities, designing automata, and converting between different forms. The exam is scheduled for December 7, 2023, and consists of multiple questions with a total of 70 marks.

Uploaded by

thedev.het
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–V (NEW) EXAMINATION – WINTER 2023
Subject Code:3151605 Date:07-12-2023
Subject Name:Formal Language and Automata Theory
Time:10:30 AM TO 01:00 PM Total Marks:70
Instructions:
1. Attempt all questions.
2. Make suitable assumptions wherever necessary.
3. Figures to the right indicate full marks.
4. Simple and non-programmable scientific calculators are allowed.

MARKS

Q.1 (a) What is Finite Automata? Differentiate DFA vs. NFA. 03


(b) Write regular expressions (REs) over alphabet {0, 1} 04
1. Strings start with 0 and has odd length
2. Strings have odd length
3. Strings end with 1 and not contain 00
4. Strings start with 1 and has even length
(c) Draw Finite Automata for following languages: 07
1. L1 = {x/x 00 is not substring of x, x ∈ {0,1}*}
2. L2 = {x/x ends with 01, x ∈ {0,1}*}
Draw FA for 𝐿1 ∪ 𝐿2 , 𝐿1 ∩ 𝐿2 and 𝐿1 − 𝐿2

Q.2 (a) Prove that CFG: S→ aSbS | bSaS | 𝜖 is ambiguous. 03


(b) Define Context Free Grammar. 04
1. Write CFG for regular expression (a|b)*a(a|b)*a(a|b)*
2. Write CFG for equal no. of ‘a’ and ‘b’
(c) Use the pumping lemma to show that following language is not Context 07
Free: L = {anbncn|n>=0}
OR
(c) Design PDA for palindrome with middle symbol ‘c’. 07
Q.3 (a) Design FAs with ∑ = {0, 1} that accept 03
1. The set of all strings with three consecutive 0's.
2. The set of all strings those start with ‘1’ and end with ‘0’.
(b) Convert given CFG to CNF. 04
S → ASB | 𝜖
A → aAS | a
B → SbS | A | bb
(c) Convert NFA to FA using subset construction method. 07
NFA Transition table
𝒒 𝜹(𝒒, 𝒂) 𝜹(𝒒, 𝒃)
1 {2,3} {4}
2 {𝜙} {4}
3 {4} {3}
4 {𝜙} {𝜙}

1
OR
Q.3 (a) Write CFG for balanced parentheses and derive ( ( ) ( ) ) 03
(b) Draw left most derivation tree for string ‘aaabbabbba’ using CFG 04
S → aB | bA
A → aS | bAA | a
B → bS | aBB | b
(c) Minimize given FA 07

Q.4 (a) Explain classification of grammar as per Chomsky hierarchy. 03


(b) Draw right most derivation tree for string ‘aaabbabbba’ using CFG 04
S → aB | bA
A → aS | bAA | a
B → bS | aBB | b
(c) Conversion from NFA - ^ to FA 07
𝒒 𝜹(𝒒, ^) 𝜹(𝒒, 𝟎) 𝜹(𝒒, 𝟏)
A {B} {A} 𝜙
B {D} {C} 𝜙
C 𝜙 𝜙 {B}
D 𝜙 {D} 𝜙

OR
Q.4 (a) Differentiate Finite Automata vs. Pushdown Automata 03
(b) Show that the function f(x,y) = x + y is primitive recursive 04
(c) Given a CFG, G = ({S, A, B}, {0,1}, P, S) with P as follows: 07
S → 0B | 1A
A → 0S |1AA | 0
B → 1S | 0BB | 1
Convert it into equivalent PDA.
Q.5 (a) What operations are performed by Turing machine? 03
(b) Explain the halting problem in brief. 04
(c) Design a Turing machine for accepting (anbncn | n>=0) 07
OR
Q.5 (a) Differentiate recursive language vs. recursively enumerable language 03
(b) Explain Post’s Correspondence Problem (PCP) in brief. 04
(c) Design a Turing machine for copy a string. 07

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

You might also like