• Keine Ergebnisse gefunden

Exercise 7.1 Reversal-bounded Counter Machines

N/A
N/A
Protected

Academic year: 2021

Aktie "Exercise 7.1 Reversal-bounded Counter Machines"

Copied!
2
0
0

Wird geladen.... (Jetzt Volltext ansehen)

Volltext

(1)

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

Exercise Sheet 7

Jun.-Prof. Roland Meyer, Georgel Calin Due: Tue, Dec 10

Exercise 7.1 Reversal-bounded Counter Machines

Consider the code of 2-counter machine M with counters c 1 , c 2 initially set to 0:

machine M

l 0 : inc(c 1 ); goto l 1 // initial control state l 1 : inc(c 2 ); goto l 0

l 1 : zero(c 1 ); goto l 2

l 1 : dec(c 2 ); goto l 3 l 2 : zero(c 2 ); goto l a l 3 : dec(c 1 ); goto l 1

l 3 : inc(c 2 ); goto l 4 l 4 : dec(c 1 ); goto l 5 l 5 : inc(c 1 ); goto l 3

l a : // accepting control state Represent the above code as an automata with S

c∈{c

1

,c

2

} {inc(c), dec(c), zero(c)}-labeled transitions and determine how many reversals are needed to reach the accepting state.

Exercise 7.2 NBA Languages = ω-regular Languages (a) not graded It was discussed in class that ω-regular languages are NBA definable.

(a) Show that if there exists an NBA that accepts L ⊆ Σ ω then L is ω-regular.

(b) Construct an NBA that accepts L = (ab + c) ((aa + b)c) ω + (a c) ω Exercise 7.3 Naive Interpretation of NFAs as NBAs

Let A = (Σ, Q, q 0 , →, Q F ) be an NFA with ∅ 6= L(A) ⊆ Σ + and, for any two states q, q 0 ∈ Q, define L 6= q,q

0

:= {w ∈ Σ + | q − → w q 0 in A}. If L ω (A) is the ω-regular language accepted by A (interpreted as an NBA), one can wrongly believe that L ω (A) = L(A) ω . (a) Find a counterexample to L ω (A) = L(A) ω when ∅ 6= L 6= q,q ⊆ L(A) for all q ∈ Q F . (b) Argument that if L(A) = S

q,q

0

∈Q

F

L 6= q,q

0

then L ω (A) = L(A) ω holds.

(c) Show that if L(A) = L + for some regular language L then L ω (A) = L(A) ω holds.

Reminder: if L ⊆ Σ + then L ω := {w 0 w 1 . . . ∈ Σ ω | w i ∈ L for all i ≥ 0}.

(2)

Exercise 7.4 Generalised ω-regular Expressions

Regular expressions over Σ can be extended to encode languages over Σ ∪ Σ ω as follows:

α ::= ∅ | a | α + α | α.α | α | α ω with a ∈ Σ.

The language L g (α) ⊆ Σ ∪ Σ ω of a generalised ω-regexp is defined recursively:

L g (∅) = ∅ L g (α + β) = L g (α) ∪ L g (β)

L g (a) = {a} L g (α.β) = (L g (α) ∩ Σ ).L g (β) ∪ (L g (α) ∩ Σ ω ).

Concatenation of a language R ⊆ Σ with a subsequent L ⊆ Σ ∪ Σ ω means

R.L := {u.v ∈ Σ | u ∈ R and v ∈ L ∩ Σ } ∪ {u.v ∈ Σ ω | u ∈ R and v ∈ L ∩ Σ ω } . And, since ∅ = {} = ∅ ω , the Kleene-iteration and ω-iteration require special care:

L g ) =

( (L g (α) ∩ Σ ω ) ∪ {} if L g (α) ∩ Σ ⊆ {}

(L g (α) ∩ Σ ω ) ∪ (L g (α) ∩ Σ ) otherwise L gω ) =

( (L g (α) ∩ Σ ω ) ∪ (L g (α) ∩ Σ + ) ω if L g (α) ∩ Σ + 6= ∅ (L g (α) ∩ Σ ω ) ∪ {} otherwise.

Your task: show that for every generalised ω-regexp α there is another α 0 = γ + X

i∈I finite

α ii ω with γ, α i , β i ⊆ Σ , β i ∩ Σ + 6= ∅ for every i ∈ I

such that L g (α) = L g0 ).

Note: generalised ω-regular expressions over Σ ω describe the ω-regular languages.

Referenzen

ÄHNLICHE DOKUMENTE

The idea is to accept a run if the set of states that occur infinitely often matches one of the Q i

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

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

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

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

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

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

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