Toc Assignement Unit2 KJD
Toc Assignement Unit2 KJD
THEORY OF COMPUTATION-3160704
Assignment –I – Unit 2
1 Write regular expressions for the following languages defined over Σ = {0, 1}:
a. The language of all the strings that do not end with 01.
b. The language of all the strings containing even number of 0’s and even number of 1’s.
c. The language accepting all the strings which are ending with 00.
d. The language accepting the strings which are starting with 1 and ending with 0
e. The language having which should have at least one 0 and atleast one 1
f. The language L which accepts all the strings which begin or end with either 00 or 11.
2 Write regular expressions for the following languages defined over Σ = {a,b}:
a) The language starting and ending with a and having any combinations of b’s between.
b) The language in which 3rd character from right end of string is always a.
c) The language which accepts all the strings with at least two b’s
d) The language consists of exactly two b’s
e) The language of all the strings with next-to-last symbol is a.
f) The language of all the strings containing substring bba.
r= (a + ab)*
4 Enlist types of grammars, types of languages and types of automata.
5 Draw DFA for the following languages defined over Σ = {a, b}:
a. The language of all the strings with next-to-last symbol is a.
b. The language of all the strings containing substring bba.
14
15 Convert the given Moore machine into Mealy machine. Draw state transition diagram of Mealy
machine.
16
Subject Co-ordinator:
Dr Kruti Dangarwala