Professional Documents
Culture Documents
,,, - E E Ee Eeee Eex
,,, - E E Ee Eeee Eex
Assignment 2
Due date : 19/2/2022
2. Consider the following grammar G that generates expressions involving the binary
operators , , , :
E E E | E E | EE | E E | (E) | x
Starting from initial ID (q, w, #), show all the reachable ID’s when the input w is :
a) 0011
b) 010
4. Construct npda that will accept the language generated by the grammar
G ({S , A},{a, b}, S , P) with productions:
S → AA | a
A → SA | b
S → AaA | CA | BaB
A → aaBa | CDA | aa | DC
B → bB | bAB | bb | aS
C → Ca | bC | D
D → bD | b
6. What language is accepted by the machine
M ({q0 , q1, q2 , q3},{a, b},{a, b, }, , q0 , ,{q3}) with
7. Construct Turing machines that will accept the following languages on {a,b}:
a. L L(abba *b * a)
b. L {a nbn a nbn : n 0}
8 Design a Turing machine by providing the algorithm and transition diagram for
the following problem specification.