2076 6

Theory of Computation20765 marksRegular Expressions

Give the regular expressions for following language over alphabet {0, 1}. a. Set of all strings with 2nd symbol from right is 1. b. Set of all strings starting with 00 or 11 and ending with 10 or 01.

Give the regular expressions for following language over alphabet {0, 1}. a. Set of all strings with 2nd symbol from right is 1. b. Set of all strings starting with 00 or 11 and ending with 10 or 01. [5]

Analysis: To ensure the 2nd symbol from the right is 1, the string must have the form: - The last symbol can be either 0 or 1, i.e., (0+1) - The 2nd from right must be 1 - Before that, there can be any string of 0s and 1s (including empty), i.e., (0+1) Regular Expression: $$R = (0+1)^ \cdot 1 \cd...

Up nextShow that language is not a regular language. L = 0m 1m mid m geq 1