Universit¨at Duisburg-Essen SS 2012
Ingenieurwissenschaften / Informatik May 8, 2012
Professor: Dr. Sander Bruggink Exercise sheet 3
Teaching assistent: Jan St¨uckrath Deadline: 14 May 2012
Automaten und formale Sprachen
Exercise 7 Conversion to regular grammars (6 points) Let the following deterministic automata M1 and M2 be given:
M1 : s1 s2 s3
s4 a
b, c
a b
c
a, b, c
b a
c
M2 : t1 t2
t3 t4
a
b c
c
a, b
a a, c b, c
b
(a) Describe, in words or in set notation, the languages L1 and L2, which are accepted by
the automata M1 and M2. (2 p)
(b) Construct a regular grammar for each language L1 and L2, by means of the procedure
presented in the lecture. (4 p)
Exercise 8 Conversion of finite automata (6 points) Let the following non-deterministic automata N1 and N2 with input alphabets Σ1 = {a, b, c}
and Σ2 ={a, b} be given:
N1 : s1 s2 s3
a, b, c a, c
a, c b
a, c
b
N2 : t1 t2
t3 a
a
b b
a
b
ConvertN1 andN2 to deterministic automataM1 and M2 by means of the power set construc- tion.
(Note: You only have to specify reachable states.)
1
Exercise 9 Regular expressions for regular languages (8 points) Give a (non-deterministic) finite automaton for each of the following languages over the alphabet Σ ={a, b, c}, which accepts exactly the given language.
(a) The set of all words of even length, where every second symbol is a b. (2 p)
(b) The set of all words, where the words length is dividable by three. (2 p)
(c) The set of all words which start witha and end with a. (2 p)
(d) The set of all words of any length which consist of at most two different symbols (for example this language contains aabb and ccc but notabbc). (2 p)
The solutions to this exercise sheet must be submitted before Monday, 14 May 2012 at 16:00. Put your solutions in the letterbox labeled Automaten und formale Sprachen adja- cent to room lf, or hand them in through the online moodle-platform. If you hand in online, please upload your solutions as a single pdf-file. Your name, student number, group number and the lecture name (“Automaten und formale Sprachen”) must be clearly written on your solutions.
2