Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Find CFG ' s and Regular Grammer that generate these regular languages over the alphabet S = { a , b } : 1 .

Find CFG's and Regular Grammer that generate these regular languages over the alphabet
S={a, b}:
1. The language defined by (aaa + b)*
2. The language defined by (a + b)*(bbb + aaa)(a + b)*
3. All strings without the substring aaa.
4. All strings that end in b and have an even number of b's in total.
5. The set of all strings of odd length.
6. All strings with exactly one a or exactly one b.
7. All strings with an odd number of a's or an even number of b's.
For the following CFG's find regular expressions that define the same language
and describe the language.
8. S--aX bS aIb
X-- aX a
9. S- bS aX b
X-- bX aS a
10. S- aaS abSIbaSlbbSIA
11. S- aB IbA I A
A -- aS
B -- bS
12. S- aB bA
A ---> aB a
B --> bA b
13. S- aS bX a
X-- aX bY a
Y--> aY a
14. S--> aS bXl a
X--- aXI bY bZ a
Y-> aY a
Z---> aZ bW
W --> aW a
15. S- bS aX
X---> bS I aY
Y-raYlbYla lb
16.(i) Starting with the alphabet
S={ab()+*}
find a CFG that generates all regular expressions.
(ii) Is this language regular?

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

Concepts of Database Management

Authors: Philip J. Pratt, Joseph J. Adamski

7th edition

978-1111825911, 1111825912, 978-1133684374, 1133684378, 978-111182591

More Books

Students also viewed these Databases questions

Question

LO6 Define harassment and the role that HR plays in addressing it.

Answered: 1 week ago