GATE Exam  >  GATE Questions  >  Consider the following grammar:S -> aBAA -... Start Learning for Free
Consider the following grammar:
S -> aBA
A ->aAE | E
B ->bBC | b
C -> cCD | D
D ->aDC
E ->ED | eE | e
F -> SeF
After removal of useless symbols, how many productions violate the rules of
greibach normal form?
    Correct answer is '1'. Can you explain this answer?
    Verified Answer
    Consider the following grammar:S -> aBAA ->aAE | EB ->bBC | b...
    C, D and F are the useless symbols in given grammar.
    After removal of useless symbol the grammar will be
    S -> aBA
    A -> aAE | E
    B -> b
    E -> eE | e
    Then AÃ E is the only production which is not according to GNF.
    View all questions of this test
    Most Upvoted Answer
    Consider the following grammar:S -> aBAA ->aAE | EB ->bBC | b...


    Identifying the Violation of Greibach Normal Form

    To determine the number of productions that violate the rules of Greibach Normal Form in the given grammar after removal of useless symbols, we need to consider the following rules of Greibach Normal Form:
    1. Each production should have a single non-terminal as the leftmost symbol.
    2. Each production should have a terminal as the second symbol.
    3. Each production should have a string of terminals and non-terminals following the second symbol.

    Analysis of the given grammar

    After removing useless symbols, the grammar becomes:
    S -> aB
    A -> aAE | E
    B -> bBC
    C -> cCD
    D -> aD
    E -> eE | eF
    F -> SeF

    Evaluating the productions

    1. S -> aB (violates GNF rule as 'a' is a terminal but not the second symbol)
    2. A -> aAE | E (satisfies GNF rules)
    3. B -> bBC (satisfies GNF rules)
    4. C -> cCD (satisfies GNF rules)
    5. D -> aD (satisfies GNF rules)
    6. E -> eE | eF (satisfies GNF rules)
    7. F -> SeF (satisfies GNF rules)

    Conclusion

    Out of the given productions, only the production S -> aB violates the rules of Greibach Normal Form. Thus, there is only 1 production that violates the rules of GNF in the given grammar.
    Explore Courses for GATE exam
    Consider the following grammar:S -> aBAA ->aAE | EB ->bBC | bC -> cCD | DD ->aDCE ->ED | eE | eF -> SeFAfter removal of useless symbols, how many productions violate the rules ofgreibach normal form?Correct answer is '1'. Can you explain this answer?
    Question Description
    Consider the following grammar:S -> aBAA ->aAE | EB ->bBC | bC -> cCD | DD ->aDCE ->ED | eE | eF -> SeFAfter removal of useless symbols, how many productions violate the rules ofgreibach normal form?Correct answer is '1'. Can you explain this answer? for GATE 2024 is part of GATE preparation. The Question and answers have been prepared according to the GATE exam syllabus. Information about Consider the following grammar:S -> aBAA ->aAE | EB ->bBC | bC -> cCD | DD ->aDCE ->ED | eE | eF -> SeFAfter removal of useless symbols, how many productions violate the rules ofgreibach normal form?Correct answer is '1'. Can you explain this answer? covers all topics & solutions for GATE 2024 Exam. Find important definitions, questions, meanings, examples, exercises and tests below for Consider the following grammar:S -> aBAA ->aAE | EB ->bBC | bC -> cCD | DD ->aDCE ->ED | eE | eF -> SeFAfter removal of useless symbols, how many productions violate the rules ofgreibach normal form?Correct answer is '1'. Can you explain this answer?.
    Solutions for Consider the following grammar:S -> aBAA ->aAE | EB ->bBC | bC -> cCD | DD ->aDCE ->ED | eE | eF -> SeFAfter removal of useless symbols, how many productions violate the rules ofgreibach normal form?Correct answer is '1'. Can you explain this answer? in English & in Hindi are available as part of our courses for GATE. Download more important topics, notes, lectures and mock test series for GATE Exam by signing up for free.
    Here you can find the meaning of Consider the following grammar:S -> aBAA ->aAE | EB ->bBC | bC -> cCD | DD ->aDCE ->ED | eE | eF -> SeFAfter removal of useless symbols, how many productions violate the rules ofgreibach normal form?Correct answer is '1'. Can you explain this answer? defined & explained in the simplest way possible. Besides giving the explanation of Consider the following grammar:S -> aBAA ->aAE | EB ->bBC | bC -> cCD | DD ->aDCE ->ED | eE | eF -> SeFAfter removal of useless symbols, how many productions violate the rules ofgreibach normal form?Correct answer is '1'. Can you explain this answer?, a detailed solution for Consider the following grammar:S -> aBAA ->aAE | EB ->bBC | bC -> cCD | DD ->aDCE ->ED | eE | eF -> SeFAfter removal of useless symbols, how many productions violate the rules ofgreibach normal form?Correct answer is '1'. Can you explain this answer? has been provided alongside types of Consider the following grammar:S -> aBAA ->aAE | EB ->bBC | bC -> cCD | DD ->aDCE ->ED | eE | eF -> SeFAfter removal of useless symbols, how many productions violate the rules ofgreibach normal form?Correct answer is '1'. Can you explain this answer? theory, EduRev gives you an ample number of questions to practice Consider the following grammar:S -> aBAA ->aAE | EB ->bBC | bC -> cCD | DD ->aDCE ->ED | eE | eF -> SeFAfter removal of useless symbols, how many productions violate the rules ofgreibach normal form?Correct answer is '1'. Can you explain this answer? tests, examples and also practice GATE tests.
    Explore Courses for GATE exam
    Signup for Free!
    Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
    10M+ students study on EduRev