7. Eliminate useless productions from S -> a|aA|B|C, A -> aB|?, B -> Aa, C -> cCD, D -> ddd|Cd.
Added by Barbara M.
Close
Step 1
A production is considered useless if it does not contribute to the generation of any terminal string. In the given grammar, all productions are reachable from the start symbol S. So, there are no unreachable productions. Show more…
Show all steps
Your feedback will help us improve your experience
Akash M and 91 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
6
Tim T.
Select the correct alternative from the given choices. Remove null productions, useless symbols from the following grammar result in: $S \rightarrow A B C$ $A \rightarrow a B C$ $B \rightarrow C \mid \varepsilon$ $C \rightarrow c d \mid D C F$ $D \rightarrow d D \mid \varepsilon$ $E \rightarrow e F E$ $F \rightarrow e C$ (A) $S \rightarrow A B C \mid A C$ $A \rightarrow a B C \mid a C$ $B \rightarrow C$ $C \rightarrow c d|D C F| C F$ $D \rightarrow d D \mid d$ $F \rightarrow e C$ (B) $S \rightarrow a B C c$ $A \rightarrow a B C$ $B \rightarrow c D|d D E F| d E F$ $C \rightarrow c D|d D E F| d E F$ $F \rightarrow e B$ $D \rightarrow d D \mid d$ $E \rightarrow e F E \mid e$ (C) $S \rightarrow a B C B C \mid a B C$ $B \rightarrow c D|d D E F| d E F$ $F \rightarrow e B$ $C \rightarrow d D \mid d$ $D \rightarrow e$ $F \rightarrow C D \mid d D E F$ (D) None of these
Theory of Computation
CONTEXT FREE LANGUAGES AND PUSH DOWN AUTOMATA
5. P(AĚ…) 6. P(BĚ…) 7. P(AĚ… and BĚ…) 8. P(A | B) 9. P(B | A) 10. P(AĚ… | BĚ…)
Jainendra O.
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
Transcript
Watch the video solution with this free unlock.
EMAIL
PASSWORD