Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1 - Recognizing simple languages: For each of the following grammars, briefly describe the language it defines in a sentence or two. Assume that the

1 - Recognizing simple languages: For each of the following grammars, briefly describe the language it defines in a sentence or two. Assume that the start symbol is S for each and that any symbol found only on the right hand side of a production is a terminal symbol. We've done the first one for you as an example. Hint: if it's not obvious by inspection, try writing down sentences in the language until you can see the patterns emerging. If it is obvious by inspection, write down some sentences generated by the grammar to verify that they match your expectations and fit your English description. Please be as precise as possible in describing the language.

0 - Example) S -> a S a S -> b Answer: This grammar defines the language consisting of strings of N a's (where N >= 0) followed by one b followed by N a's. Another description could be strings of zero or more as followed by one b followed by zero or more as.

1 ) S -> Q a Q -> b S Q -> c 2) S -> A B C A -> a | Aa B -> bB | bc C -> cCc | cc

3) S -> A B C D A -> a | aA B -> Bb | b C -> bC | b D -> a | aD

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 Design Application Development And Administration

Authors: Michael V. Mannino

3rd Edition

0071107010, 978-0071107013

More Books

Students also viewed these Databases questions

Question

Explain the steps involved in training programmes.

Answered: 1 week ago

Question

What are the need and importance of training ?

Answered: 1 week ago