Concepts of Programming Languages (11th Edition)
Concepts of Programming Languages (11th Edition)
11th Edition
ISBN: 9780133943023
Author: Robert W. Sebesta
Publisher: PEARSON
Question
Book Icon
Chapter 4, Problem 2PS
Program Plan Intro

Pairwise Disjointness Test:

Perform the pairwise disjointness test on the following grammar rules, for each pair of rules find the disjoint such as Aai and Aaj.

If the intersection of First(ai) and First(aj) is equivalent to the , it means pair pass the disjointness test.

Explanation of Solution

b) AB{aB}|a

Consider the above grammar to perform pairwise disjointness.

Find the First set for Right Hand Side of non-terminal symbol A.

FIRST (b{aB}) = {b}

FIRST (a) = {a}

Now, perform the intersection of FIRST (b{aB})FIRST&#

Explanation of Solution

c) BaB|a

Find the First set for Right Hand Side of non-terminal symbol B.

FIRST (aB) = {a}

FIRST (a) = {a}

Now, perform the intersection of FIRST (aB)FIRST </

Blurred answer
Students have asked these similar questions
S -> aSa | aXa X ->aXa | bYb Y -> bYb | empty where S is the start symbol, non-terminals = {S, X, Y}, terminals = {a, b} Convert this grammar to Chomsky Normal Form.  Show the steps in this conversion.
Topic: Concepts of programming Language Perform the pairwise disjointness test for the following grammar rules. (please give a few details)i. S → aSb|bAAii. A → b{aB}|biii. B → aB|bA
Convert this grammar into a push down automaton
Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Text book image
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Text book image
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
Text book image
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education