• Keine Ergebnisse gefunden

Automaten und formale Sprachen

N/A
N/A
Protected

Academic year: 2021

Aktie "Automaten und formale Sprachen"

Copied!
2
0
0

Wird geladen.... (Jetzt Volltext ansehen)

Volltext

(1)

Universit¨ at Duisburg-Essen SS 2012

Ingenieurwissenschaften / Informatik May 14, 2012

Professor: Dr. Sander Bruggink Exercise sheet 4

Teaching assistent: Jan St¨ uckrath Deadline: 21 May 2012

Automaten und formale Sprachen

Exercise 10 Regular expressions for regular languages (8 points)

Give regular expressions for the languages given below over the alphabet Σ = {a, b, c}.

(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 with a 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 not abbc). (2 p)

(Note: When writing down your regular expressions use only the notation used in the definition of regular expression from the lecture.)

Exercise 11 Comparison of regular expressions (6 points) (a) Motivate why

L(a | b ) ( L((a | b) ) holds. Prove the fact, that

L(a | b ) ⊆ L((a | b) ), but not L(a | b ) = L((a | b) ).

(3 p)

(b) Specify a regular expression γ, for which

L((a | b) ) = L(γ)

holds and additionally γ may not contain any occurence of the operator |. Explain – if possible with a proof – why your regular expression γ is a suitable solution. (3 p)

(Note: You may use without proof, that L(ϕ ) = [

n∈ N

0

(L(ϕ)) n

for arbitrary regular expressions ϕ holds.)

1

(2)

Exercise 12 Conversion of regular expressions in finite automata (6 points)

Let Σ = {a, b, c}. The following regular expressions over Σ are given:

α = (a | b | abc) and β = (a | c) (a | b) .

(a) Explain in words or in set notation, which languages L(α) and L(β) are described by

these regular expressions? (2 p)

(b) Convert both regular expressions α and β to non-deterministic automata M α and M β . Use the procedure from the lecture! The automata M α and M β must accept the same language, as is described by the regular expressions α and β. Thus the following should hold:

L(α) = T (M α ) and L(β) = T (M β ).

In addition indicate all intermediate steps of your transformation. Finite automta for a,

b and c do not have to be given seperately. (4 p)

The solutions to this exercise sheet must be submitted before Monday, 21 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

Referenzen

ÄHNLICHE DOKUMENTE

Put your solutions in the letterbox labeled Automaten und formale Sprachen adjacent to room lf , or hand them in through the online moodle -platform. If you hand in online,

Bitte werfen Sie Ihre Abgabe in den mit Automaten und formale Sprachen beschrifteten Briefkasten neben Raum lf , oder geben Sie sie online ab ¨ uber die moodle-Plattform.. Wenn

Put your solutions in the letterbox labeled Automaten und formale Sprachen adjacent to room lf , or hand them in through the online moodle -platform. If you hand in online,

Bitte werfen Sie Ihre Abgabe in den mit Automaten und formale Sprachen beschrifteten Briefkasten neben Raum lf , oder geben Sie sie online ab ¨ uber die moodle-Plattform.. Wenn

Put your solutions in the letterbox labeled Automaten und formale Sprachen adjacent to room lf , or hand them in through the online moodle -platform.. If you hand in online,

Put your solutions in the letterbox labeled Automaten und formale Sprachen adjacent to room lf , or hand them in through the online moodle -platform. If you hand in online,

Bitte werfen Sie Ihre Abgabe in den mit Automaten und formale Sprachen beschrifteten Briefkasten neben Raum lf  , oder geben Sie sie online ab über die moodle-Plattform. Wenn

(c) ”Pump” and ”shrink” the word by doubling and removing parts of the syntax tree. Think about at which position in the word, the last a or the first b