For = {0,1}, give a regular expression r such that L (r) = {W * : w has at least
ID: 3530647 • Letter: F
Question
For = {0,1}, give a regular expression r such that L (r) = {W * : w has at least one pair of consecutive zeros}. One can arrive at an answer by reasoning something like this: Every string in L(r) must contain 00 somewhere, but what comes before and what goes after is completely arbitrary. An arbitrary string on {0, 1} can be denoted ; by (0 + 1)*. Putting these observations together, we arrive at the solution r = (0 + 1)* 00(0 + 1)*. Does the expression ((0 + 1) (0 + 1)*)*00(0 + 1)* denote the language in Example 3.5?Explanation / Answer
yes it denotes the language as it contains 1 pair of consecutive zeros , and string before & after may be any arbit combinations as per the rule
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.