Regular expression in theory of computation solved examples

15378

4. Find the regular expression for the set of all strings over {0, 1} ending with 00 and beginning with 1.

Solution: We have the input alphabets ∑ = {a, b}.

Here, the resultant regular expression will denote, “The set of all strings over the given ∑ which must start with 1 and ends with two consecutive 0’s i.e. 00.”

To fix this problem we first write the regular expression which represents the set of all strings over the given ∑. It is

(0 + 1)*

Now, the regular expression which fulfill the requirement of given problem can be written as-

1 (0 + 1)* 00

Previous QuizWhat is SEO-Definition with List of all major search engine
Next QuizRegular expression in theory of computation solved examples Part – 2

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.