Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Consider the following grammar. S YaSb X +aXY XY YX| 6 | Answer the following questions based on the grammar above. 1. Which of the

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

Consider the following grammar. S YaSb X +aXY XY YX| 6 | Answer the following questions based on the grammar above. 1. Which of the following variables are nullable? X Y S 2. After removing the nullable/epsilon productions, which of the following grammars can be derived? S+YaSbaSb X+aXY|6X|Y|ax|ay|a|b Y + X|b S+YaSblaSb X + aXY|6X|Y|ax|ay|6 Y + X16 S+YaSbaSb XaXY|5X|Y|ax|alb Y + Xb None of the above 3. After removing the epsilon productions and then the unit productions, which one of the following grammars can be derived? S+YaSbaSb XaXY|0X|ax|ay|a Y +aXY|bx|aX|ay|a|b o S+YaSbaSb XaXY|5X|ay|alb YaXY|bX|ay|a|b S+YaSbaSb XaXY|0X|ax|a16 Y +aXY|bx|ax|a|6 -> S+YaSbaSb XaXY|5X|ax|ay|a|b Y +aXY|6X]aX|ay|a|b 4. Which of the following productions are already in CNF? (The capital and small letters are non-terminals and terminals respectively) S XYZ S XY X Oxba

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing

Authors: David M. Kroenke, David Auer

11th Edition

B003Y7CIBU, 978-0132302678

More Books

Students also viewed these Databases questions