<S>::=<V><Z> <Z>::=<W><N> <V>::=a<Z>|<empty> <W>::=c | <T> <N>::=c<N>|<empty> <T>::=b<T>|b Either draw the parse tree for the following strings, or indicate that the string is not in the language described by the grammar. a. aca b. acb c. cbb
Added by Stephanie G.
Close
Step 1
Step 1: The string "aca" can be derived from the grammar as follows: <S> => <V><Z> => a<Z><Z> => a<W><N><Z> => ac<N><Z> => ac<empty><Z> => ac<W><N> => acc<N> => acc<empty> => aca Show more…
Show all steps
Your feedback will help us improve your experience
Supreeta N and 60 other AP CS educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
Let M be the language over {a, b, c} accepting all strings so that: No a's occur before the first c. No b's occur after the first c. The last symbol of the string is c. There are fewer b's than a's. Construct a context-free grammar generating M.
Supreeta N.
Let $G$ be the grammar with $V=\{a, b, c, S\} ; T=$ $\{a, b, c\} ;$ starting symbol $S ;$ and productions $S \rightarrow$ $a b S, S \rightarrow b c S, S \rightarrow b b S, S \rightarrow a,$ and $S \rightarrow c b .$ Construct derivation trees for $$ \begin{array}{l}{\text { a) bcbba. } \quad \text { b) bbbcbba. }} \\ {\text { c) } b c a b b b b b c b \text { . }}\end{array} $$
Modeling Computation
Languages and Grammars
Construct a PDA equivalent to the CFG S ---> aCBbC | CC | a B ---> CSC | BCB | b C ---> aS | bS | a Give a leftmost derivation for w = ababba and its corresponding computation on the PDA.
Akash M.
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
Transcript
18,000,000+
Students on Numerade
Trusted by students at 8,000+ universities
Watch the video solution with this free unlock.
EMAIL
PASSWORD