Professional Documents
Culture Documents
TOC Assingment 1 & 2, 3,4,5
TOC Assingment 1 & 2, 3,4,5
THEORY ASSIGNMENT 1
Faculty Name: Shweta Jain Class: III Year Sec.: CS-A
Subject Code:BTCS-501 Subject Name: Theory of Computation Unit: 1&2
Level-1 (Mandatory) Date Of Submission
Basic Conceptual Theoretical Questions
Que Explain the basic structure of Finite state machine and 2 way finite
.1 automata.
Que Explain the concept of transition diagram and matrix.
As Per . 2
SVVV Que Differentiate between Mealy and Moore machine.
Syllabu . 3
s Que Describe the properties of regular expression.
.4
Que Describe the construction of regular grammar from regular expression.
.5
Level-2 (Mandatory) Date Of Submission
Problem Based Numerical Questions
Que Write regular expressions for the following languages over the alphabet
.1 Σ={a,b}:
(a) All strings that do not end with aa.
(b) All strings that contain an even number of b’s.
(c) All strings which do not contain the substring ba.
Que Consider the following non-deterministic finite automaton (NFA) over the
.2 alphabet Σ= {0, 1}.
As Per
SVVV
Syllabu
s
(b)
THEORY ASSIGNMENT 2
Faculty Name: Shweta Jain Class: III Year Sec.: CS-A
Subject Code:BTCS-501 Subject Name: Theory of Computation Unit: 3
Level-1 (Mandatory) Date Of Submission:- 24/09/ 2015
Basic Conceptual Theoretical Questions
Que. Describe context free and context sensitive grammar.
1
Que. Explain chomsky classification of grammar
As Per 2
SVVV Que. Define the following:
Syllabus 3 (i) Chomsky Normal from
(ii) Greibach Normal from
Que. Explain closure properties of CFL’s.
4
Level-2 (Mandatory) Date Of Submission:- 24/09/2015
Problem Based Numerical Questions
Que. S -> aB | bA
1 A -> aS | bAA | a
B -> bS | aBB | b
i.Find left most derivation
ii. Find right most derivation
iii. Parse Tree
For string aaabbabbb
Que. Write a CFG for the language L = {wcwr | w ϵ (a, b)*}
2
Que. Write a CFG for the regular expression r = 0*1(0+1)*
3
Que. Write a CFG, which generates palindrome for binary numbers
As Per 4
SVVV Que. Write a CFG for language L = {0i1j2k | k <= i or k <= j}
Syllabus 5
Que. Remove the unit productions from the following grammar
6 S -> AB
A -> a
B -> C / b
C -> D
D -> E
E -> a
Que. Identify and remove the unit productions from the following CFG
7 S -> S + T/ T
T -> T * F/ F
F -> (S)/a
THEORY ASSIGNMENT 3
Faculty Name: Shweta Jain Class: III Year Sec.: CS-A
Subject Code:BTCS-501 Subject Name: Theory of Computation Unit: 4
Level-1 (Mandatory) Date Of Submission:-
Basic Conceptual Theoretical Questions
Que. Define Pushdown Automata. Compare NFA and PDA.
1
Que. Define different types of language acceptances by PDA.
As Per
2
SVVV
Que. Is it true that the language accepted by a PDA by empty stock or that of
Syllabus
3 final states are different in language?
Que. Is it true the nondeterministic PDA is more powerful than that of
4 deterministic PDA? Justify your answer.
Level-2 (Mandatory) Date Of Submission:-
Problem Based Numerical Questions
Que. 1. Let M=({q0, q1},{0,1},{x,z0},A,q0,z0, ɸ).
1 Where δ is given by
δ (q0,0,z0)={(q0,xz0)}
δ (q0,0,x)={(q0,xx)}
δ (q0,1,x)={ (q1, ε)}
δ (q1,1,x)={ (q1, ε)}
δ (q1, ε, x)={ (q1, ε)}
δ (q1, ε, z0)={(q1, ε)}
Construct the CFG equivalent to this PDA.
Que. Construct PDA for the following grammar:
As Per
2 S ->AB
SVVV
A ->CD
Syllabus
B ->b
C ->a
D ->a
Que. Construct CFG without Є production from :
3 S → a | Ab | aBa ,
A → b | Є,
B → b | A.
THEORY ASSIGNMENT 4
Faculty Name: Shweta Jain Class: III Year Sec.: CS-A
Subject Code:BTCS-501 Subject Name: Theory of Computation Unit: 5