Regular expression in theory of computation solved examples Part – 2

9014

Last Updated on Sep 30, 2016

This is 2nd Part of Regular expression in theory of computation solved examples. You can also read Regular expression in theory of computation solved examples Part – 1. 

Next

6. Construct a regular expression for all strings over {0, 1} of length 6 or less.

Solution:

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

Here, the resultant regular expression will denote the set of all strings over the given input alphabets ∑ of length 6 or less. The set of all strings of length zero or one can be given by the following regular expression-

            (λ + (0 + 1))

Thus, the resultant regular expression which denote the set of all strings over the given ∑ of length 6 or less can be given by-

(λ + (0 + 1)) (λ + (0 + 1)) (λ + (0 + 1)) (λ + (0 + 1)) (λ + (0 + 1)) (λ + (0 + 1))

As per the mathematically representation we can write it as-

            (λ + (0 + 1))6

Next
Previous QuizRegular expression in theory of computation solved examples
Next QuizRegular expression examples in theory of automata Part – 3

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.