Ilovepdf Merged 3
Ilovepdf Merged 3
Note: 01. Answer any FIVE full questions, choosing at least ONE question from each MODULE.
02. Draw transition diagrams wherever necessary.
*Bloom’s COs
Module -1 Taxonomy Marks
Level
Q.01 a Obtain a DFA to accept strings of a’s and b’s having odd number L3 CO1 5
of a’s and even number of b’s.
b Draw a DFA to accept decimal strings divisible by 3. L3 CO1 6
c Define the following terms with example: L2 CO1 9
i) Alphabet ii) Power of Alphabet iii) Languages
OR
Q.02 a Obtain an ϵ- NFA which accepts strings consisting of zero or more a’s L3 CO1 5
followed by zero or more b’s followed by zero or more c’s.
b Define Deterministic Finite Automata. Explain the two preferred L2 CO1 6
notations for describing the Transition Function with an example.
c Obtain a DFA for the following NFA using lazy evaluation method. L3 CO1 9
Module-2
Q. 03 a List applications of RE. What are the notations used in UNIX Operation L2 CO2 5
system? List few Regular expressions with its UNIX notations.
b Obtain an ∈-NFA for the Regular Expression (a+b)* bb (a+b)* L3 CO2 6
c Find the minimized DFA of the following. L3 CO2 9
OR
Q.04 a Define Pumping Lemma. Prove that below language is not a regular L2 CO2 5
Language. L ={ ai bj | i > j }
b Develop Regular expressions for the following Languages on Ʃ = { a, b} L3 CO2 6
i) Accept strings of a’s and b’s whose fifth symbol from the right end is
a.
ii) Accept strings of a’s and b’s containing not more than 3 a’s.
c Find Regular language accepted by the following FA by L3 CO2 9
eliminating states?
Page 01 of 02
BCS503
Module-3
Q. 05 a What is ambiguous grammar? Explain the Techniques for reducing L3 CO3 5
ambiguity in the grammar with suitable examples.
b Show that the following grammar is ambiguous by taking the string aab. L3 CO3 6
S aS | aSbS | ϵ
c Design the Context Free Grammar for the following Languages. L3 CO3 9
i) To accept the set of all strings with no more than three a’s
when Ʃ = {a, b}.
ii) To accept the set of strings with any number of a’s and b’s
with at least one a.
OR
Q. 06 a For the below Grammar obtain the corresponding PDA L3 CO3 5
S aABC, A aB | a, B bA | b, Ca
b Let G be the Grammar L3 CO3 6
S aB | bA
A a | aS | bAA
B b | bS | aBB
For the string aabbabab, find
i) Derivation Tree ii) Leftmost Derivation iii) Rightmost Derivation
c Define CFG. Design CFG for the following Languages: L3 CO3 9
i) Consisting of set of all non-palindromes over Ʃ ={a,b}
ii) L = { 0n1n+1 | n ≥ 0 }
iii) L = { wcwR : w ϵ {a,b}*, wR is the reverse of w}
Module-4
Q. 07 a Define the following with suitable examples: L2 CO4 6
(i) Inherently ambiguous Language (ii) Chomsky Normal Forms
(iii) Greibach Normal Form
b Remove all the ϵ-productions and Unit productions from the L3 CO4 6
grammar:
S aA | aBB A aAA | ϵ B bB | bbC C B
c Define GNF. Convert the following grammar into GNF. L3 CO4 8
S AB1 | 0 A 00A | B B 1A1
OR
Q. 08 a Write the LMD, RMD and Parse tree for the string: +*-xyxy L3 CO4 6
using the grammar E +EE | *EE | -EE | x | y
b Obtain the following grammar in CNF: L3 CO4 6
S ASB | ϵ A aAS | a B SbS | A | bb
c Define CNF. Convert the following grammar into CNF. L3 CO4 8
S 0A | 1B A 0AA | 1S | 1 B 1BB | 0S | 0
Module-5
Q. 09 a Define Turing Machine. With a neat Block diagram, explain the L2 CO5 6
the working of basic Turing Machine.
b Design a Turing Machine to accept all set of palindrome over L3 CO5 6
{a,b}*. Draw the transition table and also transition diagram.
Show the sequence of IDs for the string: “ababa”
c Write a short note on: L2 CO5 8
a) Multitape Turing Machine
b) Nondeterministic Turing Machine
OR
Q. 10 a Briefly explain The Techniques for Turing Machine construction. Also L2 CO5 6
write applications of Turing Machine.
b Design a Turing Machine to accept the Language: L3 CO5 6
Page 02 of 02
BCS503
L={anbn | n ≥1 }. Draw the transition diagram and show the moves made
by TM for the string: “aaaabbbb”.
c Design a Turing Machine to accept strings formed on {0,1}* and L3 CO5 8
ending with 000. Write transition diagram and sequence of IDs for
w = 101000
*Bloom’s Taxonomy Level: Indicate as L1, L2, L3, L4, etc. It is also desirable to indicate the COs and POs to be
attained by every bit of questions.
Page 03 of 02
KLE Dr. M.S. Sheshgiri College of Engineering & Technology, Library, Belagavi
KLE Dr. M.S. Sheshgiri College of Engineering & Technology, Library, Belagavi
KLE Dr. M.S. Sheshgiri College of Engineering & Technology, Library, Belagavi
15CS54
pm
USN
Fifth Semester B.E. Degree Examination, Dec.2018/Jan.2019
5
Automata Theory and Computability
7 :2
Time: 3 hrs. Max. Marks: 80
:4
Note: Answer any FIVE full questions, choosing ONE full question from each module.
G
12
2. Any revealing of identification, appeal to evaluator and /or equations written eg, 42+8 = 50, will be treated as malpractice.
-T
Module-1
1 a. Define the following with example :
9
i) String ii) Language iii) Alphabet iv) DFSM.
G
(08 Marks)
01
b. Design a DFSM to accept each of the following languages :
-T
i) L = {W {0, 1}* : W has 001 as a substring}
-2
ii) L = {W {a, b}* : W has even number of a’s and even number of b’s}. (08 Marks)
Important Note : 1. On completing your answers, compulsorily draw diagonal cross lines on the remaining blank pages.
G
01
-T
OR
7-
2 a. Define NDFSM. Convert the following NDFSM to its equivalent DFSM. (08 Marks)
G
-0
-T
U
m
-T
6p
G
G
:4
-T
-T
59
G
G
-T
12
-T
Module-2
G
19
G
3 a. Define Regular expression and write Regular expression for the following language.
-T
i) L = {a2n b2m | n ≥ 0 , m ≥ 0 }
-T
(08 Marks)
20
b. Obtain the Regular expression for the following FSM. (08 Marks)
TG
1-
-T
-0
G
07
-T
OR
G
4 a. Define a Regular grammar. Design regular grammars for the following languages.
-T
b. State and prove pumping theorem for regular languages. (08 Marks)
-T
1 of 2
G
-T
TG
15CS54
pm
Module-3
5
5 a. Define context free grammar. Design a context free grammar for the languages. (08 Marks)
:2
i) L = {0m 1m 2n | m ≥ 0 , n ≥ 0} ii) L = {ai bj | i ≠ j , i ≥ 0 , j ≥ 0}
iii) L = {an bn-3 | n ≥ 3}.
7
b. Consider the grammar G with production.
:4
S → AbB
G
12
A→ aA| (08 Marks)
-T
B → aB | bB |
Obtain leftmost derivation , rightmost derivation and parse tree for the string aaabab.
G
01
OR
-T
6 a. Define a PDA. Obtain a PDA to accept
-2
L = {an bn | W {a, b}*}. Draw the transition diagram. (08 Marks)
G
01
b. Convert the following grammar into equivalent PDA.
-T
S → aABC
7-
C → a.
-T
U
Module-4
VT
7 a. State and prove pumping lemma for context free languages. Show that (10 Marks)
L = {an bn cn | n ≥ 0} is not context free. m
-T
6p
b. Explain Turing machine model. (06 Marks)
G
G
:4
OR -T
-T
8 a. Design a Turing machine to accept the language L = {0n 1n 2n | n ≥ 1}. (08 Marks)
59
b. Design a Turing machine to accept strings of a’s and b’s ending with ab or ba. (08 Marks)
G
G
-T
12
Module-5
-T
(06 Marks)
19
G
1-
-T
OR
10 a. What is Halting problem of Turing machine? (06 Marks)
-0
b. Define the following : i) Quantum computer ii) Class NP. (06 Marks)
G
(04 Marks)
-T
G
*****
-T
G
-T
G
2 of 2
-T
TG
KLE Dr. M.S. Sheshgiri College of Engineering & Technology, Library, Belagavi - 590008
KLE Dr. M.S. Sheshgiri College of Engineering & Technology, Library, Belagavi - 590008
KLE Dr. M.S. Sheshgiri College of Engineering & Technology, Library, Belagavi - 590008