TOC Question Bank
TOC Question Bank
CS6503
THEORY OF COMPUTATION
Question Bank
To equip students with values, ethics and life skills needed to enrich their lives and
M3
enable them to meaningfully contribute to the progress of society
M4 To prepare students for higher studies and lifelong learning, enrich them with the
practical and entrepreneurial skills necessary to excel as future professionals and
contribute to Nation’s economy
Vision of Department
To emerge as a globally prominent department, developing ethical computer professionals,
innovators and entrepreneurs with academic excellence through quality education and research.
Mission of Department
M3 To produce engineers with good professional skills, ethical values and life skills for the
betterment of the society.
PEO3 Apply ethical knowledge for professional excellence and leadership for the
betterment of the society.
PEO4 Develop life-long learning skills needed for better employment and
entrepreneurship
Program Specific Outcomes (PSOs)
An ability to understand the core concepts of computer science and engineering and to
PSO1 enrich problem solving skills to analyze, design and implement software and hardware
based systems of varying complexity.
To interpret real-time problems with analytical skills and to arrive at cost effective and
PSO2 optimal solution using advanced tools and techniques.
BTL6: Creating.,
BTL 5: Evaluating.,
BTL 4: Analyzing.,
BTL 3: Applying.,
BTL 2: Understanding.,
BTL 1: Remembering
SYLLABUS
Total= 45 Periods
TEXT BOOKS:
REFERENCES:
C504.1 Design Finite State Automata and Regular Expression for any language
C504.2 Illustrate the design of Context Free Grammar for any language set
C504.3 Demonstrate the push down automaton model for the given language
C504.4 Make use of Turing machine concept to solve the simple problems
• δ is a transition function (Q X ∑ → Q )
1
6 0,1
Q0 Q1 Q2 Q3
0 0
0
APR/MAY 2010
9 1
1 B
A
0 0 0 0
C D
1
“if H then C”
18 q0 q1 q3
0 0
• δ is a transition function (Q X ∑ → Q )
PART B
1 Explain the different forms of proof with
examples. (8) NOV/DEC 2012
C504.1 BTL 1
2 Prove that, if L is accepted by an NFA with ε-
transitions, then L is accepted by an NFA without
C504.1 BTL 1
ε-transitions. (8) NOV/DEC 2012, NOV/DEC
2013
5 n
Prove by induction on n that i = n(n + 1) / 2
i =0
C504.1 BTL 1
(6) MAY/JUNE 2012
RE1=(0+1)+ 00
RE2=0(0+1)+1
1 1 1 1 1
0 0 0 0
7
0,1
1
0,1
1 1 0
Is the set of strings over the alphabet {0} of the form 0n where n
is not a prime is regular? Prove or disprove.
8 C504.2
BTL 1
NOV/DEC 2011
Assume that the set is regular. Let p be the pumping length of the
language. Then, according to the pumping lemma, break the string
s=0p into s=xyz where y has positive length.
Complement of L=∑* - L
(0+1)*00
S→aB|bA C504.2
BTL 1
17
A→a|aS|bAA
B→b|bS|aBB
Construct a CFG for set of strings that contain equal number of a’s
19
and b’s over ∑ = {a,b}. MAY / JUNE 2016
C504.2
BTL 1
S->A|B
A→aA|€
B→bB|€
What is unambiguity?
20
Refer notes
C504.2
BTL 1
Mention the application of CFG.
21
Refer notes
C504.2
BTL 1
Construct the Context free grammar representing the set of
22 palindromes over (0+1)* NOV/DEC 2015
C504.2
BTL 1
S->0S0|1S1| ε
PART B
1 Prove that there exists an NFA with ε-transitions that accepts the
regular expression γ. (10)
C504.2
BTL 1
MAY/JUNE 2012, NOV/DEC 2010
S→aAa | bBb |€
A→C|a
B→C|b
C→CDE | €
D→A|B|ab
(ii) Constuct a CFG for the regular expression (011+1)(01). (6)
MAY/JUNE 2016
S→ aSbS | bSaS | SS
Refer notes
A→aA|BaC|aaa
B→bBb|a
C→CA|AC
S→ BaB
A→ aA|aaa
B→bBb|a
δ:Q X (∑ U {ε}) X Г → Q X Г*
10
q0 – q0 in Q is the start state
S→ aSb |ab
Is the grammar E→E+E|id is ambigupus ?
Justify. NOV/DEC 2010
C504.3 BTL 1
12
• It is ambiguous, The sentence such as
id+id+id can have more than one
LMD (or) RMD (or) Parse tree.
A→a
22
When is Push Down Automata (PDA) said to C504.3 BTL 1
be deterministic? NOV/DEC 2016
2. S→aSb|ab
S→a
Q – {q0,q1,q2}
10 ∑ - {a,b}
Г – (a,b,B}
q0 – Initial state
q2 - Final state
δ(q0,a) = (q1,a,R)
δ(q1,a) = (q1,a,R)
δ(q1,b) = (q1,b,R)
δ(q1,B) = (q2,B,R)
where
δ:Q X Г → Q X Г X {L,R,S}
q0 – Initial state
B ε Г – Blank Symbols
F - Final state
Refer Notes
S→aAD A→aB|bAB B→ b D→ d
(6) NOV/DEC 2014
PART - A
S. Question Course Outcome Blooms
No. Taxanomy
Level
When we say a problem is decidable? Give an
1 example of undecidable problem. NOV/DEC
C504.5 BTL 1
2012 Refer notes
What is recursively enumerable language?
NOV/DEC 2012, MAY/JUNE 2012, NOV/DEC
2 C504.5 BTL 1
2010, MAY/JUNE 2013, NOV/DEC 2013