Problem 2. (Regular Expressions) Write a corresponding regular expression for the following regular languages. Where Σ = {a,b}. a) L= {hi, hello} b) L = {w₁bw₂: w₁ € {a,b}* and w₂ € {a,b}*} c) L = {b2nam: n, m≥ 1} d) L = {w: w E {a,b}* and Na(w) ≤ 2 and N₂(w) ≤ 2} e) L = {w: w E {a,b}* and Na(w) is odd or N₂(w) is odd}

Question
Problem 2. (Regular Expressions) Write a corresponding regular expression for the following regular
languages. Where Σ = {a, b}.
a) L= {hi, hello}
b) L = {w₁bw₂: W₁ E {a,b}* and w₂ € {a,b}*}
c) L = {b2n am: n, m≥ 1}
d) L = {w: w E {a,b}* and Na(w) ≤2 and No (w) ≤ 2}
e) L = {w: w E {a,b}* and Na(w) is odd or N₂(w) is odd}
Transcribed Image Text:Problem 2. (Regular Expressions) Write a corresponding regular expression for the following regular languages. Where Σ = {a, b}. a) L= {hi, hello} b) L = {w₁bw₂: W₁ E {a,b}* and w₂ € {a,b}*} c) L = {b2n am: n, m≥ 1} d) L = {w: w E {a,b}* and Na(w) ≤2 and No (w) ≤ 2} e) L = {w: w E {a,b}* and Na(w) is odd or N₂(w) is odd}
Expert Solution
steps

Step by step

Solved in 4 steps

Blurred answer