arxiv: v2 [cs.lo] 26 Dec 2016

Similar documents
Convert the NFA into DFA

Minimal DFA. minimal DFA for L starting from any other

Designing finite automata II

p-adic Egyptian Fractions

1 Nondeterministic Finite Automata

Assignment 1 Automata, Languages, and Computability. 1 Finite State Automata and Regular Languages

Coalgebra, Lecture 15: Equations for Deterministic Automata

Model Reduction of Finite State Machines by Contraction

Regular expressions, Finite Automata, transition graphs are all the same!!

Nondeterminism and Nodeterministic Automata

Parse trees, ambiguity, and Chomsky normal form

Formal Languages and Automata

Bases for Vector Spaces

1. For each of the following theorems, give a two or three sentence sketch of how the proof goes or why it is not true.

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018

CMPSCI 250: Introduction to Computation. Lecture #31: What DFA s Can and Can t Do David Mix Barrington 9 April 2014

1 From NFA to regular expression

Intermediate Math Circles Wednesday, November 14, 2018 Finite Automata II. Nickolas Rollick a b b. a b 4

Types of Finite Automata. CMSC 330: Organization of Programming Languages. Comparing DFAs and NFAs. Comparing DFAs and NFAs (cont.) Finite Automata 2

Homework Solution - Set 5 Due: Friday 10/03/08

Lecture 08: Feb. 08, 2019

CMSC 330: Organization of Programming Languages

CS415 Compilers. Lexical Analysis and. These slides are based on slides copyrighted by Keith Cooper, Ken Kennedy & Linda Torczon at Rice University

Types of Finite Automata. CMSC 330: Organization of Programming Languages. Comparing DFAs and NFAs. NFA for (a b)*abb.

Formal languages, automata, and theory of computation

CSCI 340: Computational Models. Kleene s Theorem. Department of Computer Science

AUTOMATA AND LANGUAGES. Definition 1.5: Finite Automaton

CS 275 Automata and Formal Language Theory

DFA minimisation using the Myhill-Nerode theorem

5. (±±) Λ = fw j w is string of even lengthg [ 00 = f11,00g 7. (11 [ 00)± Λ = fw j w egins with either 11 or 00g 8. (0 [ ffl)1 Λ = 01 Λ [ 1 Λ 9.

Finite Automata-cont d

First Midterm Examination

Homework 3 Solutions

Compiler Design. Fall Lexical Analysis. Sample Exercises and Solutions. Prof. Pedro C. Diniz

3 Regular expressions

Harvard University Computer Science 121 Midterm October 23, 2012

Revision Sheet. (a) Give a regular expression for each of the following languages:

Chapter 2 Finite Automata

Farey Fractions. Rickard Fernström. U.U.D.M. Project Report 2017:24. Department of Mathematics Uppsala University

Lecture 09: Myhill-Nerode Theorem

1. For each of the following theorems, give a two or three sentence sketch of how the proof goes or why it is not true.

2.4 Linear Inequalities and Interval Notation

Theory of Computation Regular Languages. (NTU EE) Regular Languages Fall / 38

Finite Automata. Informatics 2A: Lecture 3. John Longley. 22 September School of Informatics University of Edinburgh

I1 = I2 I1 = I2 + I3 I1 + I2 = I3 + I4 I 3

Exercises with (Some) Solutions

Chapter Five: Nondeterministic Finite Automata. Formal Language, chapter 5, slide 1

More on automata. Michael George. March 24 April 7, 2014

CM10196 Topic 4: Functions and Relations

12.1 Nondeterminism Nondeterministic Finite Automata. a a b ε. CS125 Lecture 12 Fall 2016

State Minimization for DFAs

Lecture 3: Equivalence Relations

Theory of Computation Regular Languages

First Midterm Examination

CS 373, Spring Solutions to Mock midterm 1 (Based on first midterm in CS 273, Fall 2008.)

Concepts of Concurrent Computation Spring 2015 Lecture 9: Petri Nets

1.3 Regular Expressions

Lecture 2: January 27

Centrum voor Wiskunde en Informatica REPORTRAPPORT. Supervisory control for nondeterministic systems

Closure Properties of Regular Languages

CS 330 Formal Methods and Models

The University of Nottingham SCHOOL OF COMPUTER SCIENCE A LEVEL 2 MODULE, SPRING SEMESTER LANGUAGES AND COMPUTATION ANSWERS

CS103B Handout 18 Winter 2007 February 28, 2007 Finite Automata

The size of subsequence automaton

Global Types for Dynamic Checking of Protocol Conformance of Multi-Agent Systems

80 CHAPTER 2. DFA S, NFA S, REGULAR LANGUAGES. 2.6 Finite State Automata With Output: Transducers

Finite Automata. Informatics 2A: Lecture 3. Mary Cryan. 21 September School of Informatics University of Edinburgh

CMSC 330: Organization of Programming Languages. DFAs, and NFAs, and Regexps (Oh my!)

CSE396 Prelim I Answer Key Spring 2017

Tutorial Automata and formal Languages

Global Session Types for Dynamic Checking of Protocol Conformance of Multi-Agent Systems

Grammar. Languages. Content 5/10/16. Automata and Languages. Regular Languages. Regular Languages

MTH 505: Number Theory Spring 2017

Lecture 3. In this lecture, we will discuss algorithms for solving systems of linear equations.

Review of Gaussian Quadrature method

Strong Bisimulation. Overview. References. Actions Labeled transition system Transition semantics Simulation Bisimulation

Converting Regular Expressions to Discrete Finite Automata: A Tutorial

Homework 4. 0 ε 0. (00) ε 0 ε 0 (00) (11) CS 341: Foundations of Computer Science II Prof. Marvin Nakayama

Lecture 9: LTL and Büchi Automata

Talen en Automaten Test 1, Mon 7 th Dec, h45 17h30

CS103 Handout 32 Fall 2016 November 11, 2016 Problem Set 7

378 Relations Solutions for Chapter 16. Section 16.1 Exercises. 3. Let A = {0,1,2,3,4,5}. Write out the relation R that expresses on A.

1.4 Nonregular Languages

Surface maps into free groups

1B40 Practical Skills

NFAs continued, Closure Properties of Regular Languages

Torsion in Groups of Integral Triangles

NFAs and Regular Expressions. NFA-ε, continued. Recall. Last class: Today: Fun:

NFA DFA Example 3 CMSC 330: Organization of Programming Languages. Equivalence of DFAs and NFAs. Equivalence of DFAs and NFAs (cont.

Thoery of Automata CS402

Linear Systems with Constant Coefficients

Name Ima Sample ASU ID

CHAPTER 1 Regular Languages. Contents

Lexical Analysis Finite Automate

Automata Theory 101. Introduction. Outline. Introduction Finite Automata Regular Expressions ω-automata. Ralf Huuck.

The Minimum Label Spanning Tree Problem: Illustrating the Utility of Genetic Algorithms

NFAs continued, Closure Properties of Regular Languages

CS 275 Automata and Formal Language Theory

CS 330 Formal Methods and Models Dana Richards, George Mason University, Spring 2016 Quiz Solutions

Exercises Chapter 1. Exercise 1.1. Let Σ be an alphabet. Prove wv = w + v for all strings w and v.

Transcription:

On Negotition s Concurrency Primitive II: Deterministic Cyclic Negotitions Jvier Esprz 1 nd Jörg Desel 2 1 Fkultät für Informtik, Technische Universität München, Germny 2 Fkultät für Mthemtik und Informtik, FernUniversität in Hgen, Germny rxiv:1403.4958v2 [cs.lo] 26 Dec 26 Astrct. We continue our study of negottions, concurrency model with multiprty negotition s primitive. In previous pper [7] we hve provided correct nd complete set of reduction rules for sound, cyclic, nd (wekly) deterministic negotitions. In this pper we extend this result to ll deterministic negotitions, including cyclic ones. We lso show tht this set of rules llows one to decide soundness nd to summrize negotitions in polynomil time. Retrction Unfortuntely, while prepring journl version of this contriution we hve discovered tht Lemm 6 is wrong. Since the lemm is used in line 3 of the reduction procedure descried in Section 5.4, the procedure is lso incorrect. We hve uploded preprint of the journl version to rxiv (http://rxiv.org/s/1612.07912). The preprint contins counterexmple to Lemm 6 (see Section 7.7). It lso presents corrected reduction procedure with the sme chrcteristics s the incorrect one. So, fortuntely, while the specific reduction procedure presented in this contriution is wrong, our min results still hold: The merge, itertion, nd shortcut reduction rules re complete for the clss of sound nd deterministic negotitions, i.e., they completely reduce ll nd only the sound deterministic negotitions to n tomic negotition. There exists polynomil p(x) such tht every sound deterministic negotition of size n cn e reduced to n tomic negotition y mens of t most p(n) pplictions of the reduction rules. There exists polynomil-time lgorithm tht, given sound deterministic negotition of size n, constructs reduction sequence of length t most p(n). 1 Introduction Negotition hs long een identified s prdigm for process interction [5]. It hs een pplied to different prolems (see e.g. [15, 3]), nd studied on its own [14]. However, it hs not yet een studied from concurrency-theoretic point of view. In [7] we hve initited study of negotition s communiction primitive.

2 Oservtionlly, negotition is n interction in which severl prtners come together to gree on one out of numer of possile outcomes ( synchronized nondeterministic choice). In [7] we hve introduced negotitions, Petri-net like concurrency model comining multiprty tomic negotitions or toms into more complex distriuted negotitions. Ech possile outcome of n tom hs ssocited stte-trnsformer. Negotition prtners enter the tom in certin initil sttes, nd leve it in the sttes otined y pplying to the initil sttes the stte-trnsformer of the outcome greed upon. Atoms re comined into more complex, distriuted negotitions, y mens of next-toms function tht determines for ech tom, negotiting gent, nd outcome, the set of toms the gent is redy to engge in next if the tom ends with tht outcome. Negotitions re close to colored version of vn der Alst s workflow nets [1]. Like in workflow nets, distriuted negotitions cn e unsound ecuse of dedlocks or livelocks. The soundness prolem consists of deciding if given negotition is sound. Moreover, sound negotition is equivlent to single tom whose stte trnsformtion function determines the possile finl internl sttes of ll prties s function of their initil internl sttes. The summriztion prolem consists of computing such n tomic negotition, clled summry. Negotitions cn simulte 1-sfe Petri nets (see the rxiv version of [7]), which proves tht the soundness prolem nd ( decision version of) the summriztion prolem re, unsurprisingly, PSPACE-complete. For this reson we hve studied in [7] two nturl clsses: deterministic nd wekly deterministic negotitions. Only deterministic negotitions re relevnt for this pper. Loosely speking, negotition is deterministic if, for ech gent nd ech outcome of n tomic negotition, the next-tom function yields only one next tom, i.e., ech gent cn lwys engge in one tom only. In prticulr, we hve shown in [7] tht the soundness nd summriztion prolems for cyclic deterministic negotitions cn e solved in polynomil time. (Notice tht the stte spce of deterministic negotition cn e exponentilly lrger then the negotition itself). The lgorithm tkes the grphicl representtion of reduction procedure in which the originl negotition is progressively reduced to simpler one y mens of set of reduction rules. Ech rule preserves soundness nd summries (i.e., the negotition efore the ppliction of the rule is sound iff the negotition fter the ppliction is sound, nd oth hve the sme summry). Reduction rules hve een extensively pplied to Petri nets or workflow nets, ut most of this work hs een devoted to the liveness or soundness prolems [4, 11, 12, 10, 6], nd mny rules, like for exmple the liner dependency rule of [6], do not preserve summries. In [7] we conjectured tht the ddition of simple rule llowing one to reduce trivil cycles yields complete set of rules for ll sound deterministic negotitions. In this pper we prove this result, nd show tht the numer of rule pplictions required to summrize negotition is still polynomil. While the new rule is very simple, the proof of our result is very involved. It is structured in severl sections, nd some technicl proofs hve een moved to

3 n ppendix. More precisely, the pper is structured s follows. Sections 2 nd 3 presents the min definitions of [7] in compct form. Section 4 introduces our set of three reduction rules. Section 5 proves tht the rules summrize ll sound deterministic negotitions. Section 6 proves tht the summriztion requires polynomil numer of steps. 2 Negotitions: Syntx nd Semntics We recll the min definitions of [7], nd refer to this pper for more detils. We fix finite set A of gents. Ech gent A hs (possily infinite) nonempty set Q of internl sttes. We denote y Q A the crtesin product A Q. A trnsformer is left-totl reltion τ Q A Q A. Given S( A, we sy tht trnsformer τ is n S-trnsformer ) if, for ech i / S, (q 1,..., q i,..., q A ), (q 1,..., q i,..., q A ) τ implies q i = q i. So n S-trnsformer only trnsforms the internl sttes of gents in S. Definitio. A negotition tom, or just n tom, is triple n = (P n, R n, δ n ), where P n A is nonempty set of prties, R n is finite, nonempty set of outcomes, nd δ n is mpping ssigning to ech outcome r in R n P n -trnsformer δ n (r). Intuitively, if the sttes of the gents efore negotition n re given y tuple q nd the outcome of the negotition is r, then the gents chnge their sttes to q for some (q, q ) δ n (r). For simple exmple, consider negotition tom n FD with prties F (Fther) nd D (teenge Dughter). The gol of the negotition is to determine whether D cn go to prty, nd the time t which she must return home. The possile outcomes re yes (y) nd no. Both sets Q F nd Q D contin stte plus stte t for every time T 1 t T 2 in given intervl [T 1, T 2 ]. Initilly, F is in stte t f nd D in stte t d. The trnsformer δ nfd is given y δ nfd (yes) = {((t f, t d ), (t, t)) t f t t d t d t t f } δ nfd (no) = {((t f, t d ), (, )) } 2.1 Comining tomic negotitions A negotition is composition of toms. We dd trnsition function X tht ssigns to every triple (n,, r) consisting of n tom n, prticipnt of n, nd n outcome r of n set X(n,, r) of toms. Intuitively, this is the set of tomic negotitions gent is redy to engge in fter the tom n, if the outcome of n is r. Definitio. Given finite set of toms N, let T (N) denote the set of triples (n,, r) such tht n N, P n, nd r R n. A negotition is tuple N = (N, n 0, n f, X), where n 0, n f N re the initil nd finl toms, nd X: T (N) 2 N is the trnsition function. Further, N stisfies the following properties: (1) every gent of A prticiptes in oth n 0 nd n f ; (2) for every (n,, r) T (N): X(n,, r) = iff n = n f.

4 n 0 F D st st F D m y,n y,n,m y,n M st D M y,n n f F D M n n 0 F y F r 00 11 0 0 1 1 y n f y D D 00 11 M tm tm n r n r F D M y 00 11 00 11 F D M y y Fig. 1. Acyclic nd cyclic negotitions. Negotitions re grphiclly represented s shown in Figure 1. For ech tom n N we drw lck r; for ech prty of P n we drw white circle on the r, clled port. For ech (n,, r) T (N), we drw hyperrc leding from the port of in n to ll the ports of in the toms of X(n,, r), nd lel it y r. Figure 1 shows two Fther-Dughter-Mother negotitions. On the left, Dughter nd Fther negotite with possile outcomes yes (y), no (n), nd sk mother (m). If the outcome is the ltter, then Dughter nd Mother negotite with outcomes yes, no. In the negotition on the right, Fther, Dughter nd Mother negotite with outcomes yes nd no. If the outcome is yes, then Fther nd Dughter negotite return time (tom ) nd propose it to Mother (tom ). If Mother pproves (outcome yes), then the negotition termintes, otherwise (outcome r) Dughter nd Fther renegotite the return time. For the ske of revity we do not descrie the trnsformers of the toms. Definition 3. The grph ssocited to negotition N = (N, n 0, n f, X) is the directed grph with vertices N nd edges {(n, n ) N N (n,, r) T (N): n X(n,, r)}. The negotition N is cyclic if its grph hs no cycles, otherwise it is cyclic. The negotition on the left of Figure 1 is cyclic, the one the right is cyclic. 2.2 Semntics A mrking of negotition N = (N, n 0, n f, X) is mpping x: A 2 N. Intuitively, x() is the set of toms tht gent is currently redy to engge in next. The initil nd finl mrkings, denoted y x 0 nd x f respectively, re given y x 0 () = {n 0 } nd x f () = for every A. A mrking x enles n tom n if n x() for every P n, i.e., if every prty of n is currently redy to engge in it. If x enles n, then n cn tke plce nd its prties gree on n outcome r; we sy tht (n, r) occurs. Ausing lnguge, we will cll this pir lso n outcome. The occurrence of (n, r) produces next mrking x given y x () = X(n,, r) for every P n, nd x () = x()

for every A \ P n. We write x (n,r) x to denote this, nd cll it smll step. By this definition, x() is lwys either {n 0 } or equls X(n,, r) for some tom n nd outcome r. The mrking x f cn only e reched y the occurrence of (n f, r) (r eing possile outcome of n f ), nd it does not enle ny tom. Any other mrking tht does not enle ny tom is considered dedlock. Rechle mrkings re grphiclly represented y plcing tokens (lck dots) on the forking points of the hyperrcs (or in the middle of n rc). Figure 1 shows on the right mrking in which F nd D re redy to engge in nd M is redy to engge in. σ We write x 1 to denote tht there is sequence x 1 (,r 1) x 2 (,r 2) (n k 1,r k 1 ) x k (n k,r k ) x k+1 σ of smll steps such tht σ = (, r 1 )... (n k, r k ).... If x 1, then σ is n occurrence sequence from the mrking x 1, nd x 1 enles σ. If σ is finite, then σ we write x 1 x k+1 nd sy tht x k+1 is rechle from x 1. If x 1 is the initil mrking then we cll σ initil occurrence sequence. If moreover x k+1 is the finl mrking, then σ is lrge step. Negotitions nd Petri nets. A negotition cn e ssoicted n equivlent Petri net with the sme occurrence sequences (see [7], rxiv version). However, in the worst cse the Petri net is exponentilly lrger. 5 2.3 Soundness Following [1, 2], we introduce notion of well-formedness of negotition: Definition 4. A negotition is sound if () every tom is enled t some rechle mrking, nd () every occurrence sequence from the initil mrking is either lrge step or cn e extended to lrge step. The negotitions of Figure 1 re sound. However, if we set in the left negotition X(n 0, M, st) = {n DM } insted of X(n 0, M, st) = {n DM, n f }, then the occurrence sequence (n 0, st)(n FD, yes) leds to dedlock. Definition 5. Given negotition N = (N, n 0, n f, X), we ttch to ech outcome r of n f summry trnsformer N, r s follows. Let E r e the set of lrge steps of N tht end with (n f, r). We define N, r = σ E r σ, where for σ = (, r 1 )... (n k, r k ) we define σ = δ n1 (r 1 ) δ nk (r k ) (ech δ ni (r i ) is reltion on Q A ; conctention is the usul conctention of reltions). N, r (q 0 ) is the set of possile finl sttes of the gents fter the negotition concludes with outcome r, if their initil sttes re given y q 0.

6 Definition 6. Two negotitions N 1 nd N 2 over the sme set of gents re equivlent if they re either oth unsound, or if they re oth sound, hve the sme finl outcomes (outcomes of the finl tom), nd N 1, r = N 2, r for every finl outcome r. If N 1 re equivlent nd N 2 nd N 2 consists of single tom, then N 2 is the summry of N 1. Notice tht, ccording to this definition, ll unsound negotitions re equivlent. This mounts to considering soundness essentil for negotition: if it fils, we do not cre out the rest. 3 Deterministic Negotitions We introduce deterministic negotitions. Definition 7. A negotition N is deterministic if for every (n,, r) T (N) there is n tom n such tht X(n,, r) = {n } In the rest of the pper we write X(n,, r) = n insted of X(n,, r) = {n }. Grphiclly, negotition is deterministic if there re no proper hyperrcs. The negotition on the left of Figure 1 is not deterministic (it contins proper hyperrc for Mother), while the one on the right is deterministic. In the sequel, we often ssume tht negotition is sound nd deterministic, nd revite sound nd deterministic negotition to SDN. 4 Reduction Rules for Deterministic Negotitions We present three equivlence-preserving reduction rules for negotitions. Two of them were lredy introduced in [7], while the itertion rule is new. A reduction rule, or just rule, is inry reltion on the set of negotitions. R Given rule R, we write N 1 N 2 for (N 1, N 2 ) R. A rule R is correct if R it preserves equivlence, i.e., if N 1 N 2 implies N 1 N 2. In prticulr, this implies tht N 1 is sound iff N 2 is sound. Given set of rules R = {R 1,..., R k }, we denote y R the reflexive nd trnsitive closure of R 1... R k. We sy tht R is complete with respect to clss of negotitions if, for every negotition N in the clss, there is negotition N consisting of single tom such tht N R N. We descrie rules s pirs R of gurd nd n ction; N 1 N 2 holds if N 1 stisfies the gurd nd N 2 is possile result of pplying the ction to N 1. Slightly more generl versions of the following rules hve een presented in [7]. Here we only consider deterministic negotitions. Merge rule. Intuitively, the merge rule merges two outcomes with identicl next enled toms into one single outcome.

7 Definition 8. Merge rule Gurd: N contins n tom n with two distinct outcomes r 1, r 2 R n such tht X(n,, r 1 ) = X(n,, r 2 ) for every A n. Action: (1) R n (R n \ {r 1, r 2 }) {r f }, where r f is fresh nme. (2) For ll P n : X(n,, r f ) X(n,, r 1 ). (3) δ(n, r f ) δ(n, r 1 ) δ(n, r 2 ). Shortcut rule. Inituitively, the shortcut rule merges the outcomes of two toms tht cn occur one fter the other into one single outcome with the sme effect. Figure 6 illustrtes the definition (ignore the ig circle for the moment): the outcome (n, r f ), shown in red, is the shortcut of the outcome (n, r) followed y the outcome (n, r ). Definition 9. Given toms n, n, we sy tht (n, r) unconditionlly enles n if P n P n nd X(n,, r) = n for every P n. Oserve tht if (n, r) unconditionlly enles n then, for every mrking x tht enles n, the mrking x given y x (n,r) x enles n. Moreover, n cn only e disled y its own occurrence. Definitio0. Shortcut rule for deterministic negotitions Gurd: N contins n tom n with n outcome r, nd n tom n, n n, such tht (n, r) unconditionlly enles n. Action: (1) R n (R n \ {r}) {r f r R n }, where r f re fresh nmes. (2) For ll P n, r R n : X(n,, r f ) X(n,, r ). For ll P \ P n, r R n : X(n,, r f ) X(n,, r). (3) For ll r R n : δ n (r f ) δ n(r)δ n (r ). (4) If X 1 (n ) = fter (1)-(3), then remove n from N, where X 1 (n ) = {(ñ, ã, r) T (N) n X(ñ, ã, r)}. Itertion rule. Loosely speking, the itertion rule replces the itertion of negotition y one single tom with the sme effect. Definitio1. Itertion rule Gurd: N contins n tom n with n outcome r such tht X(n,, r) = n for every prty of n. Action: (1) R n {r f r R n \ {r}}. (2) For every r f R n: δ n (r f ) δ n(r) δ n (r ). It is importnt to notice tht reductions preserve determinism: Propositio. If negotition N is deterministic nd the ppliction of the shortcut, merge or itertion rule yields negotition N then N is deterministic, too. Theorem 1. The merge, shortcut, nd itertion rules re correct.

8 Proof. Correctness of the merge nd itertion rules is ovious. The correctness of more generl version of the shortcut rule is proved in [7] 3. 5 Completeness In [7] we show tht every sound nd wekly deterministic cyclic negotition cn e summrized to single tom, nd tht in the deterministic cse the numer of rule pplictions is polynomil (ctully, [7] provides shrper ound thn the one in this theorem): Theorem 2 ([7]). Every sound deterministic cyclic negotition N cn e reduced to single tom y mens of N 2 + Out(N) pplictions of the merge nd shortcut rules, where N is the set of toms of N, nd Out(N) is the set of ll outcomes of ll toms of N. In the rest of the pper section we prove tht, surprisingly, the ddition of the very simple itertion rule suffices to extend this result to cyclic deterministic negotitions, lthough with higher exponent. The rgument is complex, nd requires detiled nlysis of the structure of SDNs. In this section we present the completeness proof, while the complexity result is presented in the next. We illustrte the reduction lgorithm y mens of n exmple. Figure 2 () shows cyclic SDN similr to the Fther-Dughter-Mother negotition on the right of Figure 1. We identify n lmost cyclic frgment, nmely the frgment coloured lue in the figure. Intuitively, lmost cyclic mens tht the frgment cn e otined y merging the initil nd finl toms of n cyclic SDN; in our exmple, this is the lue cyclic SDN shown in Figure 2 (). This cyclic SDN cn e summrized using the shortcut nd merge rules. If we pply the sme sequence of rules to the lue frgment (with the exception of the lst rule, which reduces negotition with two different toms nd one single outcome to n tomic negotition) we otin the negotition shown in (c). The lue self-loop cn now e eliminted with the help of the itertion rule, nd the procedure cn e iterted: We identify n lmost cyclic frgment, coloured red. Its reduction yields the the negotition shown in (e). The self-loop is eliminted y the itertion rule, yielding n cyclic negotition, which cn e summrized. In order to prove completeness we must show tht every cyclic SDN contins t lest one lmost cyclic frgment, which is non-trivil. The proof hs three prts: We first show tht every cyclic SDN hs loop: n occurrence sequence from some rechle mrking x ck to x. Then we show tht ech miniml loop hs synchronizer: n tom involving ech gent tht is prty of ny tom of the loop. Finlly we show how to use synchronizers to identify nonempty nd lmost cyclic frgment. 3 The rule of [7] hs n dditionl condition in the gurd which is lwys true for deterministic negotitions.

9 () (c) (e) n 0 n 3 n 4 n 5 n f () (d) n 4 Fig. 2. The reduction procedure 5.1 Lssos nd Loops Definitio2. A lsso of negotition is pir (ρ, σ) of occurrence sequences ρ such tht σ is not the empty sequence nd x 0 x σ x for some mrking x. A loop is n occurrence sequence σ such tht (ρ, σ) is lsso for some occurrence sequence ρ. A miniml loop is loop σ stisfying the property tht there is no other loop σ such tht the set of toms in σ is proper suset of the set of toms in σ. Oserve tht lssos nd loops re ehviourl notions, i.e., structures of the rechility grph of negotition. The following result estlishes reltions etween loops nd cycles, where cycles re defined on the grph of negotition. Lemm 1. (1) Every cyclic SDN hs loop.

10 (2) The set of toms of miniml loop genertes strongly connected sugrph of the grph of the considered negotition. Proof. (1) Let π e cycle of the grph of the negotition N. Let e n ritrry tom occurring in π, nd let e its successor in π. We hve n f ecuse n f hs no successor, nd hence no cycle contins n f. By soundness, some rechle mrking x 1 enles. There is n gent nd result r such tht X(,, r) contins. By determinism we hve (,r) X(,, r) = { }. Let x 1 x 1. Agin y soundness, there is n occurrence sequence from x 1 tht leds to the finl mrking. This sequence necessrily contins n occurrence of ecuse this is the only tom gent is redy to engge in. In prticulr, some prefix of this sequence leds to mrking x 2 tht enles. Repeting this rgument for ll nodes,, n 3,..., n k = of the cycle π, we conclude tht there is n infinite occurrence sequence, contining infinitely mny occurrences of toms of the cycle π. Since the set of rechle mrkings is finite, this sequence contins loop. (2) For ech gent involved in ny tom of the loop, consider the sequence of toms this gent is involved in. By the definition of the grph of the negotition, this sequence is pth of the grph. It is moreover (not necessrily simple) cycle of teh grph, ecuse loop strts nd ends with the sme mrking. So the sugrph generted y the toms in the loop is covered y cycles. It is moreover strongly connected ecuse, for ech proper strongly connected component, the projection of the toms of the loop onto the toms in the component is smller loop, contrdicting the minimlity of the loop. 5.2 Synchronizers Definitio3. A loop σ = (, r 1 )... (n k, r k ) is synchronized if there is n tom n i in σ such tht P j P i for every 1 j k, i.e., every prty of every tom in the loop is lso prty of n i. We cll n i synchronizer of the loop. An tom is synchronizer of negotition if it is synchronizer of t lest one of its loops. Oserve tht ech loop x (n,r) x is synchronized. In the grph ssocited to negotition, such loop ppers s self-loop, i.e., s n edge from tom n to tom n. Some of the loops of the SDN shown in Figure 2 () re (, ) (, ) (n 4, ) (n 5, ), (, ) (n 3, ) (n 5, ), nd (, ) (n 4, ). The first loop is synchronized y (, ) nd y (n 5, ), the two others re synchronized y ll their outcomes. The min result of this pper is strongly sed on the following lemm. Lemm 2. Every miniml loop of SDN is synchronized.

11 Proof. Let σ e miniml loop, enled t rechle mrking x. Define N σ s the set of toms tht occur in σ nd A σ s the set of gents involved in toms of N σ. Since N is sound, there is n occurrence sequence σ f enled y x tht ends with the finl tom n f. Now choose n ritrry gent â of A σ. Using σ f, we construct pth π of the grph of N s follows: We egin this pth with the lst tom n N σ tht ppers in σ f nd involves gent â. We cll this tom n π. Then we repetedly choose the lst tom in σ f tht involves â nd moreover is successor of the lst vertex of the pth constructed so fr. By construction, this pth hs no cycles (i.e., ll vertices re distinct), strts with n tom of N σ nd hs not further toms of N σ, ends with n f, nd only contins toms involving â. Since x enles the loop σ nd since n π N σ, fter some prefix of σ mrking x π is reched which enles n π. The loop σ continues with some outcome (n π, r 1 ), where r 1 is one possile result of n π. By construction of the pth π, there is n lterntive result r 2 of n π such tht X(n π, â, r 2 ) is the second tom of the pth π, nd this tom does not elong to N σ. Let x π e the mrking reched fter the occurrence of (n π, r 2 ) t x π. From x π, we itertively construct n occurrence sequence s follows: (1) if n tom n of N σ is enled nd thus some (n, r) occurs in σ, we continue with (n, r), (2) otherwise, if n tom n of the pth π is enled, we let this tom occur with n outcome r such tht X(n, â, r) is the successor tom w.r.t. the pth π, (3) otherwise we dd miniml occurrence sequence tht either leds to the finl mrking or enles n tom of σ or n tom of π, so tht fter this sequence one of the previous rules cn e pplied. Such n occurrence sequence exists ecuse N is sound nd hence the finl mrking cn e reched. First oserve tht gent â will lwys e redy to engge only in n tom of the pth π. So its token is moved long π. Conversely, ll toms of π involve â. Therefore only finitely mny toms of π occur in the sequence. This limits the totl numer of occurrences of type (2). Agent â is no more redy to engge in ny tom of N σ during the sequence. So t lest n π cnnot occur ny more in the sequence ecuse â is prty of n π. By minimlity of the loop σ, there is no loop with set of toms in N σ \ {n π }. Since the set of rechle mrkings is finite, there cnnot e n infinite sequence of toms of N σ (type (1)) without occurrences of other toms. By determinism, ech gent redy to engge in n tom of N σ cn only engge in this tom. So the set of these gents is only chnged y occurrences of type (1). By construction, no gent ever leves the loop fter the occurrence of (n π, r 2 ), i.e. every gent of this set remins in this set y n occurrence of type (1). Therefore, the set of gents redy to engge in n tom of N σ never decreses. For ech sequence of type (3) we hve three possiilities. () It ends with the finl mrking.

12 () It ends with mrking tht enles n tom of (2), which then occurs next. However, toms of (2) cn occur only finitely often in the constructed sequence, s lredy mentioned. (c) It ends with mrking tht enles n tom of (1) which then occurs next. In tht cse the lst outcome of this sequence necessrily involves n gent of A σ, which fter this occurrence is redy to engge in n tom of N σ. So it increses the numer of gents redy to engge in n tom of N σ. Since this numer never decreses, this option cn lso hppen only finitely often. Hence, eventully only option () is possile, nd the sequence will rech the finl mrking. Since the finl tom involves ll gents, no gent ws le to remin in the loop. In other words: ll gents of A σ left the loop when (n π, r 2 ) hs occurred. As consequence, ll these gents re prties of n π, nd n π therefore is synchronizer of the loop σ. Oserve tht this lemm does not hold for ritrry (i.e., non-deterministic) sound negotitions. For the negotition on the right of Figure 3 (ll toms hve only one outcome, whose nme is omitted), the sequence is loop without synchronizers. The negotition on the left shows tht Lemm 3(1) lso holds only in the deterministic cse. It is sound nd cyclic, ut hs no loops, ecuse the only ig step is n 0 n f (the nme of the outcome is gin omitted). n 0 n 0 n f n f Fig. 3. Two sound nd cyclic negotitions 5.3 Frgments We ssign to ech tom n of n SDN frgment F n s follows: we tke ll the loops synchronized y n, nd (informlly) define F n s the toms nd outcomes tht pper in these loops. Figure 4 () nd (c) show F n1 nd F n2 for the SDN of Figure 2. Since cyclic SDN hs t lest one loop nd hence lso miniml one, nd since every loop hs synchronizer, t lest one of the frgments of cyclic SDN is nonempty. Given frgment F n, let N n denote the negotition otined y, intuitively, splitting the tom n into n initil nd finl tom. Figure 4 () nd (d)

13 show the splittings N n1 nd N n2 of F n1 nd F n2. Not ll frgments re lmost cyclic. For instnce, N n1 is not cyclic, nd so F n1 is not lmost cyclic. However, we prove tht if frgment is not lmost cyclic, then it contins smller frgment (for instnce, F n1 contins F n2 ). This shows tht every miniml frgment is lmost cyclic. () () (c) (d) n 3 n 4 n 5 n 3 n 4 n 5 n 4 n 4 Fig. 4. Frgments of the SDN of Figure 2() nd their splittings Definitio4. Let L e set of loops of N. Ausing lnguge, we write (n, r) L resp. n L to denote tht (n, r) resp. n ppers in some loop of L. The projection of n tom n = (P n, R n, δ n ) L onto L is the tom n L = (P L, R L, δ L ), where P L = P n, R L = {r (n, r) L}, nd δ L ((n L, r)) = δ((n, r)) for every (n, r) L. Definitio5. Let s e n tom of negotition N, nd let L e the set of loops synchronized y s. The s-frgment of N is the pir F s = (F s, X s ), where F s = {n L n L} nd X s (n L,, r) = X(n,, r) for every P L nd r R L. The s-negotition of N is the negotition N s = (N s, n s0, n sf, X s), where N s contins the toms of F s plus fresh tom n sf ; n s0 = s L ; nd For every n L F s, P L, nd r R L : { X X(n,, r) if X(n,, r) s s(n L,, r) = otherwise n sf The following proposition proves some sic properties of s-negotitions. Propositio. Let s e n tom of negotition N. If N is SDN, then N s is SDN.

14 Proof. Let n e n tom of N n. By definition, there is lsso (ρ, σ) of N, synchronized y n, such tht n ppers in σ. By the definition of N n, we hve tht σ is n occurrence sequence of N n, nd so tht n cn occur in N n. Assume now tht σ is n occurrence sequence of N n tht is not lrge step of N n nd cnnot e extended to lrge step of N n. W.l.o.g. we cn ssume tht σ does not enle ny tom of N n. Let x e the mrking reched y σ. It follows esily from the definition of N n tht there is n occurrence sequence ρσ of N. Moreover, if x e the mrking reched y this sequence, then x is the projection of x onto the set P of prties of n. By soundness there is mximl occurrence sequence ρρ such tht ρ contins only toms with prties in A \ P n. Clerly ρρ σ is n occurrence sequence of N. Let x e the mrking reched y ρρ σ. Clerly, we still hve tht x is the projection of x onto P. We clim tht x is dedlock, contrdicting the soundness of N. To prove the clim, ssume tht x enles some tom n with set of prties P. If P P t, then n is lso enled t x, contrdicting tht σ does not enle ny tom of N n. If P A \ P, then ρρ enles n, contrdicting the mximlity of ρρ. Finlly, if P P P (A \ P ), then there is n gent P such tht x () / N n. But y definition of σ we hve x () N n, contrdicting tht x is the projection onto P of x. Lemm 3. A cyclic SDN contins n tom n such tht N n is n cyclic SDN. Proof. Let N e cyclic SDN. By Lemm 3, N hs loop nd hence lso miniml loop. By Lemm 4 this loop hs synchronizer n, nd so N n is nonempty. Choose n so tht N n is nonempty, ut its numer of toms is miniml. We clim tht N n is cyclic. Assume the contrry. By Lemm 3, N n is SDN. By Lemms 3 nd 4, exctly s ove, N n contins n tom n such tht N nn is nonempty. Clerly, N nn contins fewer toms thn N n nd is isomorphic to N n. This contrdicts the minimlity of N n. The exmple on the left of Figure 3 shows tht this result does not hold for the non-deterministic cse. 5.4 The reduction procedure We cn now finlly formulte reduction procedure to summrize n ritrry SDN. Input: deterministic negotition N 0 ; 1 N result of exhustively pplying the merge rule to N 0 ; 2 while N is cyclic do 3 select s N such tht N s is cyclic; 4 pply to N the sequence of rules used to summrize N s (ut the lst); 5 pply the itertion rule to s; 6 exhustively pply the merge rule 7 pply the reduction sequence of Theorem 2

15 Theorem 3. The reduction procedure returns summry of N 0 iff N 0 is sound. Proof. By induction on the numer k of toms of N tht synchonize t lest one loop. If k = 0, then y Lemm 3 nd 4 N is cyclic, nd the result follows from Theorem 2. If k > 0, then y Lemm 6 N contins n lmost cylic frgment F s, nd so N s is cyclic. Since the sequence of rules of line 4 summrizes N s, its ppliction to N ends with negotition hving unique self-loop-outcome on s. After removing this outcome with the itertion rule in line 5, we otin SDN with k 1 synchronizers, which cn e summrized y induction hypothesis (line 6 is not necessry for completeness, ut required for the complexity result of the next section). 6 Complexity We nlyze the numer of rule pplictions required y the reduction procedure. Let N i = (N i, n 0i, n fi, X i ) e the negotition efore the i-th execution of the while oop. The next lemm collects some sic properties of the sequence N 1, N 2,.... Lemm 4. For every i 1: () N i+1 N i ; () the merge rule cnnot e pplied to N i ; nd (c) N i+1 hs fewer synchronizers thn N i. In prticulr, y (c) the while loop is executed t most N 1 = N 0 times. Proof. Prts () nd () follow immeditely from the definitions of the rules nd the reduction lgorithm. For (c), we oserve tht every synchronizer of N i+1 is synchronizer of N i, ut the tom s selected t the i-th loop execution is not synchronizer of N i+1, ecuse ll loops synchronized y s re collpsed to self-loops on s during the i-th itertion of the loop, nd then removed y the itertion rule. By Theorem 2, during the i-th itertion of the while loop line 4 requires t most N i 2 + Out(N i ) rule pplictions. Line 5 only requires one ppliction. Now, let N i e the negotition otined fter the execution of line 5. The numer of rule pplictions of line 6 is clerly ounded y the numer of outcomes of Out(N i ). For the totl numer of rule pplictions Appl(N 0) we then otin. Lemm 5. N 0 Appl(N 0 ) O( N 0 3 + N 0 Out(N i ) + Out(N i) ) i=1

16 Proof. N 0 Appl(N 0 ) ( N i 2 + Out(N i ) + 1 + Out(N i) ) i=1 N 0 ( N 0 2 + 1 + Out(N i ) + Out(N i) ) i=1 Lemm 4(c), Theorem 2 Lemm 4() O( N 0 3 + N 0 N 0 i=1 Out(N i) + Out(N i ) ) However, we cnnot yet ound Appl(N 0 ) y polynomil in N 0 nd Out(N 0 ), ecuse, in principle, the numer of outcomes of N i or N i might grow exponentilly with i. Indeed, the shortcut rule cn increse the numer of outcomes. Consider the degenerte negotition N with only one gent shown in Figure 5(). N hs one single loop, nmely (, ) (n 3, ) (n 4, ). The frgment F n1 is n 0 n 3 c n 0 3 2 1 n 3 c 5 4 3 2 n 0 n 3 c 4 2 3 n 0 n 3 c n 4 n 5 n 6 n 4 n 5 n 6 n 4 n 5 n 6 n 4 n 5 n 6 n 3 1 5 n 4 n 1 n 4 n 1 n 1 () () (c) (d) Fig. 5. Reducing n SND with one gent shown in lue, nd N n1 is shown elow N. The negotition N n1 cn e summrized y mens of three plictions of the shortcut rule, shown in the lower row of the figure. The upper row shows the result of ppliction of the sme rules to N. The first ppliction removes n 3 from N n1 ut not from N, ecuse n 3 hs more thn one input rc in N (Figure 5()). Moreover, the rule dds three

outcomes to N, shown in red. The second ppliction removes n 4 from N n1 ut not from N, nd dds two new outcomes (, 4 ) nd (, 5 ) (Figure 5(c)). The third ppliction removes n 1 from N n1 ; in N it is replced y n ppliction of the itertion rule, yielding the negotition t the top of Figure 5(d), which hs two outcomes more thn the initil one. To solve this prolem we introduce trgets nd exits. 17 6.1 Sources, trgets, nd exits Definitio6. Let N = (N, n 0, n f, X) e negotition, nd let (n, r) e n outcome. The source of (n, r) is n. The trget of (n, r) is the prtil function A N tht ssigns to every prty P n the tom X(n,, r), nd is undefined for every A \ P n. The set of trgets of N, denoted y T(N), contins the trgets of ll outcomes of N. Consider the reduction process from N i to N i+1. It proceeds y pplying to N i the sme sequence of rules tht summrizes n cyclic negotition N s. This sequence progressively reduces the frgment F s until it consists of selfloops on the tom s, which cn then e reduced y the itertion rule. However, the sequence lso produces new outcomes of s tht leve F s, nd which ecome outcomes of N i+1 not present in N i. Consider for instnce Figure 6(), which sketches n ppliction of the shorcut rule. The outcome (n, r) unconditionlly enles n, whose outcome (n, r ) mkes the left gent leve F s. The trget of (n, r f ) ssigns the gents of the negotitions to toms, nd n 3, respectively. This trget is different from the trgets of the other toms in the figure. F s F s r f r r r f r r n r n r f n 3 r f r r f r r r n r r n r f n 3 () () Fig. 6. Exits of SNDs We investigte the sources nd trgets of outcomes tht leve F s. We cll them exits of F s.

18 Definitio7. Let F s e frgment of N. An exit of F s is n outcome (n, r) Out(N) such tht n F s ut (n, r) / Out(F s ). The following lemm presents key property of the exits of frgments of SDNs: the occurrence of n exit (n, r) of F s forces ll gents of P s to leve the frgment F s. In other words: ll gents of P s re prties of n, nd the occurrence of (n, r) does not led ny gent ck to n tom of F s. Lemm 6. Let F s e frgment of SDN N, nd let (e, r e ) e n exit of F s. Then e hs the sme gents s s (i.e., e is lso synchronizer of F s ), nd X(e,, r e ) / F s for every gent of e. Proof. We proceed indirectly nd ssume tht either P e P s (P e P s y the definition of frgment) or X(e,, r e ) F s for some P e. Then t lest one gent h P s stisfies either h / P e or X(e, h, r e ) F s. We cll h home gent (intuitively, n gent tht does not leve home, i.e., F s, y the occurrence of the exit). We show tht the existence of h leds to contrdiction. We prtition the set of A of gents into internl gents, the gents of P s, nd externl gents, the gents of A \ P s. We lso prtition the set of toms: n tom is internl if it hs only internl prties, otherwise it is externl. Clerly ll toms of F s re internl, ut there cn lso e internl toms outside F s. If P s contins ll gents of the negotition, then ll gents re internl, nd so re ll toms (lso the finl tom n f ). Otherwise t lest n f hs n externl prty nd is hence n externl tom. Next we define function p: N Out(N) tht ssigns to ech tom one of its outcomes (the preferred outcome). p is defined for internl nd externl toms seprtely, i.e., it is the union of functions p i ssigning outcomes to internl toms, nd p e ssigning outcomes to externl toms. If there re externl toms, nd hence n f is externl, p e is defined s follows. First we set p e (n f ) to n ritrry outcome of n f. Then we proceed itertively: If some externl tom n hs n outcome r nd n externl gent such tht p e (X(n,, r)) is defined, then set p e (n) := r (if there re severl possiilities, we choose one of them ritrrily). At the end of the procedure p e is defined for every externl tom, ecuse ech externl tom n hs n externl gent, sy, nd, since prticiptes in n f, the grph of N hs pth of toms, ll of them with s prty, leding from n to n f. Now we define p i for internl toms. For the internl toms n not in F s we define p i (n) ritrrily. For the internl toms n F s such tht X(n,, r) = s for some gent we set p i (n) = r. For the rest of the internl toms of F s we proceed itertively. If n F s hs n outcome r nd n gent (necessrily internl) such tht p i (X(n,, r)) is defined, then we set p i (n, ) := r (if there re severl possiilities, we choose one of them). By Lemm 4(2), the grph of F s is strongly connected, nd so eventully p i is defined for ll toms of F s. Let σ e n ritrry occurrence sequence leding to mrking x s tht enles s (rememer tht N is sound). By the definition of F s, the mrking x s enles n occurrence sequence σ e tht strts with n occurrence of s, contins

19 only toms of F s, nd ends with n occurrence of (e, r e ), the considered exit of F s. We now define mximl occurrence sequence τ enled t x s. We strt with τ := ɛ nd while τ enles some tom proceed itertively s follows: If τ enles σ e, then τ := τσ e, i.e., we extend the current sequence with σ e. Otherwise, choose ny enled tom n, nd set τ := τ(n, p(n)), i.e., we extend the current sequence with (n, p(n). We first show tht τ is infinite, i.e., tht we never exit the while loop. By soundness, there is lwys n enled tom s long s the finl mrking is not reched, i.e., s long s t lest one gent is redy to engge in n tom. So it suffices to show tht this is the cse. We prove tht the home gent h is redy to engge in n tom fter the occurrence of n ritrry finite prefix of τ. This result follows from the following clim. Clim. If x s τ x for some prefix τ of τ then x (h) F s, i.e., the home gent h only prticiptes in toms of the frgment nd is lwys only redy to prticipte in toms of the frgment. Proof of clim. The proof follows the itertive construction of τ. We strt t mrking x s, nd we hve x s (h) = s ecuse h is prty of s nd x s enles s. Whenever σ e or prefix of σ e occurs, the property is preserved, ecuse first, X(n, h, r) F s holds for ll outcomes (n, r) of σ e except the lst one (this holds for ll prties of n); nd second, for the lst outcome, which is (e, r e ), h is either not prty of e whence the mrking of h does not chnge, or X(e, h, r e ) F s y definition of h. Whenever n outcome (n, p(n)) occurs, either h is not prty of n, nd then the mrking of h does not chnge, or h is prty of n, nd n is n tom of F s. By construction of p (ctully, of p i ), the property is preserved, which finishes the proof of the clim. Let us now investigte the occurrences of externl nd internl toms in τ. Let G E e the grph with the externl toms s nodes nd n edge from n to n if p e (n) = n. By the definition of p e, the grph G E is cyclic with n f s sink. By the definition of τ, fter n externl tom n occurs in τ, none of its predecessors in G E cn occur in τ. So τ contins only finitely mny occurrences of externl toms. Since τ is infinite, it therefore hs n infinite suffix τ in which only internl toms occur. Since s is synchronizer with miniml set of prties, every internl gent prticiptes in infinitely mny outcomes of τ, in prticulr the home gent h. By the clim, τ contins infinitely mny occurrences of toms of F s. Now let G s e the grph with the toms of F s s nodes, nd n edge from n to n if p i (n) = n. By the definition of p i, every cycle of the grph G s goes through the synchronizer s. So τ contins infinitely mny occurrences of s. Whenever s is enled, σ e is enled, too, nd ctully occurs y the definition of τ. Since

20 σ e ends with the outcome (e, r e ), τ lso contins infinitely mny occurrences of (e, r e ). Since negotitions hve finitely mny rechle mrkings, τ contins loop synchronized y s (y minimlity of the synchronizer) nd contining (e, r e ). However, y the definition of frgment this implies tht this loop nd thus (e, r e ) elongs to F s s well, contrdicting tht (e, r e ) is n exit of F s. In prticulr, the sitution of Figure 6() cnnot occur, nd so in SDNs the correct picture for the ppliction of the shorcut rule to exits is the one of Figure 6(): the exit n hs the sme gents s the synchronizer s. Moreover, the new trget of (s, r f ) equls the lredy existing trget of (n, r ). So Lemm 7 leds to the following ound on the numer of trgets of N i : Lemm 7. For every 1 i N 0 : T(N i ) T(N 0 ). Proof. It suffices to prove T(N i+1 ) T(N i ) for i < N 0. Let (n, r) e n ritrry outcome of N i+1. We show tht there exists n outcome (n, r ) of N i such tht (n, r) nd (n, r ) hve the sme trgets. If (n, r) is lso n outcome of N i, then we re done. So ssume this is not the cse. Then (n, r) is generted y prticulr ppliction of the shortcut rule during the reduction process leding from N i to N i+1. Let N nd N e the negotitions right efore nd fter this ppliction of the rule. N contins frgment F s otined y pplying to F s the sme sequence of rules leding from N i to N. Similrly, N contins frgment F s. By the definition of the shortcut rule, N hs n outcome (, r 1 ) such tht is n tom of F s nd (, r 1 ) unconditionlly enles nother tom of F s. Moreover, (n, r) is the shortcut of (, r 1 ) nd (, r 2 ), i.e., (n, r) is otined from cluse (2) in Definitio0. We prove the following three clims: (1) (, r 1 ) is n outcome of F s, i.e., X(,, r 1 ) F s for every prty of. Assume the contrry. Then, since F s, (, r 1 ) is n exit of F s, y Lemm 7 we hve X(,, r 1 ) / F s for every prty of, contrdicting tht (, r 1 ) unconditionlly enles n tom of F s. (2) (, r 2 ) is n exit of F s. Assume the contrry, i.e., (, r 2 ) F s. By (1), oth (, r 1 ) nd (, r 2 ) re outcomes of F s, nd so (n, r) is n outcome of F s. But then, since F s is completely reduced y the reductions leding from N to N i+1, the outcome (n, r) is removed y some rule in the reduction pth etween N nd N i+1, contrdicting our ssumption tht (n, r) is n outcome of N i+1. (3) (n, r) nd (, r 2 ) hve the sme trget. By (2) nd Lemm 7, hs exctly the sme prties s the synchronizer s. Since (, r 1 ) unconditionlly enles, the sme holds for. So we hve P n1 = P n2 = P s nd X(,, r 1 ) = for every P n2. By the definition of the shortcut rule, X(n,, r) = X(,, r 2 ) for every P n2, nd we re done. To finlly prove tht (n, r) hs the sme trget s some outcome of N i we proceed y induction on the numer k of times the shortcut rule hs een pplied

21 etween N i nd N. If k = 0, then (, r 2 ) is n outcome of N i, nd y (3) we re done. If k > 0, then either (, r 2 ) is n outcome of N i, nd y (3) we re done, or it is produced y former ppliction of the shortcut rule. In this cse, y induction hypothesis, (, r 2 ) hs the sme trget in N i nd therefore, y (3), so hs (n, r). We use this lemm to ound Out(N i ). Lemm 8. For every 1 i N 0 : Out(N i ) O( N 0 2 Out(N 0 ) ). Proof. We first give n upper ound for Out(N i ). Since the merge rule cnnot e pplied to N i, no two outcomes of N i hve the sme source nd the sme trget, nd so Out(N i ) N i T(N i ). By Lemm 8, Out(N i ) N 0 Out(N 0 ). Now we consider Out(N i ). Ech outcome of Out(N i ) \ Out(N i) hs some tom of F s s source, nd is generted y some exit of F s. So the numer of such outcomes is t most the product of the numers of nodes of F s nd the numer of exits of F s. Since these numers re ounded y N i nd Out(N i ), respectively, we get Out(N i ) Out(N i) + N i Out(N i ). The result now follows from Out(N i ) N 0 Out(N 0 ) nd Lemm 4(). Finlly, comining Lemm 5 nd Lemm 8 we get Theorem 4. Let N 0 e n SDN. Then Appl(N 0 ) O( N 0 4 Out(N 0 ) ). We conjecture tht more detiled complexity nlysis cn improve this ound to t lest O( N 0 3 Out(N 0 )), ut this is eyond the scope of this pper. 7 Conclusions We hve continued the nlysis of negotitions strted in [7]. We hve provided set of three reduction rules tht cn summrize ll nd only the sound deterministic negotitions. Moreover, the numer of rule pplictions is polynomil in teh size of the negotition. The completeness nd polynomility proofs turned out to e quite involved. At the sme time, we think they provide interesting insights. In prticulr, the completeness proofs shows how in deterministic negotitions soundness requires to synchronize ll gents t lest once in every loop. It lso shows tht, intuitively, loops must e properly nested. Intuitively, sound deterministic negotitions re necessrily well structured, in the sense of structured progrmming. Our rules generlize the rules used to trnsform finite utomt into regulr expressions y eliminting sttes [13]. Indeed, deterministic negotitions cn e seen s clss of communicting deterministic utomt, nd thus our result ecomes generliztion of Kleene s theorem to concurrency model. In future work we pln to investigte the connection to other concurrent Kleene theorems in the literture like e.g. [8, 9].

22 References 1. W. M. P. vn der Alst. The ppliction of Petri nets to workflow mngement. J. Circuits, Syst. nd Comput., 08():21 66, 1998. 2. W. M. P. vn der Alst, K. M. vn Hee, A. H. M. ter Hofstede, N. Sidorov, H. M. W. Vereek, M. Voorhoeve, nd M. T. Wynn. Soundness of workflow nets: clssifiction, decidility, nd nlysis. Forml Asp. Comput., 23(3):333 363, 21. 3. T. Atdelzter, E. M. Atkins, nd K. G. Shin. Qos negotition in rel-time systems nd its ppliction to utomted flight control. Computers, IEEE Trnsctions on, 49(11):1170 1183, 2000. 4. G. Berthelot. Trnsformtions nd decompositions of nets. In W. Bruer, W. Reisig, nd G. Rozenerg, editors, Advnces in Petri Nets, volume 254 of LNCS, pges 359 376. Springer, 1986. 5. R. Dvis nd R. G. Smith. Negotition s metphor for distriuted prolem solving. Artificil intelligence, 20(1):63 109, 1983. 6. J. Desel nd J. Esprz. Free choice Petri nets. Cmridge University Press, New York, NY, USA, 1995. 7. J. Esprz nd J. Desel. On negotition s concurrency primitive. In P. R. D Argenio nd H. C. Melgrtti, editors, CONCUR, volume 8052 of Lecture Notes in Computer Science, pges 440 454. Springer, 23. ISBN 978-3-642-483-1. Extended version in rxiv:1307.2145. 8. P. Gstin, A. Petit, nd W. Zielonk. A kleene theorem for infinite trce lnguges. In J. L. Alert, B. Monien, nd M. Rodríguez-Artlejo, editors, ICALP, volume 510 of Lecture Notes in Computer Science, pges 254 266. Springer, 1991. ISBN 3-540-54233-7. 9. B. Genest, A. Muscholl, nd D. Kuske. A kleene theorem for clss of communicting utomt with effective lgorithms. In C. Clude, E. Clude, nd M. J. Dinneen, editors, Developments in Lnguge Theory, volume 3340 of Lecture Notes in Computer Science, pges 30 48. Springer, 2004. ISBN 3-540-244-4. 10. H. J. Genrich nd P. S. Thigrjn. A theory of ipolr synchroniztion schemes. Theor. Comput. Sci., 30:241 318, 1984. 11. S. Hddd. A reduction theory for coloured nets. In G. Rozenerg, editor, Advnces in Petri Nets, volume 424 of LNCS, pges 209 235. Springer, 1988. 12. S. Hddd nd J.-F. Prdt-Peyre. New efficient Petri nets reductions for prllel progrms verifiction. Prllel Processing Letters, 16(1):1 116, 2006. 13. J. E. Hopcroft, R. Motwni, nd J. D. Ullmn. Introduction to Automt Theory, Lnguges, nd Computtion (3rd Edition). Addison-Wesley Longmn Pulishing Co., Inc., Boston, MA, USA, 2006. 14. N. R. Jennings, P. Frtin, A. R. Lomuscio, S. Prsons, M. J. Wooldridge, nd C. Sierr. Automted negotition: prospects, methods nd chllenges. Group Decision nd Negotition, 10(2):199 215, 20. 15. W. H. Winsorough, K. E. Semons, nd V. E. Jones. Automted trust negotition. In DARPA Informtion Survivility Conference nd Exposition, 2000. DISCEX 00. Proceedings, volume 1, pges 88 102. IEEE, 2000. Appendix 7.1 Proofs of Section 5.1 Lemm 3. (1) Every cyclic SDN hs loop.

23 (2) The set of toms of miniml loop genertes strongly connected sugrph of the grph of the considered negotition. Proof. (1) Let π e cycle of the grph of the negotition N. Let e n ritrry tom occurring in π, nd let e its successor in π. n f ecuse n f hs no successor, nd hence no cycle contins n f. By soundness some rechle mrking x 1 enles. For t lest one gent nd one result r, X(,, r) contins, nd y determinism it contins (,r) only. Let x 1 x 1. Agin y soundness, there is n occurrence sequence from x 1 tht leds to the finl mrking. This sequence hs to contin n occurrence of ecuse this is the only tom gent is redy to engge in. In prticulr, some prefix of this sequence leds to mrking x 2 tht enles. Repeting this rgument ritrrily for the nodes,, n 3,..., n k = of the cycle π, we conclude tht there is n infinite occurrence sequence, contining infinitely mny occurrences of toms of the cycle π. Since the set of rechle mrkings is finite, this sequence contins loop. (2) For ech gent involved in ny tom of the loop, consider the sequence of toms it is involved in. By definition of the grph of the negotition, this sequence is pth. It is moreover (not necessrily simple) cycle, ecuse loop strts nd ends with the sme mrking. So the generted sugrph is covered y cycles. It is moreover strongly connected ecuse, for ech connected component, the projection of the outcomes of the loop to those with toms in this component is smller loop, ginst minimlity of the loop. 7.2 Proofs of Section 5.2 Lemm 4. Every miniml loop of SDN is synchronized. Proof. Let σ e miniml loop, enled t rechle mrking x. Define N σ s the set of toms tht occur in σ nd A σ s the set of gents involved in toms of N σ. Since N is sound, there is n occurrence sequence σ f enled y x tht ends with the finl tom n f. Now choose n gent â of A σ such tht x(â) N σ. In σ f, eventully â is involved in n f, nd it is first involved in n tom of N σ. Using σ f, we construct pth π of the grph of N s follows: We egin this pth with the lst tom n N σ tht ppers in σ f nd involves gent â. We cll this tom n π. Then we repetedly choose the lst tom in σ f tht involves â nd moreover is successor of the lst vertex of the pth constructed so fr. By construction, this pth hs no cycles (i.e., ll vertices re distinct), strts with n tom of N σ nd hs not further toms of N σ, ends with n f, nd only contins toms involving â. Since x enles the loop σ nd since n π N σ, fter some prefix of σ mrking x π is reched which enles n π. The loop σ continues with some outcome (n π, r 1 ), where r 1 is one possile result of n π.