(2) The following questions are related to regular expression and regular language: (i) Let E= {a, b} and r,r2, r be regular expressions. Find all the regular ones from the following expressions: a, 1, a. p, a + b, r³, r* ·$, (($)) + rị + r2, ri + r2 + r1, r*), (r1, ra), {n + r2}, (n · r2) (ii) Let E= {a, b}. Given regular expressions r = a*b*, r' = ba(ab)* + ab*ba* and r" = (a + b)aa(a + b)*, find L(*), L(r'), and L(r"), the languages defined by r, r', r", respectively. (i) Let Σ= (α b (a) Given the language L = {b"a": m,n 2 0}, find the regular expression r such that L(r) = L. (b) Given the language L = {(ba)", a"™b", aa: m,n 2 0}, find the regular expression r such that L(r) = L. (c) Given the language L = {ba b"a, (ab)*, aa: n,m 2 0 and h 2 1}, find the regular expression r such that L(r) = L.

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter2: Problem Solving Using C++using
Section2.1: Introduction To C++
Problem 1E: (Practice) State whether the following are valid function names and if so, whether they’re mnemonic...
icon
Related questions
Question
(2) The following questions are related to regular expression and regular language:
(i) Let E= {a, b} and r, r2,r be regular expressions. Find all the regular ones from the following
expressions:
a, 2, a. p, a+ b, r³, r³ ·¢, (()) + rị + r2, rị + r, ÷ n, r*), (ri, r2), {r + r3}, (n r2)
(ii) Let E = {a, b}. Given regular expressions r = a*b*, r' = ba(ab)* + ab*ba* and
p" = (a + b)aa(a + b)*, find L(r), L(r), and L(r"), the languages defined by r,r',r", respectively.
( i) Let Σ= (α b
(a) Given the language L = {b"a": m,n 2 0}, find the regular expression r such that L(r) = L.
(b) Given the language L = {(ba)", a™ b", aa: m,n > 0}, find the regular expression r such that
L(r) = L.
(c) Given the language L = {ba" b"a, (ab)*, aa: n,m 2 0 and h 2 1}, find the regular
expression r such that L(7) = L.
Transcribed Image Text:(2) The following questions are related to regular expression and regular language: (i) Let E= {a, b} and r, r2,r be regular expressions. Find all the regular ones from the following expressions: a, 2, a. p, a+ b, r³, r³ ·¢, (()) + rị + r2, rị + r, ÷ n, r*), (ri, r2), {r + r3}, (n r2) (ii) Let E = {a, b}. Given regular expressions r = a*b*, r' = ba(ab)* + ab*ba* and p" = (a + b)aa(a + b)*, find L(r), L(r), and L(r"), the languages defined by r,r',r", respectively. ( i) Let Σ= (α b (a) Given the language L = {b"a": m,n 2 0}, find the regular expression r such that L(r) = L. (b) Given the language L = {(ba)", a™ b", aa: m,n > 0}, find the regular expression r such that L(r) = L. (c) Given the language L = {ba" b"a, (ab)*, aa: n,m 2 0 and h 2 1}, find the regular expression r such that L(7) = L.
Expert Solution
steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr