Bsc CSIT Semester 4 – Theory of Computation – Unit III: Regular Expressions (6 Hrs.)
Comprehensive questions and detailed answers for Unit III: Regular Expressions (6 Hrs.). Perfect for exam preparation and concept clarity.
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.
Show that language
is not a regular language.
Give the regular expressions for the following language over alphabet {a, b}.
a. Set of all strings with substring bab or abb.
b. Set of all strings whose 3 symbol is ‘a’ and 5 symbol is ‘b’.
Show that L = { a | n is a prime number } is not a regular language.
Convert the following regular expression into equivalent Finite Automata
a. (0+1)*10(1+0)
b. 1*0(0+1)*1
Write regular expression over {a,b} that represents
a. Strings having exactly two a’s and atleast two b’s.
b. Strings having an even number of a’s and each a followed by at least one b.
Using pumping lemma, prove that the language L = {a b c | j=i+k} is not regular.
Differentiate Kleen closure from positive closure. Compute positive and Kleen closure of {ab}.
Construct regular expression over {1,2,….9} that represents
a. strings of even numbers with length 4 starting with 2 and ending with 8.
b. strings starting with odd numbers and ending with even numbers.
Sample Questions
Show that language \[L = { 0^m 1^m | m ≥ 1 }\] is not a regular language.
Give the regular expressions for the following language over alphabet {a, b}. a. Set of all strings with substring bab or abb. b. Set of all strings whose 3 symbol is ‘a’ and 5 symbol is ‘b’.
Show that L = { a | n is a prime number } is not a regular language.
Convert the following regular expression into equivalent Finite Automata a. (0+1)10(1+0) b. 10(0+1)1
And more questions available on this page.