Answered step by step
Verified Expert Solution
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
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started