Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Convert the following languages, expressed in English, to Regular Expressions. In each part, take the set of symbols to be = {a,b} (a) A language

image text in transcribed

image text in transcribed

Convert the following languages, expressed in English, to Regular Expressions. In each part, take the set of symbols to be = {a,b} (a) A language that contains all those words, which contain the pattern 'aaab', at least twice (b) A language that contains all those words, where the number of 'a' leaves a remainder of 2 when divided by 3. (C) A language that contains all those words, where the total number of 'b' is either 2, or 4 (none other is accepted) (d) A language that contains all those words, in which 'b' is never tripled. That is, there is no occurrence of 'bbb'. (A very similar example is there in the videos). For part (b), ---- Well you have to think a bit. Note that the number of a's can be written as 3K + 2, where K is some integer. Now you know how to make a regular expressions (i) for all words with exactly 3 a's, (ii) for all words with exactly 2 a's (see the examples in the videos). So, the accepted words, will repeat pattern (i) as often as it like (star), and then then the word would end with pattern (i). (a) Convert the following Regular Expression to an NFA (use the constructions for star, and union, which has been shown in the videos) ((a + ba)*b)* + bba (b) Convert the following NFA to a regular expression (use the procedure, as in the videos. That is, add a couple of states, and then remove all the other states one by one (see the videos). Convert the following languages, expressed in English, to Regular Expressions. In each part, take the set of symbols to be = {a,b} (a) A language that contains all those words, which contain the pattern 'aaab', at least twice (b) A language that contains all those words, where the number of 'a' leaves a remainder of 2 when divided by 3. (C) A language that contains all those words, where the total number of 'b' is either 2, or 4 (none other is accepted) (d) A language that contains all those words, in which 'b' is never tripled. That is, there is no occurrence of 'bbb'. (A very similar example is there in the videos). For part (b), ---- Well you have to think a bit. Note that the number of a's can be written as 3K + 2, where K is some integer. Now you know how to make a regular expressions (i) for all words with exactly 3 a's, (ii) for all words with exactly 2 a's (see the examples in the videos). So, the accepted words, will repeat pattern (i) as often as it like (star), and then then the word would end with pattern (i). (a) Convert the following Regular Expression to an NFA (use the constructions for star, and union, which has been shown in the videos) ((a + ba)*b)* + bba (b) Convert the following NFA to a regular expression (use the procedure, as in the videos. That is, add a couple of states, and then remove all the other states one by one (see the videos)

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_2

Step: 3

blur-text-image_3

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

Focus On Geodatabases In ArcGIS Pro

Authors: David W. Allen

1st Edition

1589484452, 978-1589484450

More Books

Students also viewed these Databases questions

Question

Differentiate between accrual-basis and cash- Bae accounting.

Answered: 1 week ago

Question

2. How much time should be allocated to the focus group?

Answered: 1 week ago

Question

1. Where will you recommend that she hold the focus group?

Answered: 1 week ago