Professional Documents
Culture Documents
1539 Assignment - 4 - KCS402
1539 Assignment - 4 - KCS402
Assignment 4
Maximum Marks: 20 Submission Date: 26th June, 2023
COURSE OUTCOMES
CO2(C214.2) Analyse and design, Turing machines, formal languages, and grammars K4, K6
Demonstrate the understanding of key notions, such as algorithm,
CO3(C214.3) computability, decidability, and complexity through problem solving K1, K5
Prove the basic results of the Theory of Computation.
CO4(C214.4) K2, K3
CO5(C214.5) State and explain the relevance of the Church-Turing thesis K1, K5
ii) Design a PDA that accepts the set of all strings over {0, 1}* with
Q1.
L= { 0n 1n | n >=1 } by null store (empty stack)
Simulate for input string: “000111” CO4(C214.4)
i) Define two stack PDA and construct a two stack PDA for
recognizing the following : L= { an bn cn dn | n >=1 }
ii) Define Non deterministic PDA and construct a two stack PDA for
Q3. recognizing the following : L= { ai bj ck | i==j OR j==k }
CO4(C214.4)
iii) Construct a PDA accepting the language of Even length
palindrome over {a, b}*
i) Consider the PDA M = ({q0, q1, q2 }, {a, b}, {A, Z0}, δ, q0, Z0, Ф ) where
δ is given as follows:
δ (q0, a, Z0 ) = { (q0, AZ0) }
δ (q0, a, A ) = { (q0, AA) }
δ (q0, b, A ) = { (q1, A) }
δ (q1, a, A ) = { (q1, Є) }
Q4. δ (q0, Є, Z0 ) = { (q2, Є) } CO4(C214.4)
Obtain the context free grammar that generates the same language which
is accepted by PDA M.
ii)
Construct a PDA by empty stack which accepts the following:
L= { am bm cn | m, n >=1 }
Also convert this PDA to equivalent CFG
i) Design a PDA for the context free grammar ( {S, A, B}, {a, b}, P,
S) where productions P are as follows:
S aABB| aAA
A aBB | a
B bBB | A
ii) Convert the Grammar G :
S SAB | SA | SB | C
Q5. CO4(C214.4)
A aAa | Bb | a
B BS | b
to a PDA that accept the language by empty stack.