Question

Build a NPDA to recognize the language

{a^(m1)b^(n1)···a^(mk)b^(nk): k≥1; ∀l, 1 ≤ l ≤ k, ml ≥1∧nl ≥ 1; ∃i, j,1 ≤ i,j ≤ k, mi=nj}

These are the strings of alternating “runs” of a’s and b’s such that there is (at least) one run of a’s with the same length as one run of b’s.

Answer #1

Design a Non-Deterministic PDA for accepting the above language L.

= {a,b,z}

z = Start symbol

q_{0} = Initial state

q_{f} = Final state

= perform pop operation

[Attaching the imag consisting of NPDA state diagram and the transition funtion.]

ADVERTISEMENT

Get Answers For Free

Most questions answered within 1 hours.

ADVERTISEMENT

asked 6 minutes ago

asked 7 minutes ago

asked 12 minutes ago

asked 45 minutes ago

asked 1 hour ago

asked 1 hour ago

asked 1 hour ago

asked 1 hour ago

asked 1 hour ago

asked 1 hour ago

asked 1 hour ago

asked 2 hours ago