Regular expression in theory of computation solved examples Part 4

9542

Next

6. Find the regular expression over ∑ = {0, 1} in which all string is of even length.

Solution:

We have the input alphabets ∑ = {0, 1}

Here, the regular expression denote the set of all strings which is of even length over the given input alphabet ∑ = {0, 1}.

To finding the required regular expression, we have to find out the strings of even length over given ∑. That is, we have to find out the stings of length 0, 2, 4, 6, 8, and soon over the given input alphabets ∑ = (0, 1).

The sting of length 0 over given ∑ = λ.

The stings of length 2 over given ∑ = 00, 01, 10 and 11.

Thus, the regular expression which represent all strings of even length over the given ∑ can be written as-

                        (00 + 01 + 10 + 11)*

or,                    ((0 + 1)(0 + 1))*

This is the resultant regular expression.

Next
Previous QuizRegular expression examples in theory of automata Part – 3
Next QuizWhat is VPN : Definition, Uses and Working

1 COMMENT

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.