0
Design DPDA to accept language means number of of a and b.

$L= { x {a, b}*|N_a(x) >N_b(x) }, N_a(x) >N_b(x)$

Mumbai university > Comp > SEM 4 > TCS

Marks: 10M

Year: Dec 2015

0  upvotes
0

In DPDA there is only one move in every situation. A DPDA is less powerful than NPDA.

Every context free language cannot be accepted by a DPDA

Logic:

L = { x {a, b}* | Na(x) > Nb(x) }, Na(x) > Nb(x) means number of a's and b’s.

Implementation:

$ M = (Q, Σ, Ґ, δ,q_0, z_(0 ), F )$

$ Q = {q_0, q_1, q_f}$

$Σ = {a, b}$

$Ґ = {X, R}$

$q_0 = q_0$

$z_0 = R$

$F = {q_f}$

δ:

$δ (q_0, a, R) = {(q_0, XXR)}$

$δ (q_0, a, X) = {(q_0, XXX)}$

$δ (q_0, b, X) = {(q_1, €)}$

$δ (q_1, b, X) = {(q_1, €)}$

$δ (q_1, €, R) = {(q_f, R)}$

enter image description here

Example:

$(q_0, aaabbbbbb, R)$

$| - (q_0, aabbbbbb, XXR)$

$| - (q_0, abbbbbb, XXXXR)$

$| - (q_0, bbbbbb, XXXXXXR)$

$| - (q_1, bbbbb, XXXXXR)$

$| - (q_1, bbbb, XXXXR)$

$| - (q_1, bbb, XXXR)$

$| - (q_1, bb, XXR)$

$| - (q_1, b, XR)$

$| - (q_1, €, R)$

$| - (q_f, €, R)$

(Accept)

0  upvotes
Please log in to add an answer.

Next up

Read More Questions

If you are looking for answer to specific questions, you can search them here. We'll find the best answer for you.

Search

Study Full Subject

If you are looking for good study material, you can checkout our subjects. Hundreds of important topics are covered in them.

Know More