(15p) Consider the Context-free grammar G defined by:
\(\mathrm{S} \rightarrow a S|b T b S| \varepsilon\)
\(\mathrm{T} \rightarrow a T \mid \varepsilon\)
a) Describe \(\mathrm{L}(\mathrm{G})\). (5p)
b) Convert G into a Pushdown Automaton (PDA). (10p)
plz thumbs up
formal language automata 1. (15p) Consider the Context-free grammar G defined by: S → 0A1A1A1A A0A1A a) Describe L(G). (5p) b) Convert G into a Pushdown Automaton (PDA). (10p)
Consider the context-free grammar with the rules (E is start variable) E → E + T | T T → T × F | F F → ( E ) | a Convert CFG to an equivalent PDA using the procedure given in Theorem 2.20.
Homework. Section 5.1 #m}. Hint: Think of this language 1. Design a context-free grammar for the language {a" b n as the union of {a"b" | n > m} and {a") n<m}. 2. Consider the context-free grammar G = (N,T, P, S), defined by N = {S}, T = {a,b), and P = {S + Sbs | bSaS | }. Find derivations, and corresponding parse trees, for the following strings: aaabbb, bbbaaa, ababab. What is L(G)?
consider the language L = { a^m b^n : m>2n}, give context free grammar and Nondeteministc pUSH DOWN AUTOMATON
Given the following ambiguous context free grammar (3x20) 1. (a) Explain why the grammar is ambiguous (b) Find an equivalent unambiguous context-free grammar. (c) Give the unique leftmost derivation and derivation tree for the string s generated from the unambiguous grammar above. 2. Construct non-deterministic pushdown automata to accept the following language (20) 3. Convert the following CFG into an cquivalent CFG in Chomsky Normal Form (CNF) (20)-
1. Give a context-free grammar for the set BAL of balanced strings of delimiters of three types (), and . For example, (OOis in BAL but [) is not. Give a nondeterministic pushdown automata that recognizes the set of strings in BAL as defined in problem 1 above. Acceptance should be by accept state. 2. Give a context free grammar for the language L where L-(a"b'am I n>-o and there exists k>-o such that m-2*ktn) 3. Give a nondeterministic pushdown...
true/false 21 Uncountable infinity (for example, the cardinality of the real numbers). No Countable infinity (for example, the cardinality of the integers) ? All strings over the alphabet ?. CFG Context-free Grammar CFL Context-free Language L(G) The language generated by a CFG G. L(M) The language accepted by the automaton M. PDA Pushdown Automaton/Automata ISI The cardinality of set S. For example, I01 -o, and if S is an infinite set, ISI could be No or J1 L <M> L(M)...
Use a general algorithm to construct a (non-deterministic) pushdown automaton that corresponds to the following context-free grammar with the starting variable S: S → Aab, A → Sba; S → ε. Show, step by step, how the word baab will be accepted by this automaton. Its derivation in the given grammar is straightforward: S → Aab → Sbaab → baab.
determine if the language is regular, context-free, Turing-decidable, or undecidable. For languages that are regular, give a DFA that accepts the language, a regular expression that generates the language, and a maximal list of strings that are pairwise distinguishable with respect to the language. For languages that are context-free but not regular, prove that the language is not regular and either give a context- free grammar that generates the language or a pushdown automaton that accepts the language. You need...
Construct a PDA for the context free grammar: S → AxA | By | zC A → B | a B → C | b C → SS | c | ε