← RGPV CS-501 Theory of Computation May 2023 Solved Paper
Question
Give a regular expression for strings containing 1100 as a substring.
Asked in: CS-501 | May 2023 | 3(i)
Answer
Required regular expression: (0+1)*1100(0+1)*.
The prefix and suffix are arbitrary binary strings. The middle block is mandatory. 1100 and 011001 are accepted; 110 and 1010 are not.
Here + denotes union, juxtaposition denotes concatenation and * denotes Kleene closure. The expression generates every required word and no word outside the specified set.
Discussion
Ask a question, share your thoughts or report an error.
Sign in to participate in the discussion.
Join the discussion