
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Question

Transcribed Image Text:Show a context-free grammar for each of the following languag
Example 1: {a¹bm: m > n, m-n is even}
Context-free grammar for the language:
S -> aSb
S -> Sbb
S-> €
Example 2: {albi: i, j≥0 and 2i = 3j + 1}
Context-free grammar for the language:
S->aaaSbb
S -> aab
![(5) {w € [a, b]* : w=wR}
O S -> aSa
S-> bsb
o
o
S-> a
S-> b
S-> aSa
S-> bsb
S-> €
S-> b
S-> aSa
S-> bsb
S-> €
S-> a
S-> aSa
S-> bsb
S-> €
S-> a
S-> b](https://content.bartleby.com/qna-images/question/a3dbb91f-777d-47b2-aa94-40b3e17142a5/ed0720f7-3274-4272-9756-e83a15ffd9ae/2ij79ge_thumbnail.png)
Transcribed Image Text:(5) {w € [a, b]* : w=wR}
O S -> aSa
S-> bsb
o
o
S-> a
S-> b
S-> aSa
S-> bsb
S-> €
S-> b
S-> aSa
S-> bsb
S-> €
S-> a
S-> aSa
S-> bsb
S-> €
S-> a
S-> b
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution
Trending nowThis is a popular solution!
Step by stepSolved in 3 steps with 2 images

Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- 1a. Fill out the following blanks to make it a context-free grammar for the given language over the alphabet {a, b}: 1b. Fill out the following blanks to make it a context-free grammar for the given language:arrow_forwardexplain pleasearrow_forward1. Give a context-free grammar that generates the language A = {a'bick | i jor j = k where i, j, k ≥ 0} Is your grammar ambiguous? Why or why not?arrow_forward
- Context Free Grammar State whether it is ambiguous or unambiguous. If it is ambiguous give an equivalent unambiguous grammar. If it is unambiguous, state all the precedences and associativities enforced by the grammar. <E > -> <F > ∩ <E > | <F > ∪ <E > | <F ><F > -> <F > ∧ <G > | <F > ∨ <G > | <G ><G > -> N | ( <E >)arrow_forward1. Give a context-free grammar generating the following language (Σ= {a, b, #}): {w#x | the reverse of w is a substring of x for w, x = {a, b}*} 2. Give a context-free grammar that generates the following language! k≥ 2, each x; Є {a, b}*, and for X1 some i and ji, x₁ = x R (= {a, b, #} and x denotes the reverse of xj.) 3. Give a pushdown automaton recognizing the following language: {w the length of w is odd and the middle symbol is a 0} (Σ= {0,1}) 4. Prove the following language is context-free: {x#y | x, y = {a, b}* and x y} (Σ= {a, b, #}) MacBook Airarrow_forwardConvert the following context-free grammar G to an equivalent PDA, where Σ = {a,b} and V = {A,X,Y} with starting variable A (please show the illustrated equivalent PDA): A-> X YX-> a X | aY-> b Y | εarrow_forward
- The following is a context-free grammar G: V={A,B,C} S={a,b} vO=S S->A A alb| A B A->B S ala B->B al\e Convert G into an equivalent context-free grammar in Chomsky normal form. a) Show your grammar rules after Step 1 b) Show your grammar rules after Step 2 c) Show your grammar rules after Step 3 d) Show your grammar rules after Step 4arrow_forwardAlert dont submit AI generated answer.arrow_forwardProvide the rules for context-free grammars that generate the following languages. L3 = {w ∈ {0, 1} | n0(w) ≥ 2, and n1(w) is odd}arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education

Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON

Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education