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

Hcoe Toc Assgmt3

This document outlines an assignment on the Theory of Computation, detailing various tasks including defining context-free grammars, simplifying grammars, designing pushdown automata (PDA), constructing Turing machines, and explaining complexity classes P and NP. The assignment consists of multiple questions that require the application of theoretical concepts to generate languages, derivations, and automata. The submission deadline for the assignment is February 15.

Uploaded by

manishabudha111
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)
7 views2 pages

Hcoe Toc Assgmt3

This document outlines an assignment on the Theory of Computation, detailing various tasks including defining context-free grammars, simplifying grammars, designing pushdown automata (PDA), constructing Turing machines, and explaining complexity classes P and NP. The assignment consists of multiple questions that require the application of theoretical concepts to generate languages, derivations, and automata. The submission deadline for the assignment is February 15.

Uploaded by

manishabudha111
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

Theory of Computation

Assignment 3
(last date of submission Feb 15)
1. Define Context free grammar (CFG) for:
a. Language L={aa,ab,ba,bb}
b. L=1n
c. L=(0+1)*
2. Define right linear and left linear grammar.
3. Obtain the language generated by each of the following production rules

4. Simplify the following grammar


a. S→AB
A →aAA | ε
B→ bBB | ε
b. S→ABC
A→BB | ε
B→CC | a
C→AA |b
c. S→AAC
A→aAb | ε
C→aC | a
5. Design a PDA accepting all strings over ∑= {a,b} such that
a. number of a’s and b’s are equal.
b. L=anbn
6. Construct a PDA accepting language L={WWR}
7. Consider the regular grammar G = (N, T, P, σ), where N = set of non-terminal symbols = {σ,C}, T = set
of terminal symbols = {a,b}, P is the set of production rules = { a→bσ, σ→aC, C→bC, C→b } and σ
being the starting symbol. Construct a non-deterministic finite state automaton equivalent to the given
regular grammar. Use this non-deterministic finite state automaton to generate equivalent deterministic
finite state automaton
8. Given grammar G with production rules

Obtain the leftmost derivation and rightmost derivation and parse tree for w=aaabbabbba
9. Let G=(V,T,P,S) where productions in G denoted by P are
a. E→T|E+T
T→F|T*F
F→a | (E)
Define equivalent PDA to this grammar.
10. Construct a Turing machine to accept 0n1n.
11. Construct a Turing machine to accept string ab
12. Construct a Turing machine to accept anb2n.
13. Design a TM that performs f(x)=x+2.
14. Simply the grammar in QN 9.
15. Explain Class P, NP problems.

You might also like