• Keine Ergebnisse gefunden

The emptiness-problem for context-free languages is the following problem:

N/A
N/A
Protected

Academic year: 2021

Aktie "The emptiness-problem for context-free languages is the following problem:"

Copied!
2
0
0

Wird geladen.... (Jetzt Volltext ansehen)

Volltext

(1)

WS 2016/2017 06.12.2016 Exercises to the lecture

Complexity Theory Sheet 6 Prof. Dr. Roland Meyer

Dr. Prakash Saivasan Delivery until 13.12.2016 at 10h

Exercise 6.1 (Emptiness of context-free languages)

The emptiness-problem for context-free languages is the following problem:

Given: A context-free grammar G in Chomsky normal form.

Problem: Decide if L(G) is empty.

a) Show that the emptiness-problem for context-free languages is in P.

b) Prove that the emptiness-problem is also P-hard with respect to logspace reductions.

Hint: Reduce CVP to (non-)emptiness of context-free languages.

Exercise 6.2 (Safe Petri Nets) Consider the following definitions:

• A Petri Net is a triple N = (P, T, W ), where P is a finite set of places, T is a finite set of transitions and W : (P × T ) ∪ (T × P) → N is a weight function.

• A marking of N is a map M ∈ N |P | that maps places to natural numbers.

Intuitively, a marking represents the number of tokens in all places.

• A transition t is enabled in a marking M if M ≥ W (−, t), where W (−, t) denotes the vector (W (p 1 , t), . . . , W (p |P | , t)). The vector W (t, −) is defined similarly.

• If t is enabled in M , the transition can be fired: we obtain a new marking M 0 by subtracting W (−, t) and adding W (t, −). More formally, we write: M → t M 0 if t is enabled in M and M 0 = M − W (−, t) + W (t, −).

• If σ = σ 1 . . . σ ` is a sequence of transitions we also write M → σ M 0 if there are markings M 1 , . . . , M `+1 so that M 1 = M , M `+1 = M 0 and M iσ

i

M i+1 for i = 1, . . . , `.

• A marking M 0 is reachable from a marking M if there is a sequence of transitions σ so that M → σ M 0 .

• The Petri Net N is called safe from marking M if all markings reachable from M

are in {0, 1} |P | .

(2)

• The reachability problem for safe Petri Nets is defined as follows:

Given: A Petri Net N , markings M, M 0 so that N is safe from M . Problem: Decide if M 0 is reachable from M .

The reachability problem for general Petri Nets is decidable but the only known decision procedure has non-primitive recursive complexity. For safe Petri Nets, we can do better:

a) Prove that the reachability problem for safe Petri Nets is in PSPACE.

b) Show that the problem is also PSPACE-hard with respect to polytime reductions.

Hint: Don’t try to reduce QBF to safe Petri Net reachability. Pick an arbitrary problem in PSPACE and transform its deterministic decider into a Petri Net.

Exercise 6.3 (Intersection-emptiness of regular languages)

The intersection-emptiness problem for regular languages is the following:

Given: NFAs A 1 , . . . , A k for some arbitrary k ∈ N . Note that k is part of the input.

Problem: Decide if T k

i=1 L(A i ) is empty.

a) Show that intersection-emptiness is in PSPACE.

b) Prove that intersection-emptiness is also PSPACE-hard with respect to polytime reductions.

Hint: Reduce safe Petri Net reachability to intersection-emptiness. Note that an execution of a Petri Net N = (P, T, W ) is a sequence of firings. Firing a transition just amounts to putting and consuming tokens. Construct |P| + 1 automata over the alphabet {put p , consume p | p a place}. For each p ∈ P an automaton should check that the one token on p is used in the right way. The last automaton should mimic the behavior of the transitions.

Delivery until 13.12.2016 at 10h into the box next to room 343 in the Institute

for Theoretical Computer Science, Muehlenpfordstrasse 22-23

Referenzen

ÄHNLICHE DOKUMENTE

Using an entirely different method, which relies on the existence of regular differential forms on certain degenerations to positive characteristic, Koll´ ar [Ko1] showed that a

Das Zweite ist, dass mir im Umgang mit den Schülern im Laufe meiner 20-jährigen Berufstätigkeit doch be- wusster wird, dass beispielsweise die Anzahl der Schüler, die auch

How can one prove termination of TRSs?. How can one prove confluence

The classical decision problem for first-order logic was considered the main problem of mathematical logic by Hilbert and Ackermann and its undecidability was shown by Church

This means that because of the excessive and quite unprecedented levels of private debt (3 to 4 times the size of the country’s GDP) weighing on households

We only have to take the existing status values from the previous evaluation, calculate the number of spare firefighters freeff and set B init to those vertices burnt at time t − 1

latter type of capabilities is strongly related to the learning capabilities (cf. Rumelhart et al. In the rest of this section, we will describe some experiments with demand

In this paper, we have introduced a formal definition of a novel Petri net dialect, called Monitor Petri Nets (MPNs), that constitutes a simple, compact, and easy to process