Question: Construct regular expressions for the below 'English' statements. If you cannot construct one, explain why that may be the case. 1. Given an alphabet ={a,b},
Construct regular expressions for the below 'English' statements. If you cannot construct one, explain why that may be the case. 1. Given an alphabet ={a,b}, a string where a is repeated even times and b odd times. 2. Given an alphabet ={a,b}, a string which does not end with aa. 3. Given an alphabet ={a,b}, a string which does not contain aa. 4. Given an alphabet ={a,b,c}, a string that has a symbol in the middle that is neither its start nor its end symbol, and its end and start symbols are different, for eg, abbbbbc or bccccca. 5. Given an alphabet ={a,b}, a string with a's followed by b's with both the number of a's and b's being equal. 6. A general email ID with between 13 to 18 characters before the @ symbol and 4 characters for a domain name and 'edu' for a top-level domain. 7. Given an alphabet with opening and closing parentheses only, express a string that contains the substring ((()
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
