• Keine Ergebnisse gefunden

Exercise 3: Applications of the Pumping Lemma (5 Points)

N/A
N/A
Protected

Academic year: 2022

Aktie "Exercise 3: Applications of the Pumping Lemma (5 Points)"

Copied!
2
0
0

Wird geladen.... (Jetzt Volltext ansehen)

Volltext

(1)

University of Freiburg Dept. of Computer Science Prof. Dr. F. Kuhn

S. Faour, P. Schneider

Theoretical Computer Science - Bridging Course Exercise Sheet 3

Due: Tuesday, 12th of May 2021, 12:00 noon

Exercise 1: Regular Expressions (5 Points)

Regular expressions define languages, i.e.,sets of words. For the following pairs oflanguages over the alphabet Σ = {a, b, c}, state whether one contains the other, or both, or neither. Prove your claim.

For languages given in set-notation give a regular expression that defines the same language.

a) (abc), (a∪b∪c) b) Σ+∪ab, ΣabΣ∪a

c) {x∈(abc)| |x|= 4y, y∈N}, (ΣΣΣΣ) Remark:|x| is the length of x∈Σ d) {xL0x|x∈Σ, L∈Σ},abcΣcba

Exercise 2: Limits of the Pumping Lemma (5 Points)

Consider the language L={cmanbn|m, n≥0} ∪ {a, b} over the alphabet Σ ={a, b, c}.

a) Describe in words (not using the pumping lemma), whyL can not be a regular language.

b) Show that the property described in the Pumping Lemma is a necessary condition for regularity but not sufficient for regularity.

Hint: Use L as counter example, i.e., show that it can be ’pumped’ (in the sense of the pumping lemma), but is still not regular.

Exercise 3: Applications of the Pumping Lemma (5 Points)

Use the Pumping Lemma to show that the following languages over the alphabet Σ ={a, b} are not regular.

a) L={am|m=n2 for somen∈N} b) L={ak|kis prime}

c) L={ambn|m6=n}

Hint: Have a look at the languages {anbn|n∈N}and ab and use the fact that regular languages are closed under regular operations.

(2)

Exercise 4: GNFA (5 Points)

Consider the following NFA:

q1

start q2

q3

a, b a

b a b

Give the regular expression defining the language recognized by this NFA by converting it stepwise into an equivalent GNFA with only two nodes. Document your steps.

Referenzen

ÄHNLICHE DOKUMENTE

Applied Automata Theory (WS 2013/2014) Technische Universit¨ at Kaiserslautern.. Exercise

Applied Automata Theory (WS 2014/2015) Technische Universit¨ at Kaiserslautern.. Exercise

Applied Automata Theory (WS 2012/2013) Technische Universit¨ at Kaiserslautern.. Exercise

Show that the model checking problem can be reduced (in the sense of Turing reduction) to the problem of whether in a given finite automaton, one given state can be reached..

The following problems are about sanitization of input. Note that the automaton A det is completely deterministic since for every pair of states Q and every input symbol a, there is

c) [3 points] We call a transducer deterministic if in any state and for any input, the transducer has at most one possible, and hence unique, transition; this transition may