Draw a top down, push down automata for the following grammar.
S -> CaB
B -> baC | a
C -> Cb | a

The grammar contains left recursion for
C->Cb/a (A->A alpha/beta)
We can eliminate using
A->betaA'
A'->alphaA'/€
Please give positive rating as I took around 1and 1/2hour to solve correctly
Draw a top down, push down automata for the following grammar. S -> CaB B ->...
Draw the state diagram of a Push-down Automata that recognizes the language A = {u#v_R | u, v {0, 1}* and u =v}. In this set, treat u and v as bit strings where v is the bit-complement of v. For example, 0100#1 101 A, 0100#1010 A #1010#1010 A and so on. Let M = (Q, sigma, , delta, q_0, F) be a push-down automata. Describe a push-down
QUESTION TWO a. Explain a Push Down Automata (10 Marks) b. Suppose a file consists of as and bs only and the search is for the string "abba". Construct an FSM for doing this search. [10 Marks)
Q1: Given the below language and context free gramma:, a. Show that the grammar is ambiguous using the string ( abc) by using substitutions. b. Then design a push down automata that recognizes the language. C. Then show the tracing of (abc, abbccc) using the push down automata. d. Then Show which two simple languages create the greaterlanguage. Give set builder notation for each language. e. Then produce Chomsky normal form for the grammar. The following context-free language is inherently...
QUESTION THREE a. Construct a Push Down Automata that accepts L= {On In|n20; [10 Marks) b. A finite-state machine can also be used to model a simple automated teller machine (ATM). Construct an FSM for an ATM that accepts deposits and withdrawals [10 Marks)
Construct a Push Down Automata (PDA) that accepts the set of all strings of properly nested parentheses.
3. Construct a push down au gprnerated by a grammar with producti (npda) that accepts the lana B--b b. Show that the npda in part a accepts the language a 0 RE
3. Construct a push down au gprnerated by a grammar with producti (npda) that accepts the lana B--b b. Show that the npda in part a accepts the language a 0 RE
AUTOMATA Given the regular grammar G, G = (Ν, Σ, Π, S), where Ν = {S, A, B} Σ = {a, b} Π = {S → aA, S → aB, A → a, B->a} Starting symbol S is S. Prove that the regular grammar G is ambiguous.
() Question 1: Construct a push down automata that recognizes palindromes of both even and odd length. (You may use non-determinism.)
construct a push down automata that recognises each of the
following languages.
D = {0m1rom+n | m, n >0} b. E = {xc" | x € {a,b}", n > 0, and x has na's or n b’s} Hint: Ę is the union of two simpler context-free languages. IT
Push Down Automata Make PDA for: am b3m cn d2n where m and n are natural numbers.