• 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 21, 2012

Professor: Dr. Sander Bruggink Exercise sheet 5

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

Automaten und formale Sprachen

Exercise 13 Conversion of finite automata in regular expressions (6 points) Let the following non-deterministic automata M 1 and M 2 be given:

M 1 : s 1 s 2 s 3

s 4 a

a, b b

a b b

M 2 :

t 1

t 2

t 3 t 4

b a

a, b a

a, b

Convert both non-deterministic automata M 1 and M 2 to regular expressions α and β. Use the procedure from the lecture! The regular expressions α and β have to describe the same language, as is accepted by the automata M 1 and M 2 . Thus the following should hold:

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

In addition indicate all intermediate steps of your transformation.

(Note: If you apply the rule S (deletion of loops) as late as possible the resulting regular expressions will be smaller.)

Exercise 14 Pumping Lemma for beginners (6 points)

Show by means of the Pumping Lemma for regular languages, that the following languages are not regular:

(a) L 1 = {a k b (k

2

) | k ∈ N 0 } (3 p)

(b) L 2 = {ba k ca k b | k ∈ N 0 } (3 p)

Your proof should have the following form:

Let n be an arbitrary natural number. We choose the word x = . Then x ∈ L and |x| ≥ n holds. We can decompose x in the following ways, such that |uv| ≤ n, |v| ≥ 1):

1) u = , v = , w = , where

2) u = , v = , w = , where

3) u = , v = , w = , where

For every decomposition there is an index i such that uv i w / ∈ L. For the decompositions mentioned above, we choose the indices as follows:

1) i = , such that uv i w = ∈ / L, because

1

(2)

2) i = , such that uv i w = ∈ / L, because 3) i = , such that uv i w = ∈ / L, because According to the Pumping Lemma L is therefore not regular.

(Note: The number of different dedompositions depends on the chosen word and the way of describing the decompositions.)

Exercise 15 Equivalence of Words (8 points)

In this exercise the equivalence of words according to the Myhill-Nerode equivalence shall be examined. Justify the correctness of your answers!

(a) Let the language L 1 = {(abc) n | n ∈ N 0 } over the alphabet Σ = {a, b, c} be given. In the following we use ≡ L

1

as equivalence relation.

1) Give one equivalent word for each of the following words: a, c and abc. Also give a word which is not equivalent to the three words above. (2 p)

2) Write down the equivalence class which contain the word a and the equivalence class

which contains the word abc in set notation. (2 p)

(b) Let the language L 2 = {a n b m | n, m ∈ N 0 and n + m is even} over the alphabet Σ = {a, b} be given. In the following we use ≡ L

2

as equivalence relation.

1) Give one equivalent word for each of the following words: ab, bb and a. Also give a word which is not equivalent to the three words above. (2 p)

2) Write down the equivalence class which contain the word bb and the equivalence class which contains the word a in set notation. (2 p)

(Note: N 0 is the set of natural numbers including zero.)

The solutions to this exercise sheet must be submitted before Wednesday, 30 May 2012 at 12:00. 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, 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

1) Geben Sie f¨ ur jedes der W¨ orter a, c und abc jeweils ein weiteres Wort an, das zu dem jeweiligen Wort ¨ aquivalent ist. Geben Sie außerdem ein Wort an, dass zu keinem der..

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