# Automata Theory by ashrafp

VIEWS: 64 PAGES: 1

• pg 1
```									                                         Automata Theory

1. Suppose that a context-free grammar G = (V, T, S, P) has a production of the form   ���� → ��������
where x, y ∈ ���� ∪ ���� + . Prove that if this rule is replaced by
A  By,
B  x,

Where ����  V , then the resulting grammar is equivalent to the original one.

2. Consider the following grammar G:
S  AaA | CA | BaB
A  aaBa | CDA | aa| DC
B  bB | bAB | bb | aS
C  Ca | bC | D
D  bD | b

a) Wite the grammar G1 in Chomsky normal form
b) Write the grammar G2 in Greibach normal form
c) Construct the pushdown automata for the grammar G2.

3. Design a Turing machine (TM) by providing the algorithm and transition diagram for the
following problem specification.

Input : n 1’s, 0, m 1’s , 0, more than n*mb’s
Output : replace n*m b’s with 1’s
(It does not matter n*m b’s with 1’s )

Example         Input :    1101110bbbbbbb (2x3=6)
Output :   ??0???0111111b
Example         Input :    110110bbbbb    (2x2=4)
Output :   ??0??01111b

b) Show the ID for input 1101110

4.      a) L ={ ww | w in ∑* } is not a CFL. L is recognized by a Turing machine. What essential
feature does a Turing machine. What essential feature does a Turing machine have that a
NPDA did not have to be able recognize L?

b) What is the difference between Recursive and recursive Enumerable Language?
c) What is undecidable problems?
d) State the Chomsky hierarchy of languages.

Due date: 2 Nov 2010.

```
To top