• Nie Znaleziono Wyników

The Complexity of the Finite Containment Problem for Petri Nets

N/A
N/A
Protected

Academic year: 2022

Share "The Complexity of the Finite Containment Problem for Petri Nets "

Copied!
16
0
0

Pełen tekst

(1)

The Complexity of the Finite Containment Problem for Petri Nets

ERNST W . MAYR A N D ALBERT R. MEYER Massachusetts Institute of Technology, CambrMge, Massachusetts

ABSTRACT. If the reachability set of a Petri net or vector addmon system is fimte, it can be effectively constructed. Furthermore, this finiteness is decidable The complexity of dectsion procedures for the containment and equality problem of f'lmte reachabihty sets rs investigated, and it is shown by reducing a bounded version of Hilbert's Tenth Problem to the finite containment problem that these two problems are extremely hard--that, in fact, the complexity of each decision procedure exceeds any primitive recursive functmn mfimtely often The funte containment and equality problems are thus the first uncontrived decidable problems which are not primitive recursive

KEY WORDS AND PHRASES. incluston problem, reachabihty set, Petn net, pdmmve recurs~ve complexity CR CATEGORIES: 5.21, 5.25, 5.27

1. Introduction

T h e c o n t a i n m e n t p r o b l e m for Petri nets or vector addition systems [14] is the p r o b l e m o f d e t e r m i n i n g for a n y two given Petri nets w h e t h e r the reachability set o f the first is c o n t a i n e d in the other. ( T h o u g h vector a d d i t i o n systems a n d Petri nets are essentially n o t a t i o n a l variants describing the same m a t h e m a t i c a l systems, we prefer to use the Petri net t e r m i n o l o g y because o f the c o n v e n i e n c e o f representation.) By r e d u c i n g Hilbert's T e n t h P r o b l e m [10] c o n c e r n i n g integer solutions o f D i o p h a n t i n e equations, w h i c h is k n o w n to be u n d e c i d a b l e [6, 17], to the c o n t a i n m e n t p r o b l e m , R a b i n has s h o w n the unsolvability o f the latter p r o b l e m (see [3]). T h e situation changes, however, w h e n o n e considers subclasses o f the general problem. A result b y K a r p a n d Miller [13] shows that it is decidable w h e t h e r the t e a c h a b i l i t y set o f a given Petri net is finite. T h e y also give a n a l g o r i t h m for generating a n y finite reachability set. H e n c e the finite c o n t a i n m e n t p r o b l e m ( F C P ) (the f'mite equality p r o b l e m (FEP)), that is, the p r o b l e m o f d e t e r m i n i n g for a n y two given Petri nets w h e t h e r their reachability sets are each finite a n d o n e is c o n t a i n e d in (is e q u a l to) the other, is decidable b y exhaustion. W e investigate the c o m p l e x i t y o f decision p r o c e d u r e s for F C P a n d prove the following result.

THEOREM. FCP (FEP) is decidable, but the complexity of each decision procedure for FCP (FEP) exceeds any primitive recursivefunction infinitely often.

Permission to copy without fee all or part of this material is granted provided that the copies are not made or distributed for d~rect commercial advantage, the ACM copyright notice and the utle of the publication and its date appear, and notice is given that copying is by permission of the Association for Computing Machinery. To copy otherwise, or to republish, requires a fee and/or specific permission.

Th~s paper was prepared with the support of the National Science Foundation under Contract MCS 74- 12997-A04 and wRh the support of the German Academic Exchange Serwce (DAAD) under Grant 430- 402-559-7

Authors' address: Laboratory for Computer Science, Massachusetts Insutute of Technology, Cambridge, MA 02139

© 1981 ACM 0004-5411/81/0700-0561 $00.75

Journal of the Assooauon for Computing Machinery. Vol 28, No 3. July 198 I, pp 561-576

(2)

562 E. W. MAYR AND A. R. MEYER

The intrinsic complexity o f the decision procedures is not due to the fact that the reachabihty sets have to be tested for finiteness. Rackoff [19] shows that this can be achieved in exponential space. Thus, even if the decision procedure is supplied with the answer to this subproblem, the complexity still is nonprimitive recursive.

To establish this result, we present in Section 2, following the basic definitions, a bounded version o f Hilbert's Tenth Problem with nonprimitive recursive complexity.

Section 3 contains results for three constructions o f weak Petri net computers (WPNCs) which are carried out in detail in the appendix (see also [18]). We first describe W P N C s for a sequence o f functions which are closely related to Ackermann's function [l]. We then discuss a property o f W P N C s for multivariate polynomials with nonnegative integer coefficients which makes it possible to reduce the subspace inclusion problem for teachability sets to the inclusion problem while preserving the finiteness o f the teachability sets. Theorems 3 and 4 state results about two modifi- cations o f polynomial W P N C s which further exploit this property in order to reduce the bounded version o f Hilbert's Tenth Problem effectively to FCP. In Section 4 the reduction is carried out, and the main results of the paper are proved. Section 5 demonstrates connections to some related questions and states some open problems.

2. Preliminaries

2.1 PETRI NETS, FCP, AND FEP. We assume that the reader is familiar with notions like the free monoid T* over a finite alphabet T (the empty word is denoted by 2~, T + := T* - (~} is the set of nonempty words over T, and [ w[ is the length o f a word w E T*); the concept o f the free commutative monoid generated by a finite set S, which we write C(S); and basic algebraic concepts like the semiring N[xm] := Nix1, . . . , x,,] o f polynomials with nonnegative integer coefficients in the unknowns xl, . . . , Xm.

Definition 1

(a) A Petri net ~ is a 4-tuple (S, T, pre, pos 0 with the properties (i) S is a finite ordered set o f places;

(ii) T is a finite set of transitions, S fq T = f3;

(iii) pre is a multiset over S × T;

(iv) post is a multiset over T x S.

(b) A marking of # is a mapping

a: S ~ N (N = set o f nonnegative integers) (or, equivalently, an element o f C ( S ) , a = l~Is~sSat8>).

In diagrams, places are denoted by circles, transitions by bars, and elements o f pre U post by directed arcs. Numbers attached to arrows give the multiplicity # o f the corresponding element in pre O post if this multiplicity is greater than one. I f (s, t) E pre, then s is called an input place o f t, and if (t, s) E post, an output place o f t. A transition t is said to be controlled by a place s iff/tt(s, 0 = #(t, s) = 1 (represented in diagrams by a double line between s and t). A transition t with no output place and one input place with #(s, t) = 1 is called an erasing transition (of s).

Definition 2. Let ~ -- (S, T, pre, post) be a Petri net and a a marking of #.

(a) A transition t E T isfirable at a and takes a to the marking b (written a ~ t b) iff (i) (Vs ~ S)[a(s) _>/~(s, t)], and

(ii) (Vs C S)[b(s) = a(s) - #(s, t) + #(t, s)].

(3)

Finite Containment Problem f o r Petri Nets 563 (b) A f i r i n g sequence t is an element t E T ÷.

(c) A firing sequence t is firable at a and takes a to the marking b (written a ...~t b) iff

(3r_> 1 3tl . . . tr E T)[t = tit2 • • • tr and

(3bo, b~ . . . br)[a = bo A b = b r A 0¢iU(I . . . r})[bt-1 ...,t, b,]]].

The sequence (b,)o~,_<r is called the marking sequence generated by t.

(d) A marking b of ~ is said to be reachable from a (written a ~ * b) iff a = b or (at E T+)[a .._~t b].

.__>t, _.>t, and .-o* depend, of course, on ~. It will, however, always be clear from the context which Petri net is being considered.

Definition 3.

(a) The reachability set of a Petri net # with initial marking a is R(~, a) := {b; a ~ * b}.

Let ~ , = (S,, T,, pre,, post,) be a Petri net with initial marking a, (i = l, 2), 1Sl1 = [ $2[ (footnote l), and let/~: C(S1) ~ C($2) be the semigroup-isomorphism generated by the order-preserving bijection h : $1 ~ $2.

(b) The contammentproblem CP is the problem of deciding for two Petri nets ~1 and

~2 with markings al and a2, respectively, whether the reachability set of the first net is contained in that of the second; that is,

c a := (((~1, a~), (~2,a2));/~(R(~i, a l ) ) C R(~2, a2)}.

(c) Thefinite containment problem F C P is

FCP := {((#~, a~), (~2, a2)); [R(~2, a2)[ < oo and ( ( ~ , at), (#2, a2)) E CP).

(d) Thefinite equality problem FEP is

FEP := (((~1, al), (~2, a2)); ((~1, al), (~z, a2)), ((~2, a2), (~,, al)) E FCP}.

The proof that F C P and FEP are nonprimitive recursive proceeds by effectively reducing to F C P a special bounded version of Hilbert's Tenth Problem dealing with the ranges of values of polynomials with nonnegative integer coefficients. The complexity is measured in terms o f the number of steps any Turing machine for F C P and FEP, respectively, needs on instances of the problems, as a function of the length o f the input.

Though the main results o f this paper hold for any reasonable encoding of the data involved (i.e., polynomials and Petri nets), we choose for definiteness particular encodings and corresponding notions o f the size of encodings.

Petri nets are encoded essentially by writing down a list of the arcs in the net, preceded by the multiplicity if it is greater than I. By ordering the edges according to the transitions on which they are incident, it suffices to show only the places touched by the edges. A place can be identified by the radix notation for its number in the ordered set of places. The length of this encoding motivates

Definition 4. Let ~ = (S, T, pre, post) be a Petri net with marking a. Then size(pre) := ~ [log(#(e) + l)] (footnote 2),

e

1 For a set S, [ S [ denotes the cardmahty of S

2 All logarithms are to the base 2 throughout the paper.

(4)

564 E. W. MAYR AND A. R. MEYER

where the sum is taken over the different arcs in the multisetpre; size(post) is defined similarly:

size(#) := (size(pre) + size(post) + 1).rlog([ s I + 1)];

size(#, a):= size(#) + Isl.[log(1 + max{a(s); s E s})].

The code for a polynomial p ~ N[xm] consists o f the sequence o f the codes for its monomial constituents. The code for a monomial is a sequence o f integers obtained by first writing down the nonzero integer coefficient, then the nondecreasing sequence o f indices in which each j ~ { 1 .. . . . m} occurs just as often as the degree o f xj in the monomial indicates. Numbers are written again in radix notation. The size o f p E N[xm] is the length o f its code.

2.2 A BOUNDED VERSION OF HILBERT'S TENTH PROBLEM. While Hilbert's Tenth Problem [10] concerning (nonnegative) integer solutions o f Diophantine equations is undecidable [6, 17], we restrict ourselves to finding solutions in some finite initial segment o f N, a problem which obviously is decidable by exhaustion. In particular, we consider segments bounded by the function A : N ~ N, defined by

Ao(x) := 2x + 1, ]

A n + l ( 0 ) :~- l ,

A,+i(x + 1) := A,(An+i(x)), n, x E N.

A(n) := A,(2),

A function similar to A is studied in [7]. The results obtained there imply that A majorizes the primitive recursive functions, that is,

(Vf, f p r i m i t i v e recursive 3no E N Vn _> no)[A(n) > f ( n ) ] . Definition 5. The Bounded Polynomial Inequality Problem BPI is

BPI := {(p, q, n); p, q E N[xm] for some m ~ N, and

(Vym E {0, 1 .. . . . A(n)}m)[p(y,~) < q(ym)]}.

Results by Adleman and Manders [2] imply

THEOREM 1. BPI is nonprimitive recursive; that is, if M is a (multitape) Turing machine for BPI and f is any primitive recursive function, then there are infinitely many instances (p, q, n) such that M needs more than f(size(p) + size(q) + n) steps to determine whether (p, q, n) E BPI.

PROOF. Using straightforward transformations o f polynomials with (not neces- sarily nonnegative) integer coefficients, it follows from [2, Th. 5] that the complexity o f BPI is greater than log(log(log(A (m 1/4)1/5))) on some inputs of size m for infinitely many m. This latter function must also majorize the primitive recursive functions, since A does. Q.E.D.

3. Weak Petri Net Computers (WPNCs)

Rabin has introduced the concept o f a number-theoretic function being weakly computed by a Petri net (cf. [8]). To weakly compute a function o f m arguments, one takes a net in which m places are designated to be marked initially with the values of the arguments. The value of the function equals the maximum value o f the reachable markings on some other designated place. It is also convenient to have a so-called start place which initially determines the firability of firing sequences in the net. We use the names ira, o, and s, respectively, for these places, and, for nm ~ N m, the abbreviation i~ m for the word I-[~-1 i~ J ~ C(S).

(5)

Finite Containment Problem f o r Petri Nets 565 Definition 6. Let ~ = (S, T, pre, post) be a Petri net, and let s, ira, o ~ S be m + 2 designated places such that s, i~ are not output places and o is not an input place of any transition in T. Let r ~ C(S - (s, i~, o}), D ~ N m, and f : D ~ N. ~ is an r-weak Petri net computer (r-WPNC) (footnote 3) f o r f i f f

(Vn~ E D)[(k; si,~mr--~ * oka for some a E C(S - {s, ira, O))} = (0, 1 .. . . . f(nm))].

The following theorems summarize results of constructions carried out in detail in the appendix.

THEOREM 2

(0 (Vn E N 3.~¢,)[.~¢, is a X - W P N C f o r A , with three designated places s,, in, on];

(i0 size(at,) = O(n.log(n));

(ii 0 R ( d n , s,i~) is finite.

See Section AI for the proof.

The nets d , are used to supply the arguments for WPNCs for polynomials with nonnegative integer coefficients. As far as these polynomial W P N C s are concerned, we are actually only interested in the markings of the designated places, as these reflect all the information about the polynomials regarded as functions. In [9] a construction is given which allows the reduction of the subspace containment problem, that is, the containment problem with respect to designated places in nets, to the containment problem. Unfortunately, however, this construction does not preserve the finiteness o f reachability sets. We now introduce two modifications of (polynomial) W P N C s which enable us to circumvent this obstacle, namely, bounded and blurring WPNCs.

An M-bounded W P N C is one in which all markings reachable from the initial marking are bounded by M on the nondesignated places. More precisely, for u E S, n E N, let (u)" denote {%, u, u 2 .. . . . u") C C(S).

Definition 7. Let ~ = (S, T, pre, post) be a Petri net, M E N. ~ is an M-bounded r- W P N C for f : N 'r' _D D ~ N with designated places So := (s, ira, O} C S iff

(i) ~' is an r-WPNC f o r f w i t h designated places Sd;

(ii) (Vnm ~ D)[R(~, si,~"r) _C (s) ~ H7-1 (iJ) n' ~IuES--Sd (u)M(o}f(nm)] •

THEOREM 3. Let p ~ N[xm], IlPll := maximum o f the coefficients o f p, and f o r N ~ N, let g(N) := N + IIPlI. Then there exists a Petri net ~ru -- (S, T, pre, post) with m + 3 designatedplaces s, ira, O, and b E S such that

(0 ~ae is a g(N)-bounded b g(N)- W P N C with designated places s, i~, o f o r p restricted to {0, l . . . N}m, f o r all N E N. In particular,

(VN E N Vain E {0, 1 .. . . . N}~)[R(~eu, sinmmb g(N)) isfinite].

(it) size(Dee) = O(size(p). log(size(p) )).

See Section A2 for the proof.

The second modification of polynomial WPNCs ensures the possibility o f "blur- ring" any telltale information which is represented in the markings o f the nondesig- nated places. This is achieved by constructing the net so that every marking of the nondesignated places up to a prespecified bound is reachable.

Definition 8. A Petri net ~ = (S, T, pre, post) is a blurring IVPNC f o r f : N m _D D ~ N iff ~ has m + 5 designated places So := {s, ira, o, cl, c2, e) C S such that

a If we do not want to emphastze the marking r, we also call ~ a WPNC

(6)

5 6 6 E . w . MAYR AND A. R. MEYER

(i) (VN E N ) [ ~ is an dV-WPNC f o r f w i t h respect to s, ira, O];

(ii) (VN E N Vn~ E D ) [ [ I , e s - s d ( u ) N ( o ) f(nm) C R ( ~, si~eN)].

(Note that the reachable markings considered in (ii) do not contain cl, c2, and e.) THEOREM 4. Let q E N[xm] f o r some m E N. Then there exists a Petri net Ae,¢ = (S, T, pre, post) such that

(0 Aeeis a blurring W P N C f o r q with designated places s, i~, o, c1, c2, e ~ S;

(i 0 (VN ~ N Vn~ E (0, 1 .. . . , N}m)[R(Aee, s i , ~ e N) isfinite];

( iiO size(Are) -- O (size(q). log(size(q) ) ).

See Section A3 for the proof.

4. Reduction o f B P I to F C P

The results of the previous section now enable us to reduce BPI to FCP efficiently.

We prove

THEOREM 5. BP1 is polynomial-time-reducible to FCP.

PROOF. Given (p, q, n), we first construct the two Petri nets #~, and A~, as indicated in Figure 1. Each net contains a copy of the %-WPNC d,, for A, of Theorem 2. # a also contains the bounded version #ee of a W P N C for p of Theorem 3, and A~, the blurring WPNC Ace for q of Theorem 4. (The start place and the input places of the latter have been primed in order to avoid confusion with the corresponding places of tin.) ~ , also has unconnected places cl, c2, e (with no tokens on them) to match the corresponding places in Aeeof Aa which do not get blurred in Ace. We may assume that # a and A~, have the same number of places. (If this is not the case a priori, one can either add further dummy places which are not connected to any transition to # a or add further dummy places with erasing transitions attached to them to A~ within Ate; see Section A3.) The count place shown in the figure

"remembers" the maximal input to the polynomial WPNC. d , , #ee, A~e, and thus

# d and Aa can be constructed from (p, q, n) in time bounded by a polynomial in size(p) + size(q) + n. To conclude the proof, it suffices to show

LEMMA 1

(p, q, n) E e P I ~=~ ((#a, s), (Aa, s)) E FCP.

PROOF OF THE LEMMA. We assume that the two sets of places are ordered suitably, for example, first s, then the places in the .s~/,-copies (in the same order in both nets), then count, s', i~, and o, followed by e, cl, c2, and fmally the remaining places in any order.

=~. Consider some marking a ~ R(~a, s) which contains c', n~, k tokens on the respective places count, i~, o. From the structure of ~ , it follows (Figure l) that this marking could have been reached only by a firing sequence which placed e' tokens on each of the places i j," of which c' - nj' tokens then have been used as input by the polynomial W P N C ~'~. As ~ee is a W P N C for the polynomial p, this implies that k _< p(c' - n ~ .. . . . c' - n~). The marking on the nondesignated places of ~ee and on b, e, cl, and c2 is bounded by c' +

max{lip II, II q II)

(Theorem 3). Clearly, the same marking as a is reachable in A~ as far as the places in d,, and the places s, s', and count are concerned. Are may now use c' - nj tokens from each of the places ij in A~, and output k _< q(c' - n~ . . . c' - n~) tokens on o, since (p, q, n) E BPI. Then Ace can blur all its nondesignated places appropriately and reach a marking with no

(7)

Finite Containment Problem f o r Petri Nets

S S'

Q ,I

1"x'~,,,,°x{ I~ll, I~ll }

i' :t

An

-

@

i

%

)b

567

0 0 0

e c I c 2

S

QA S'

2 / O s . \,o e '

O

FIG 1. Petn nets ~d and . ~ for the reduction of BPI to FCP

tokens on e, cl, and c2 (Definition 8(ii)), thus matching a. R(~d, s) and R ( . ~ , s) are finite (this comes from Theorems 2(iii), 3(i), 4(ii), and the construction o f ~ ¢ and . ~ , respectively). It then follows that ( ( ~ , s), ( ~ , s)} E FCP.

~ . Since R ( ~ , , s) C R ( . ~ , s), it follows a fortiori that the projection o f R ( ~ , s) on the places count, i~, o is contained in the corresponding projection o f R(.~,, s). By the definition of a W P N C (Definition 7), this implies that q(c' - n~, . . . . c' - n~) _> k for 0 _< k _<p(c' - n~ . . . c' - n~), for all c' ~ {0, 1, . . . , A(n)} and all n'm ;6 {0, 1 .. . . . c'} m. Hence (p, q, n) ~ BPI. Q.E.D.

THEOREM 6. F C P is decidable, but the complexity o f each decision procedure f o r F C P exceeds any primitive recursive function infinitely often.

PROOF. Each primitive recursive decision method for F C P would yield a primitive recursive algorithm for BPI via the reduction of Theorem 5, and would thus contradict Theorem 1. Q.E.D.

(8)

568 E. W. MAYR AND A. R. MEYER

THEOREM 7. FEP is decidable, but the complexity of each decision procedure for FEP exceeds any primitive recursive function infinitely often.

PROOF. Hack's reduction of the general inclusion problem to the equality problem [9, p. 122] preserves finiteness and can be effected in polynomial time. Hence the same argument as in the proof of Theorem 6 applies. Q.E.D.

We remark that Theorems 6 and 7 actually do not depend heavily on the encoding used for Petri nets and polynomials so long as the ratio to the particular code chosen in this paper is bounded by a primitive recursive function.

5. Conclusions and Open Problems

FCP and FEP are the first uncontrived problems shown to be decidable but not primitive recursive. (We consider BPI as contrived because the nonpfimitive recursive complexity is obtained by explicitly building in a nonprimitive recursive function as upper bound for the arguments; such a special device does not appear in FCP or FEP.)

Another subclass of the class of general Petri nets for which the containment and equality problem are known to be solvable is the reversible Petri nets. It is not difficult to see that the reachability set of a reversible Petri net is a semilinear set [11], and the results of Biryukov [4] and Taiclin [20] yield a uniform constructive method for obtaining this semilinear set. As containment and equality of semilinear sets are decidable, so are the corresponding properties for the reachability sets of reversible Petri nets. It is not known, however, whether these problems are also nonprimitive recursive. In [5] it has been shown that the reachability problem for reversible Petri nets is exponential-space-complete under log-space transformabili'ty.

Other important classes of Petri nets which have been studied in detail are the persistent nets and, within this class, the proper subclass of conflict-free Petri nets [12, 15]. It is known [15] that the teachability sets of persistent nets are semilinear, but no algorithm has been found so far to obtain these semilinear sets. 4 In [12], among others, the complexity of the teachability problem for the restricted class of l-conservative Petri nets (which have finite teachability sets) is shown to be poly- nomial-space-complete. Besides this special case and Lipton's exponential space lower bound [16], no nontrivial bounds are known for the f'mite teachability problem.

Appendix

This section supplies the constructions and proofs for the theorems in Section 3.

AI ITERATIVE PETRI NET COMPUTERS. According to the structure of the defini- tion of the functions An, n ~ N, we construct WPNCs for the An recursively. In such a WPNC for An+x(m), the embedded WPNC for An is restarted m times. In general, since after a computation of a WPNC tokens may be left on nondesignated places affecting the subsequent computations, we want to ensure, in order to be able to start a W P N C iteratively, that the successive computations are properly separated and that in a computation which produces the maximum marking on the output place no

"garbage"-tokens are left on the nondesignated #aces (markings are thought here to consist of an appropriate number of tokens). As the WPNCs under consideration

4 Added m proof: Note that an algorithm to decide persistence and construct semdmear representauons of perststent reachabd~ty sets ~s given m E.W. Mayr, Persistence of vector replacement systems is decidable, Tech. Memo 189, Lab. for Computer Science, M I.T, Cambridge, Mass, 1980 (to appear m Acta lnformattca)

(9)

Finite Containment Problem f o r Petri Nets 569 usually are r-WPNCs for some r # X, this initialization r has to satisfy special properties.

Definition 9. Let ~ = (S, T, pre, post) be a W P N C with designated places Sd, and for any S' C S let the p r o j e c t i o n j ( S ' ) : C ( S ) ~ C ( S ' ) be the homomorphism defined by

{~ if u ~ S ' ; j ( S ' ) ( u ) :-- otherwise.

r E C ( S ) is conservative iff there is a set of "control places" Sc _C S - So, such that (i) r ~ C(Sc);

(ii) (Va, b E C(S))[(j(S~)(a) = r) A (a--~* b)=~

Ij(SO(b) l

= I rl];

(iii) (Va, b E C(S))[(j(S~)(a) = r) A (a ---~* b) ~ (3t ~ T*)[j(Sc)(b) ...~t r]].

Definition 10. Let ~ = (S, T, pre, post) be a Petri net a n d f : N ~ N a number- theoretic function. ~ is an iterative Petri net computer (IPNC) for f with designated places So = (s, i, o} C S iff the following both hold.

(i) There is a conservative r E C(SO for some set of control places Sc ~ S - So such that ~ is an r-WPNC f o r f

(ii) Let So := S - (So U S¢) be the so-called operational places and define

RCr := {r' E C(S~); (3a, b E C ( S ) ) { j ( S c ) ( a ) = r A j(S~)(b) = r' A a-->* b]}.

Then

ICI: (Va, b E C(So U {i, o}), Vr' E RCr)[(sar' -->* br) ~ (I b l

-<f(I

a I)]- IC2: (Vn ~ N)[sinr ---~* oar for some a E C ( S ) ~ j ( { s ) ) ( a ) = X] and

(Va, b, c E C(So), Vr', r" E RCr, VI, l', l", k, k', n, n' ~ N)[(sZi"okar ' .--~ * srinok'br" ---~* st"i~'ok'cr) A (k' > k) A (n' < n) ~ (l" _< l - 1)].

Because of IC 1, r is called an iteratively conservative initial marking o f ~ . Informally speaking, IC1 ensures that no "garbage" is produced, and IC2 means that no output can be produced without a start token s, and that input and output phases o f an IPNC alternate and are controlled by s; that is, to produce any (additional) output at all, a token of s has to be consumed, and if another computation is to follow thereafter, yet another start token s has to be used. IC 1 together with the fact that r

is conservative ensures not only that the initial marking r of Sc can be restored, but also that there is no gain in not restoring it. We remark that because of ICI, functions for which IPNCs exist are strictly increasing.

We are now going to show that the class of functions computed by IPNCs is essentially closed under iteration. In particular, let ~ be an IPNC computing a f u n c t i o n f : N --~ N with f ( 0 ) > 0, and let g : N --~ N be defined by

(i) g ( 0 ) : = 1;

(ii) g(n + 1) := f ( g ( n ) ) Vn ~ N.

Define the Petri net ~ as given in Figure 2. Essentially, a feedback mechanism is added to ~ which allows the output of ~ to be transferred back to its input place as m a n y times as there are tokens on the input place il of ~. The other places constitute the so-called standard structure for IPNCs which ensures IC2. (In this standard structure the block denoted by the dotted line is considered as a black box.)

LEMMA 2. Let f, g, ~, and fg be as above. Then ~ is an I P N C f o r g.

(10)

570 E. W. MAYR AND A. R. MEYER GG:

I - - - - - - I

I I I I I I i I

":[I i'°l, L vo If" °'

.l.n

I

~ . J

' ~ ' $ I FiG. 2. Petn net computer for g(n) =f~"~(l)

PROOF. Let ro be an iteratively conservative marking o f ~ s u c h that ~ i s an ro- W P N C for f , and let S,~ = (So, io, Oo), S~ °, and S°o denote the set o f designated, control, and operational places, respectively, o f ~. With ~ = ( S °, T °, pre °, post °) and .~ = (S t, T 1, pre 1, post1),

S~ := {sl, il, ol},

S e 1 : = S°e U {Ul, v1},

s~o := s 1 - (s~ u s b .

It can easily be seen from Figure 2 that ra := vlro is conservative. Now let g* :N ---> N tJ {o0} be the function for which f#is an r~-WPNC. As property IC2 o f Definition 10 is ensured by the standard structure o f f#, it suffices to show (i) ICI for g* and (ii) g* = g.

(i) It again follows from the standard structure that we m a y assume without loss o f generality that r' E v~RCro in order to show that

(Va, b E C(So ~ U {il, Ol)), Vr' E RCr,)[slar'-->* at1 =-~ Ibl-< g* (lal)].

(11)

Finite Containment Problem f o r Petri N e t s 571 As ol is n o t a n i n p u t place for a n y t ~ T 1, we m a y also a s s u m e t h a t a E C(So 1 U {il}). L e t a = cd ~ ~ with c ~ C((il, p, So}), d E C(So ° U (io, Oo}) (see Fig- ure 2).

C a s e 1. c = h. As . ~ is a n I P N C for f w e h a v e I bl < 1 + f ( [ d I) - f ( 0 ) <_

f ( I a D. N o t e t h a t as no t o k e n is present o n So, f ( 0 ) t o k e n s c a n n o t be o u t p u t b y ~ . Nevertheless, IC1 is a p p l i c a b l e b e c a u s e o f the m o n o t o n i c i t y o f the firing rule for Petri nets. Also n o t e t h a t f ( 0 ) > 0. It c a n be seen b y i n d u c t i o n t h a t f ( n ) _< g*(n).

H e n c e , I bl <_ g * ( l a l ) .

Case 2. I cl = m > 0. A firing sequence o f (~ leading f r o m slar' to brx (r' vlRCro) h a s w i t h o u t loss o f generality the f o r m

slcdr' ---> * pmdlvlroa ---V" pm-lsodlvlro, x _..> , p m - l dzvlro,2 _..> t" to m-Zsod2Vlro,2

--'> * p d m v a r o , m ..._>t" sodmlllrO, m .._> , brl,

with d, E C(So ° U {i0, o0}), r0., E C(S~) for i = 1 . . . m, or c a n trivially b e s i m u l a t e d b y such a s e q u e n c e if c a l r e a d y c o n t a i n s t o k e n s o n s. N o w set a, := pm+l-'d, for i = 1 , . . . , m, am+l := b. It suffices to s h o w t h a t

la, l _ < g * ( I d l + i - 1 ) + m + l - i for i = 1 . . . m + l . (*) F o r i = 1, this c o m e s f r o m p r o p e r t y I C 2 for ~ , w h i c h allows the a r g u m e n t o f case 1 to be applied, as n o t o k e n f r o m the places 6, p, So has b e e n used so far. A s s u m e t h a t ( . ) is established for all i with 1 _< i < io -< m + 1. W e h a v e ro,,o-a ~ RCro and, as ro is iteratively conservative, we m a y a s s u m e t h a t ro,,o-a = ro. F r o m I C I for ~ w e t h e n o b t a i n

I d,ol

-< f ( I d,o-a I), a n d h e n c e

la,ol = [d, ol + m + 1 - io

- < f ( I azo-I I + i0 - m - 2) + m + 1 - io

- < f ( g * ( I d l + io - 2)) + m + 1 - io b y induction h y p o t h e s i s -< g * ( l d l + / o - 1) + m + 1 - io.

T h e last inequality c o m e s f r o m the fact t h a t with a n a d d i t i o n a l t o k e n o n sl (or p ) , c a n b e a p p l i e d o n c e m o r e to the t o k e n s so far collected o n oo, a n d that the t r a n s p o r t o f t o k e n s f r o m Oo to ol c a n be p o s t p o n e d , in a n y case, to the v e r y last. T h u s I C I holds for ft.

(ii) W e o b v i o u s l y h a v e g*(O) = 1 = g(O) a n d g * ( l ) = f ( l ) = g(1), a n d inspection o f the net (~ shows t h a t g * _> g. Let n > 1 be m i n i m a l such that slier1 ---~t brl for s o m e b E C ( S ~) with [b I > g ( n ) a n d s o m e t E (T1) +. t is w i t h o u t loss o f generality o f the f o r m

sxi~rl ----> * p2dlVlr6 ...~ c pSodlvlr6

._..> t, pdzvlr~' ---~ t2 pdavlr~' ....> t" sod~vlr~' ---~ * bra,

with dl, d2, da E C(So ° U {io, Oo}); r6, r~' ~ RCro; tl ~ (TO) + such t h a t the first transition o f h r e m o v e s so; a n d t2 ~ (t} . ( T O U (t})* U {h}. W e m a y also a s s u m e t h a t dl does not c o n t a i n Oo. As, r e a c h i n g pd~v~r~', the last t o k e n o n p actually was not used, a n d as n is m i n i m a l , we h a v e

Idol

-< g(n - 1). I f d2 contains t o k e n s o n Oo, they were p l a c e d there b y tx. Because o f I C 2 for ~ , we actually m a y a s s u m e t h a t t2 E {t}*, as

(12)

572 E. W. MAYR AND A. R. MEYER

Io : 0 I

x..JS a

FIG. 3. A smaller Petri net computer for the iteraUon o f f

no tokens from io could have been used, and therefore we have ]d31 -- I d21; and because o f IC1 for ~, we have

I bl -< f(I da I)

< - f ( g ( n - 1)) = g(n). I f d2 contains no tokens on Oo, we m a y analogously conclude that t2 -- A and thus dz = d3. IC1 for ~ a g a i n yields Ibl -< f(Id31) <-

g(n).

This contradicts the choice o f n. Thus, g* = g. Q.E.D.

We want to remark that the construction o f f# is not optimal with respect to the n u m b e r o f additional places and transitions. Figure 3 shows a smaller solution (without p r o o f ) for a W P N C for g, and this construction can also be applied recursively, provided the net at the initial stage is an IPNC. We think, however, that the standard structure facilitates the p r o o f o f L e m m a 2 and unifies the recursive application o f the construction. T h e nets ~¢n, n E N, o f T h e o r e m 2 are now easily obtained by starting with an I P N C f o r f ( m ) = 2m + 1 which can be constructed in a straightforward way using the standard structure (Figure 2) and applying the construction o f L e m m a 2 n times• At the last stage an additional place and a transition which initializes the marking rn := [I~.1 v, is inserted between sn and the transition corresponding to t" in Figure 2 so that a X-WPNC d,, for A,~ is obtained. Claims (ii) and (iii) o f T h e o r e m 2 are immediate from the construction.

A 2 BOUNDED W P N C s FOR POLYNOMIALS. Let

p(Xm)

~ X~--i a, II7-1 x f " be a polynomial with positive integer coefficients a,, and e,j E N for i -- 1 .. . . . v, j = 1 .. . . . m. The net J - o f Figure 4a has the property that nln2 = max(k; in~'~2r ---~.* okra for some a ) for all (nl, n2) ~ N 2. T h e verification o f this fact is left to the reader. These basic multiplier nets have also been introduced in [8]. We connect d instances o f • by identifying the output place o f a copy o f 3-with the input place j o f the following copy. Renaming the j-place o f the first net by c, this leaves d input places (i.e., the/-places o f all the copies), which are renamed il . . . ia. This yields a

(13)

(a)

I I

I _J

T: C)i

P:

r

0

,ell :es

,el2

'elm

I

I 0

Mi

M v

.evl

,ev2

,evm

J

FIG 4. (a) Basic mulupher net (b) ~-WPNC for the polynomial ~ - l a. I~J-1 '~ xje'~.

(14)

574 E.W. MAYR AND A. R. MEYER net for the homogeneous monomial a H~-I xj, namely, a H~-i nj -- max{k; cai~r ---~* okra for some a} for all nd E N d (r is the product of all the r's in the ~-copies~.

In order to get a W P N C ~ for the polynomial p, monomial nets .A/1 .. . . . ~ v with suitable degrees are combined as in Figure 4b. The input places i,, m a y be connected to several input places of each subnet for a homogeneous monomial, so that in effect we get a subnet computing an arbitrary monomial ofp. The "left control places" are those corresponding to the place r o f Figure 4a. The construction of monomial nets for constant monomials is left to the reader. It is easy to see that ~ i s a ~-WPNC for p and that each markingsi,~ m with nm ~ N m permits only finite firing sequences. The reader m a y observe about the multiplier net : o f Figure 4a that during a computation none o f the "internal" places ever contains more than max{ 1, nl} tokens. Thus, by firing in a monomial net a cycle in the P-component closest to the output place which has a token on the input place corresponding to j, ~ can compute p(nm) by a firing sequence whose marking sequence is bounded on all nondesignated places by g(N) = N +

IIpll for

all nm E {0, 1 .. . . . N} m. Let ~ = (S, T, pre, post) be the net constructed above, set O := S - {s, im, O1, and let O c be a copy o f O (disjoint from S), with u c E O ¢ corresponding to u E O. Now define the Petri net ~ = (S', T', pre', post') as follows:

S' := S o 0 ~, T ' : = T ,

pre' :-- pre U {(u ¢, t); u E O, (t, u) E post}, ~ in the

post' := post U {(t, uC); u E O, (u, t) E pre}, f multiset sense.

Further, let rN := HuGo ~ U g(N).

LEMMA 3. ~ is a g(N)-bounded r s - W P N C for p restricted to {0, 1 . . . N} m.

PROOF. The definition ofpre' and post' implies that for each u E O, the sum o f the tokens on u and u c is constant (and equals g(N)) for each marking sequence o f

~e~ starting from a marking in rNC({s, im, O}). Further, each firing sequence o f starting at any a ~ C({s, im, O}) whose marking sequence is g(N)-bounded on O is also firable in ~ starting at arN, and conversely. Thus the lemma follows from our previous observation that p(nm) tokens on o can be obtained by firing sequences which are g(N)-bounded on the nondesignated places whenever nm E {0, 1 .. . . . N} m. Q.E.D.

The net ~'se o f Theorem 3 is now easily obtained from ~ by adding to ~s~ a place b and a transition, with b as input place and all u ~ O ¢ as output places, which uses the tokens on b to initialize the marking rN. Part (i) o f Theorem 3 is then immediate, and (ii) follows from the observation that both the number o f ares o f multiplicity one and the number of places in ~s~ are bounded by the sum o f the degrees o f the monomials o f p times a constant and that the code for multiple arcs in ~se uses space proportional to the code for the coefficients ofp.

A3 BLURRING W P N C s FOR POLYNOMIALS. In order to obtain a blurring W P N C -~se for a polynomial q E N[xm] (see Definition 8), construct a %-WPNC ~ for q, as in A2, with designated places s, ira, O, and extend it as follows (see Figure 5).

(a) Attach an erasing transition to each nondesignated place u o f .~, that is, a transition with input place u and no output place (indicated in the diagram by a transition with an entering arc in the box for .~).

(b) A d d the places c~, c2, and e, and the transitions shown in the diagram. When the net is started with one token on s, this token enables .~ to output tokens on o as

(15)

Finite Containment Problem for Petri Nets 575

Qb¢:

I

I C I

I

I "N

O i I

I I

© ,

I

iz ~j "

I I

I

I

C) i ,

iml I I I I

.... ~i I

Q

I I

I I I I I I I _J

(.) controlling all transitions in Q (not the erasing transitions) ( * * ) to all nondesignated places of Q

FIG. 5. Blurring WPNC.

long as the one token received on cl from s remains there. W h e n it is transported to c2, the subnet ~ is frozen. Now te m a y fire up to N times ff there are initially N tokens on e, thus gathering at least N tokens on all nondesignated places o f . . ~ Then, finally, the erasing transitions can generate any number of tokens between zero and N on each of the nondesignated places. Obviously, the erasing transitions do not affect the WPNC-property o f .~. By the construction o f -%e, if te ever is enabled, the output on o is frozen; so .~g is an eN-WPNC for q for all N E N, and it generates any number of tokens up to at least N on the nondesignated places.

Hence ~ g i s a blurring W P N C for q, and Theorem 4 (i) is established. The verification o f parts (ii) and (iii) is left to the reader.

REFERENCES

1. ACKERMANN, W. Zum Hdbertschen Aufbau der reellen Zahlen. Math. Ann. 99 (1928), 118-133.

2 ADLEMAN, L , AND MANDERS, K. Computational complexity of deosion procedures for polynomials.

Conf. Rec 16th Ann. IEEE Symp on Foundauons of Computer Science, Berkeley, Calif., 1975, pp.

169-177

(16)

576 E. W. MAYR AND A. R. MEYER 3. BAKER, H.G. Rabm's proof of the undecldablllty of the reachability set inclusion problem of vector addition systems. Computauon Structures Group Memo 79, Project MAC, M.I.T., Cambridge, Mass., July 1973.

4. BIRYUKOV, A.P. Some algorithralc problems for fimtely defined commutative semigroups. Siberian Math. J. 8 (1967), 384---391.

5. CARDOZA, E., LIPTON, R.J., AND MEYER, A.R. Exponential space complete problems for Petri nets and commutative semigroups. 8th Ann. ACM Symp. on Theory of Computing, Hershey, Pa., May 1976, pp. 50---54

6. DAVIS, M. Hilbert's Tenth Problem is unsolvable. Am. Math Monthly 80 (1973), 233-269.

7. E~6ELER, E. IntroducUon to the Theory of Computation. Academic Press, New York, London, 1973.

8. HACK, M. Decision problems for Petn nets and vector addition systems T¢ch Memo. 59, Project MAC, M.LT, Cambridge, Mass., 1975

9. HACK, M. Decldabihty questtons for Petn nets. Ph D. Dissertation, Tech. Rep. 161, Laboratory for Computer Science, M.I.T., Cambridge, Mass., June 1976.

10. HItaERT, D. Mathematlsche Probleme. Vortrag, gehalten auf dem mternationalen Mathematlker- Kongress zu Paris 1900 Nach. K. Ges. Wiss. Gdttmgen, Math.-Phys. Kl (1900), 253-297 [English translation: Bull Am. Math Soc. 8 (1901-1902), 437-479].

11. JAFEE, J. Semlhnear sets and apphcations. Master's Thesis, Tech. Rep. 182, Laboratory for Computer Science, M.I.T., Cambridge, Mass, June 1977

12 JONES, N.D, LANDW~BER, L.H., AND LIEN, Y.E. Complexay of some problems in Petri nets Theor.

Comput Sct. 4 (June 1977), 277-299

13. KARP, R , AND MILLER, R. Parallel program schemata. J. Comput Syst Sct. 3 (1969), 147-195.

14. KELLER, R.M Vector replacement systems: A formahsm for modelling asynchronous systems Computer Science Laboratory Tech. Rep. 117, Princeton Univ., Princeton, N.J., December 1972.

15. LANDWERER, L.H., AND ROBERTSON, E L. Properties of conflict-free and persistent Petri nets.

Computer Science Dep. Tech Rep. 264, Umv of Wisconsin, Madison, Wis., 1975.

16. LIPTON, R.J. The reachabihty problem is exponential-space-hard. Yale Computer Science Rep. 62, Yale Umv, New Haven, Conn., Jan 1976.

17. MATtrASEVIC, J.V. Enumerable sets are Diophantine. Soy. Math. Dokl. 11 (1970), 354--357.

18 MAYR, E.W. The complextty of the finite containment problem for Petri nets. Master's Thesis, Tech.

Rep. 181, Laboratory for Computer Science, M.I T., Cambridge, Mass., May 1977

19. RACKOFF, C The covering and boundedness problems for vector addmon systems. Theor Comput.

Sc~. 6 (1978), 223-231.

20 TAICLIN, M A. Algorithmic problems for commutauve semtgroups. Soy Math. Dokl 9 (1968), 201-204.

RECEIVED JUNE 1977; REVISED MAY 1980; ACCEPTED JUNE 1980

Journal of the Assoctatlon for Computtag Maclunery, Vol 28, No 3. July 1981

Cytaty

Powiązane dokumenty

(Received 15 November 2011; accepted 6 January 2012; published online 25 January 2012) We report frequency locking of two 3.5-THz third-order distributed feedback (DFB) quantum

[r]

In [KR16, Theorem 4.9], it was deduced from Fact 1.32 that if E is an F σ , bounded, orbital on types equivalence relation defined on a single complete type over ∅ or refining E KP

Consider X = C 2π (R) the space of continuous and 2π-periodic functions on R, and V 2n+1 the space of trigonometric polynomials of degree at most n, as in Chapter 4.. In this case,

The Hahn-Banach theorem about the possibility of an extension of a linear functional defined on a subspace to a functional on the whole space preserving its norm reads as

Po raz pierwszy tak wyraźnie w kontekście polskiej refleksji nad turystyka kulturową jako całością umieszczono także takie szczegółowe zagadnienia graniczne, jak

To make it easier to imagine how a building would function for the occupants, a game was designed in which events happen that require changes in the design.. The game helps to

Diagnostics of material damages and their description are of importance for the development of the methods for improving the reliability, prediction of the