Negotiation Programs



Similar documents
Periodic Review Probabilistic Multi-Item Inventory System with Zero Lead Time under Constraints and Varying Order Cost

Two degree of freedom systems. Equations of motion for forced vibration Free vibration analysis of an undamped system

Understanding Financial Management: A Practical Guide Guideline Answers to the Concept Check Questions

In nite Sequences. Dr. Philippe B. Laval Kennesaw State University. October 9, 2008

The dinner table problem: the rectangular case

Discrete Mathematics and Probability Theory Spring 2014 Anant Sahai Note 13

On the Optimality and Interconnection of Valiant Load-Balancing Networks

Money Math for Teens. Introduction to Earning Interest: 11th and 12th Grades Version

Infinite Sequences and Series

Soving Recurrence Relations

SECTION 1.5 : SUMMATION NOTATION + WORK WITH SEQUENCES

Annuities and loan. repayments. Syllabus reference Financial mathematics 5 Annuities and loan. repayments

5 Boolean Decision Trees (February 11)

SAMPLE QUESTIONS FOR FINAL EXAM. (1) (2) (3) (4) Find the following using the definition of the Riemann integral: (2x + 1)dx

THE ABRACADABRA PROBLEM

Asymptotic Growth of Functions

Learning Objectives. Chapter 2 Pricing of Bonds. Future Value (FV)

OPTIMALLY EFFICIENT MULTI AUTHORITY SECRET BALLOT E-ELECTION SCHEME

Logistic Regression, AdaBoost and Bregman Distances

Hypothesis testing. Null and alternative hypotheses

Maximum Entropy, Parallel Computation and Lotteries

Lecture 5: Span, linear independence, bases, and dimension

MARTINGALES AND A BASIC APPLICATION

I. Chi-squared Distributions

Derivation of Annuity and Perpetuity Formulae. A. Present Value of an Annuity (Deferred Payment or Ordinary Annuity)

Network Theorems - J. R. Lucas. Z(jω) = jω L

Lesson 15 ANOVA (analysis of variance)

THE PRINCIPLE OF THE ACTIVE JMC SCATTERER. Seppo Uosukainen

Notes on exponential generating functions and structures.

A probabilistic proof of a binomial identity

1. MATHEMATICAL INDUCTION

Finance Practice Problems

Week 3-4: Permutations and Combinations

Week 3 Conditional probabilities, Bayes formula, WEEK 3 page 1 Expected value of a random variable

Your organization has a Class B IP address of Before you implement subnetting, the Network ID and Host ID are divided as follows:

Department of Computer Science, University of Otago

Convexity, Inequalities, and Norms

Properties of MLE: consistency, asymptotic normality. Fisher information.

UNIT CIRCLE TRIGONOMETRY

Semipartial (Part) and Partial Correlation

Running Time ( 3.1) Analysis of Algorithms. Experimental Studies ( 3.1.1) Limitations of Experiments. Pseudocode ( 3.1.2) Theoretical Analysis

The Binomial Distribution

3 Basic Definitions of Probability Theory

where: T = number of years of cash flow in investment's life n = the year in which the cash flow X n i = IRR = the internal rate of return

Taking DCOP to the Real World: Efficient Complete Solutions for Distributed Multi-Event Scheduling

Notes on Power System Load Flow Analysis using an Excel Workbook

ANNUITIES SOFTWARE ASSIGNMENT TABLE OF CONTENTS... 1 ANNUITIES SOFTWARE ASSIGNMENT... 2 WHAT IS AN ANNUITY?... 2 EXAMPLE QUESTIONS...

Chapter 5: Inner Product Spaces

Over-encryption: Management of Access Control Evolution on Outsourced Data

Chapter 6: Variance, the law of large numbers and the Monte-Carlo method

Course Notes: Nonlinear Dynamics and Hodgkin-Huxley Equations

Symmetric polynomials and partitions Eugene Mukhin

Incremental calculation of weighted mean and variance

2 r2 θ = r2 t. (3.59) The equal area law is the statement that the term in parentheses,

Example 2 Find the square root of 0. The only square root of 0 is 0 (since 0 is not positive or negative, so those choices don t exist here).

1 Computing the Standard Deviation of Sample Means

Analysis Notes (only a draft, and the first one!)

Cooley-Tukey. Tukey FFT Algorithms. FFT Algorithms. Cooley

Chapter 3 Savings, Present Value and Ricardian Equivalence

*The most important feature of MRP as compared with ordinary inventory control analysis is its time phasing feature.

The Binomial Multi- Section Transformer

CHAPTER 3 THE TIME VALUE OF MONEY

Lecture 4: Cauchy sequences, Bolzano-Weierstrass, and the Squeeze theorem

Top K Nearest Keyword Search on Large Graphs

PROCEEDINGS OF THE YEREVAN STATE UNIVERSITY AN ALTERNATIVE MODEL FOR BONUS-MALUS SYSTEM

CS103X: Discrete Structures Homework 4 Solutions

Sequences and Series

STUDENT RESPONSE TO ANNUITY FORMULA DERIVATION

MULTIPLE SOLUTIONS OF THE PRESCRIBED MEAN CURVATURE EQUATION

Our aim is to show that under reasonable assumptions a given 2π-periodic function f can be represented as convergent series

THE ARITHMETIC OF INTEGERS. - multiplication, exponentiation, division, addition, and subtraction

Figure 2. So it is very likely that the Babylonians attributed 60 units to each side of the hexagon. Its resulting perimeter would then be 360!

An Introduction to Omega

CS103A Handout 23 Winter 2002 February 22, 2002 Solving Recurrence Relations

Class Meeting # 16: The Fourier Transform on R n

Chapter 7 Methods of Finding Estimators

Mechanics 1: Motion in a Central Force Field

Estimating Surface Normals in Noisy Point Cloud Data

Vladimir N. Burkov, Dmitri A. Novikov MODELS AND METHODS OF MULTIPROJECTS MANAGEMENT

CME 302: NUMERICAL LINEAR ALGEBRA FALL 2005/06 LECTURE 8

Here are a couple of warnings to my students who may be here to get a copy of what happened on a day that you missed.

3. Greatest Common Divisor - Least Common Multiple

Entropy of bi-capacities

The Stable Marriage Problem

THE REGRESSION MODEL IN MATRIX FORM. For simple linear regression, meaning one predictor, the model is. for i = 1, 2, 3,, n

How To Write A Theory Of The Concept Of The Mind In A Quey

Theorems About Power Series

Basic Elements of Arithmetic Sequences and Series

Hybrid Logics and NP Graph Properties

Trigonometric Form of a Complex Number. The Complex Plane. axis. ( 2, 1) or 2 i FIGURE The absolute value of the complex number z a bi is

Lesson 17 Pearson s Correlation Coefficient

SEQUENCES AND SERIES

Transcription:

Negotiatio Pogams Javie Espaza 1 ad Jög Desel 2 1 Fakultät fü Ifomatik, Techische Uivesität Müche, Gemay espaza@tum.de 2 Fakultät fü Mathematik ud Ifomatik, FeUivesität i Hage, Gemay joeg.desel@feui-hage.de Abstact. We itoduce a global specificatio laguage fo distibuted egotiatios, a ecetly itoduced cocuet computatio model with atomic egotiatios combiig sychoizatio of paticipats ad choice as pimitive. A toke game o distibuted egotiatios detemies eachable makigs which eable possible ext atomic egotiatios. I a detemiistic distibuted egotiatio, each paticipat ca always be egaged i at most oe ext atomic egotiatio. I a soud distibuted egotiatio, evey atomic egotiatio is eabled at some eachable makig, ad fom evey eachable makig the fial makig of the distibuted egotiatio ca be eached. We pove that ou specificatio laguage has the same expessive powe as soud ad detemiistic egotiatios, i.e., evey pogam ca be implemeted by a equivalet soud ad detemiistic egotiatio ad evey soud ad detemiistic egotiatio ca be specified by a equivalet pogam, whee a pogam ad a egotiatio ae equivalet if they have the same Mazukiewicz taces ad thus the same cocuet us. The taslatios betwee egotiatios ad pogams equie oly liea time. 1 Itoductio Multi-paty egotiatio as a cocuet computatio model has bee ecetly itoduced i [1, 2] as a fomalizatio of the egotiatio paadigm give e.g. i [3, 4]. I this model, distibuted egotiatios ae descibed by combiig atomic egotiatios, called atoms. Each atom has a umbe of paties (the set of agets ivolved i it), ad a set of possible outcomes. The paties of a atom agee o a outcome, which tasfoms the iteal state of the paties, ad detemies the atoms each paty is eady to egage i ext. If each aget is always willig to egage i at most oe atom, the egotiatio is called detemiistic. Fo a example, coside the left pat of Figue 1, which shows a detemiistic egotiatio with agets 1 to 4. Atoms ae epeseted by black bas with white cicles (pots) fo the espective paticipatig agets. Iitially all agets ae eady to egage i the iitial atom 0, whee they decide whethe to stat discussig a poposal (outcome y(es)) o ot ((o)). If the agets agee o, the the egotiatio temiates with the fial atom f. If they agee o y, the the agets build two teams to study ad modify the poposal i paallel: agets 1 ad 2 move to atom 1, ad agets 3 ad 4 to 2. Afte 1 ad 2, the

2 1 2 0 3 4 y y y y 1 y y 2 0 0 3 0 y y 4 0 1 1 2 3 2 4 1 1 2 2 p p p p p p p p 1 2 3 4 3 a a a a f 1 2 3 4 3 3 a a a a f 3 f f 3 f Fig. 1. Two egotiatios betwee fou agets. fou agets decide i 3 whethe to accept (outcome a) o eject () the evised poposal; i case of ejectio, the two teams wok agai o evisios. Negotiatios ca deadlock. Fo istace, if, i ou example, the -ac fom pot 2 of atom 3 would lead to f athe tha to 1, the the egotiatio eaches a deadlock afte the executio of y p p p. Loosely speakig, a egotiatio is soud if each atom ca be executed i some eachable state ad, whateve its cuet state, it ca always fiish, i.e., execute the fial atom. I paticula, soudess implies deadlock-feedom. I this pape we ivestigate egotiatios fom a pogammig laguage poit of view. Negotiatios ca be see as cocuet compositios of flowchats, oe fo each aget. Fo example, the egotiatio o the left of Figue 1 is the compositio of the fou flowchats show o the ight. So, just as flowchats (o if-goto pogams) model ustuctued sequetial pogams, egotiatios model ustuctued cocuet pogams. The Böhm-Jacopii theoem, ofte called the Stuctue Theoem [5] 3, states that evey flowchat has a equivalet stuctued pogam [5 7]. This aises the questio we ivestigate i the pape: Is thee a Stuctue Theoem fo egotiatios simila to the Böhm-Jacopii theoem fo sequetial computatio? We give a positive aswe fo detemiistic egotiatios with a supisig twist: We exhibit a pogammig laguage with the same expessive powe as soud detemiistic egotiatios. I othe wods, evey sytactically coect pogam is guaateed by costuctio to be soud, ad fo evey soud detemiistic egotiatio thee is a equivalet pogam exhibitig the same degee of cocuecy. A simila questio has fequetly bee studied fo pocess models give as Peti ets o BPMN-diagams, elatig these models to pogams i some executio laguage such as BPEL. I this settig, by ow oly patial solutios have bee obtaied. Fo example, [8] shows how to fid so-called blocks i diagams, each coespodig to a XOR-split/XOR-joicouple o to a AND-split/AND-joi-couple. Pocess models with ested blocks ae always soud ad ca easily be taslated i a pogammig laguage, but ot all soud pocess models have ested blocks. A example pogam of ou laguage is give i Figue 2. This pogam is equivalet to the egotiatio of Figue 1. The fist two lies of the pogam 3 See [6], which covicigly agues that it should be cosideed a folk theoem.

3 aget a 1, a 2, a 3, a 4 outcome y,, a, : {a 1,..., a 4}; p : {a 1, a 2}; p : {a 3, a 4} do [] y : (p p ) do [] a: ed [] : (p p ) loop od ed [] : ed od Fig. 2. Pogam equivalet to the egotiatio of Figue 1 specify the agets of the system, ad, fo each outcome, the set of agets that have to agee to choose the outcome. The oute do od block coespods to the atom 0. The block offes a choice betwee outcomes y ad ; i the laguage, outcomes ae pefixed by the [] opeato. Afte outcome y, the two outcomes p ad p ca be take cocuetly (actually, p is hee a abbeviatio of do p: ed od, a block with oly oe possible outcome). The opeato is the laye compositio opeato of Zwies [9]. I evey executio of P 1 P 2, all actios of P 1 i which a aget a paticipates take place befoe all actios of P 2 i which a paticipates. If the sets of agets ivolved i P 1 ad P 2 ae disjoit, the P 1 ad P 2 ca be executed cocuetly, ad i this case we wite P 1 P 2 (ou laguage has oly laye compositio as pimitive, ad cocuet compositio is just a special case). Fially, the block do [] a: ed [] : (p p ) loop od offes a choice betwee two alteatives, coespodig to the outcomes a ad. The alteatives ae labeled with the keywods ed ad loop espectively, which idicate what happes afte the chose alteative has bee executed: i the case of a loop, the block estats, ad fo a ed it temiates. While we have peseted both egotiatios ad egotiatio pogams as dataless computatioal models, data ca easily be added to both. I fact, i [1, 2] each aget is assumed to have a iteal state (which ca be give by the valuatio of a set of local vaiables), ad a outcome of a atom with a set X of agets is assiged a state tasfome elatio which oly applies to the iteal states of the ivolved agets. Fo pogams, we ca assig to each aget a set of local vaiables, ad to each outcome of a atom a guaded commad ove (a subset of) the local vaiables of the paticipatig agets of the atom. Fo istace, assume that the pupose of the egotiatio of Figue 1 is to fix a pice. Aget a i stoes his cuet poposal fo the pice i a local vaiable x i (1 i 4). The outcome (o eed to egotiate) is assiged the guad x 1 = x 2 = x 3 = x 4, while y is assiged its egatio. The outcome p is assiged a commad x 1, x 2 := f(x 1, x 2 ), whee f epesets a (possibly odetemiistic) fuctio that etus a ageed pice betwee agets a 1 ad a 2. We poceed similaly with p ad a fuctio g. If the two poposed pices agee, the pogam temiates. Othewise, a ew pice is egotiated by meas of a thid fuctio h, ad set to the fou agets. Figue 3 shows a cocete egotiatio pogam with data which coespods to the abstact pogam of Figue 2. The i-th aget stoes its cuet pice i a vaiable x i. If the pices ae iitially diffeet, the agets 1 ad 2 ad agets 3 ad 4 build two teams ad come up with ew suggestios fo the pice, a

4 aget a 1 va x 1 :it... aget a 4 va x 4 :it 1 do [] (x 1 = x 2 = x 3 = x 4) : 2 {x 1, x 2 := f(x 1, x 2) x 3, x 4 := g(x 3, x 4)} 3 do [] (x 2 = x 3): ed 4 [] (x 2 x 3): 5 x 2, x 3 = h(x 2, x 3) 6 {x 1, x 2 := f(x 1, x 2) x 3, x 4 := g(x 3, x 4)} 7 ed 8 od loop 9 [] (x 1 = x 2 = x 3 = x 4) : ed 10 od Fig. 3. A cocete pogam coespodig to the abstact pogam of Figue 2 pocess ecapsulated i the fuctios f ad g. The ew suggestios ae stoed i x 2 ad x 3. If x 2 ad x 3 ae ot equal, the agets 2 ad 3 come up with a ew suggestio (fuctio h), which is the set agai to the two teams. Notice that, accodig to the above ecusive pocedue, the set of agets executig the guads (x 2 = x 3 ) ad (x 2 x 3 ) must be equal, ad this set must be a supeset of the set of agets executig lies 5 ad 6. Sice all vaiables appea i these lies, all agets must paticipate i the executio of the guads. If oly agets a 2 ad a 3 execute the guads, the the pogam may deadlock, because afte lie 2, pocess 1 does ot kow whethe it has to execute lie 6 o fiish. The pape is stuctued as follows. I the followig sectio, we ecall defiitios ad otatios fo egotiatios. Sectio 3 itoduces egotiatio pogams fomally. I Sectio 4, we show how to deive a egotiatio fom a pogam. Sectio 5 is devoted to the covese diectio, which is based o a techical esult give i Sectio 6. Ou esult ca be viewed as a solutio to the ealizability poblem, as posed fo othe models, which will be discussed i Sectio 7. 2 Negotiatios: Sytax ad Sematics We ecall the mai defiitios of [1] fo sytax ad sematics of egotiatios. Howeve, hee we do ot coside states of agets ad thei tasfomatios. Thoughout the pape, we fix a fiite set A of agets epesetig potetial paties of egotiatios. Defiitio 1. A egotiatio atom, o just a atom, is a pai = (P, R ), whee P is a oempty set of paties (paticipats) ad R is a fiite, oempty set of esults. Fo each esult, the pai (, ), also deoted by, is the outcome of.

5 A egotiatio is a compositio of atoms. We add a tasitio fuctio X that assigs to each tiple (, a, ) cosistig of a atom, a paty a of, ad a esult of a set X(, a, ) of atoms, the set of atomic egotiatios aget a is eady to egage i afte the atom, if the esult of is. Defiitio 2. Give a fiite set of atoms N, let T (N) deote the set of tiples (, a, ) such that N, a P, ad R. A egotiatio is a tuple N = (N, 0, f, X), whee 0, f N ae the iitial ad fial atoms, ad X: T (N) 2 N is the tasitio fuctio, such that (1) evey aget of A paticipates i both 0 ad f ; (2) fo evey (, a, ) T (N): X(, a, ) = iff = f. The egotiatio N is detemiistic if X(, a, ) = 1 fo each (, a, ) T (N) satisfyig f. We wite X(, a, ) = istead of X(, a, ) = { }. I this pape we coside oly detemiistic egotiatios. I the gaphical epesetatio of a detemiistic egotiatio, a ac fom the pot of aget a i atom, labeled by, leads to the pot of a i the uique atom of X(, a, ). I the egotiatio of Figue 1, the atom 0 has possible esults y ad while 1 oly has the esult p. By defiitio, the fial atom f has esults, too. Sice afte each outcome ( f, e) o aget is eady to egage i ay atom, these esults ae ot epeseted i the figue. Wheeve we choose disjoit ames fo esults, as we did i this example, we do ot have to distiguish esults ad outcomes. A makig of a egotiatio N = (N, 0, f, X) is a mappig x: A 2 N. Ituitively, x(a) is the set of atoms that aget a is cuetly eady to egage i ext. The iitial ad fial makigs, deoted by x 0 ad x f espectively, ae give by x 0 (a) = { 0 } ad x f (a) = fo evey a A. A makig x eables a atom if x(a) fo evey a P. If x eables, the ca take place ad its paties agee o a esult ; we say that the outcome (, ) occus. The occuece of (, ) poduces a ext makig x give by x (a) = X(, a, ) fo evey a P, ad x (a) = x(a) fo evey a A \ P. (,) We wite x x to deote this, ad call it a small step. By this defiitio, always eithe x(a) = { 0 } o x(a) = X(, a, ) fo some atom ad outcome. Theefoe, fo detemiistic egotiatios, x(a) always cotais at most oe atom. σ We wite x 1 to deote that thee is a sequece σ = ( 1, 1 )... ( k, k )... ( of small steps such that 1, 1 ) ( 2, 2 ) ( x 1 x 2 k, k ) x k+1 We call σ occuece sequece fom the makig x 1, o eabled by x 1. If σ is fiite the we σ wite x 1 x k+1 ad call x k+1 eachable fom x 1. If x 1 is the iitial makig, the we call σ iitial occuece sequece. If moeove x k+1 is the fial makig, the σ is a lage step. The makig x f ca oly be eached by the occuece of ( f, e) (e beig a possible esult of f ), ad it does ot eable ay atom. Ay othe makig that does ot eable ay atom is cosideed a deadlock. We epeset a makig x of the egotiatio of Figue 1 by the vecto (x(1), x(2), x(3), x(4)). With this otatio, oe of the occuece sequeces is: ( 0, 0, 0, 0) ( 3, 3, 3, 3) y ( 1, 1, 2, 2) a ( f, f, f, f ) p ( 3, 3, 2, 2) e (,,, ) p

6 Followig [10, 11], we itoduce a otio of well-behavedess of egotiatios: Defiitio 3. A egotiatio is soud if (a) evey atom is eabled at some eachable makig, ad (b) evey iitial occuece sequece is eithe a lage step o ca be exteded to a lage step. Soud egotiatios ae ecessaily deadlock-fee. A soud egotiatio also has o livelocks, i.e., it caot each a behaviou fom which it is impossible to each the the fial makig. Howeve, soud egotiatios may ot temiate. I the est of this pape, we ofte coside the set of all soud ad detemiistic egotiatios. We itoduce the abbeviatio SDN fo the elemets of this set. Two distict atoms which ae both eabled at a eachable makig ae cocuetly eabled. Hece two possible ext outcomes ( 1, 1 ) ad ( 2, 2 ) ae cocuet if 1 2, ad they ae alteative if 1 = 2 ad 1 2. I a occuece sequece, cocuetly occuig outcomes ae odeed abitaily. Covesely, two subsequet outcomes i a occuece sequece occu cocuetly if ad oly if the sets of agets paticipatig i the espective atoms ae disjoit. This fact is utilized by the cocuet sematics of egotiatios, the Mazukiewicz tace sematics. A Mazukiewicz tace laguage [12] is based o a fiite alphabet Σ (of evets) ad a depedece elatio D Σ Σ which is eflexive ad symmetic. The idepedece elatio I = (Σ Σ) \ D is symmetic ad ieflexive. Two subsequet idepedet evets of a sequetial obsevatio of a cocuet u ca be itechaged, ad the esultig sequece is a obsevatio of the same u, wheeas the ode of two subsequet depedet evets mattes. Give ay fiite sequece σ of evets ove Σ, [σ] deotes the least set of sequeces which cotais σ ad is closed ude pemutatio of subsequet idepedet evets (i.e., if σ 1 a b σ 2 [σ] ad (a, b) I the σ 1 b a σ 2 [σ]). Each such [σ] is called a tace, ad each set of taces is a tace laguage. Fomally, a tace laguage is defied o a distibuted alphabet (Σ, I), whee Σ is a alphabet ad I Σ Σ is a idepedece elatio. Taces ca be composed i a atual way: fo σ 1, σ 2 Σ, [σ 1 ] [σ 2 ] := [σ 1 σ 2 ] (it is easy to see that this is well-defied, i.e., fo [σ 1] = [σ 1 ] ad [σ 2] = [σ 2 ] we have [σ 1 σ 2 ] = [σ 1 σ 2]). Similaly, we defie compositio of tace laguages: if A ad B ae sets of taces, the A B := {a b a A, b B}. The Kleee sta applied to a tace, [σ], deotes the laguages of all [σ] i, fo i = 0, 1, 2,.... Similaly, fo a tace laguage A, A is the uio of all A i. Defiitio 4. Let N be a egotiatio ad let Σ be the set of all outcomes of N. Defie the idepedece elatio I by (( 1, 1 ), ( 2, 2 )) I if P 1 P 2 = (i.e., 1 ad 2 ae idepedet if they have disjoit sets of agets). The set of taces of N, deoted by T (N), is the set of taces ove (Σ, I) give by T (N) = {[σ] σ is a lage step of N}. The outcomes ( 1, p) ad ( 2, p ) of the egotiatios of Figue 1 ae idepedet. The set of taces is the set {[σ] σ ( + y p p ( p p ) a)} (we abbeviate a outcome (, ) to the esult ). Fo istace, we have [y p p p p a] = {y p p p p a, y p p p p a, y p p p p a, y p p p p a}.

7 0 st B b a 3 1 b b st a a 2 0 B a a a 4 f f Fig. 4. Boxes. It is coveiet to assume that the iitial ad fial atoms of a egotiatio ae distict ad have oe sigle esult each, fo which we use the symbols st ad ed, espectively. We will moeove equie that o pot of the iitial atom has a igoig ac. If the iitial atom 0 does ot satisfy this, the we add a ew iitial atom 0 with a sigle esult st ad set X( 0, a, st) = 0 fo each aget a. Fo the fial atom, we ca easily eplace all the esults by a sigle esult ed. Defiitio 5. A egotiatio N = (N, 0, f, X) is omed if 0 ad f ae distict ad have oe sigle esult, called st fo 0 ad ed fo f, ad satisfies 0 / X(, a, ) fo each atom, a P ad R. The omed tace sematics of N is the set of taces [N] = {σ st σ ed T (N)}. We use the abstact gaphical epesetatio of a omed egotiatio show i Figue 4; we daw a box aoud its body ad give it a ame, i this case B. Due to the covetio above, fo each aget thee is exactly oe ac coectig its pot i the iitial atom to the body. Howeve, thee may be seveal acs fom the body to the pot of a aget i the fial atom, although we epeset them as oe ac. Obseve that a egotiatio is completely detemied by its body,, the iitial ad fial atoms just play the ôle of a wappe. 3 Negotiatio Pogams I this sectio, we povide a laguage fo the specificatio of egotiatios. As we have abstacted fom states ad state tasfomatios of egotiatios, we also abstact fom data but cocetate o the commuicatio betwee agets. Agets ca agee o egotiatio outcomes. Fo the laguage, we theefoe defie a set of outcome ames o ames R (without statig aythig about atomic egotiatios yet). We fix a fuctio l: R 2 A that assigs to each ame a oempty set of agets, ituitively the set of agets that have to agee o the outcome to be take. Fo evey set X A, we deote by R X the set of ames R such that l() = X.

8 Defiitio 6. Let NP be the gamma cosistig of the followig poductios fo evey X A, evey X X, ad evey Y, Z X such that Y Z = X: pog[x] ::= ɛ do {[] edalt[x]} + {[] loopalt[x]} od pog[y ] pog[z] edalt[x] ::= ame[x]: pog[x ] ed loopalt[x] ::= ame[x]: pog[x ] loop ame[x] ::= elemet of R X whee, as usual, ɛ is the empty expessio, {} + stads fo oe o moe istaces of, ad {} fo zeo o moe istaces of. Fo evey X A, the egotiatio pogams ove X ae the expessios deivable i NP fom the otemial pog[x]. I the est of the pape we use P X to deote a pogam ove the set X of agets. With this sytax, if P X is a subpogam of P X, the ecessaily X X. Ituitively, the sematics of egotiatio pogams is as follows: ɛ stads fo a temiated egotiatio do body od descibes a egotiatio statig with a atomic egotiatio amog the agets of X, i which they agee o oe of the alteatives i the body. If they agee o a ed-alteative a: P X ed, the the pogam cotiues with P X ad temiates whe (ad if) P X temiates. If they agee o a loop-alteative a: P X loop, the, afte P X temiates (if it does), the pogam estats. P Y P Z combies sequetial ad cocuet compositio.if Y Z =, the P Y ad P Z ae executed cocuetly, ad we may wite P Y P Z istead of P Y P Z. Fomally, the sematics of a egotiatio pogam is a set of taces ove a distibuted alphabet. We defie the alphabet fist. Defiitio 7. Give a set of agets A, outcome ames R ad a labelig fuctio l as above, the distibuted alphabet ove A is the pai (Σ, I), whee Σ = R ad (a, b) I iff l(a) l(b) =. That is, two outcome ames ae idepedet if thei coespodig sets of agets ae disjoit. The sematics of a egotiatio pogam P X ove a set of agets X A is the set of taces [P X ] ove the distibuted alphabet (Σ, I) iductively defied as follows, whee EX i ad Lj X deote ed- ad loop-alteatives, espectively: [[do k [] i=0 m [] EX i j=1 [[ɛ]] = {[ɛ]} L j X od]] = ( m j=1 [[a: P X ]] = {[a]} [[P X ]] [[P Y P Z]] = [[P Y ]] [[P Z]] ) ( [[L j X ]] k ) [[E X]] i i=0

9 We use a abbeviatio fo do od costucts with oly oe alteative (which must be a ed-alteative): we shote do [] a : ɛ ed od to just a. I ou example, the body of the pogam show i Figue 2 has the same sematics as the egotiatio of Figue 1. Obseve that we eed to duplicate the subpogam (p p ). This is, howeve, aleady ecessay i sequetial computatios. Coside the degeeate egotiatio with oly oe aget obtaied by pojectig the egotiatio of Figue 1 oto the fist aget (show o the ight of the figue). The laguage of the pogam is give by the egula expessio yp(p) a, which also cotais two occueces of p. No egula expessio fo this laguage cotais oly oe occuece of p. The mai esult of this pape, poved i the ext sectios, shows the equivalece betwee egotiatio pogams ad soud detemiistic egotiatios, whee a egotiatio pogam ad a SDN ae equivalet if they have the same set of Mazukiewicz taces. This equivalece ot oly peseves the occuece sequeces, but also cocuecy. I paticula, i the SDN fo a pogam P 1 P 2, the egotiatios fo P 1 ad P 2 ae ideed executed cocuetly. So the theoem shows that evey specificatio is deadlock-fee ad ca be implemeted, ad evey soud implemetatio ca be specified. Theoem 1. (a) Fo evey egotiatio pogam P thee is a omed SDN N with the same set of agets such that [P ] = [N]. Moeove, the umbe of atoms ad outcomes of N is equal to the umbe of do-blocks of P plus 2, ad the total umbe of outcomes of N is equal to the total umbe of alteatives of P plus 1. (b) Fo evey omed SDN N thee is a egotiatio pogam P with the same set of agets such that [P ] = [N]. I (b), the size of P ca be expoetial i the size of N. This is aleady the case fo egotiatios with oe sigle aget, i which N is essetially a detemiistic fiite automato, ad P coespods to a egula expessio fo this automato, which ca be expoetially lage tha the automato itself. 4 Fom Pogams to Nomed SDNs We show that fo evey egotiatio pogam P thee is a omed SDN N such that [P ] = [N], by iductio ove the stuctue of P. Fist we give a SDN fo the empty pogam, ad the we give detemiistic egotiatios fo P 1 P 2 ad do [] k i=1 a i : P i ed [] k+l j=k+1 a j : P j loop, assumig we have poduced egotiatios fo all P i. I all cases, the poof that the egotiatio is soud ad has the same taces as the pogam follows easily fom the defiitios, ad is omitted. Defiitio 8. The empty omed egotiatio ove a set X of agets is N ɛ X = ({ 0, f }, 0, f, X) with X( 0, a, st) = f, X( f, a, ed) = fo each a X. Lemma 1. [ɛ] = {[ɛ]} = [NX ɛ ] fo evey X A.

10 a 1 a 2 a 3 a 1 a 2 a 3 a 1 a 2 a 2 a 3 B 1 B 1 B 2 B 2 2 st st st 1 2 1 2 B 1 B 2 1 Fig. 5. The cocateatio ad the pefix opeatio. Figue 5 illustates the cocateatio (middle) of two egotiatios (left) with bodies B 1, B 2 ove two ot disjoit sets of agets. Defiitio 9. Let N 1 = (N 1, 01, f1, X 1 ), N 2 = (N 2, 02, f2, X 2 ) be egotiatios ove (ot ecessaily disjoit) sets of agets A 1, A 2 satisfyig N 1 N 2 =. The egotiatio N 1 N 2 = (N, 0, f, X) ove agets A 1 A 2 is defied by: N = (N 1 \ { 01, f1 }) (N 2 \ { 02, f2 }) { 0, f } { X1 ( X( 0, a, st) = 01, a, st) if a A 1 X 2 ( 02, a, st) if a A 2 \ A 1 Fo evey N 1, fo evey a P, R : X 1 (, a, ) if X 1 (, a, ) f1 X(, a, ) = f if X 1 (, a, ) = f1, a A 1 \ A 2, X 1 ( 01, a, ) if X 1 (, a, ) = f1, a A 1 A 2, Fo evey N 2, fo evey a P, R : { X2 (, a, ) if X X(, a, ) = 2 (, a, ) f2 f if X 1 (, a, ) = f2 Lemma 2. If [P 1 ] = [N 1 ] ad [P 2 ] = [N 2 ], the [P 1 P 2 ] = [N 1 N 2 ]. Pefixig egotiatios by a atom that chooses which egotiatio to execute ext is illustated i Figue 5 (ight) fo the special case of do [] 1 : P 1 ed [] 2 : P 2 loop od, whee P 1, P 2 ae pogams ove agets {a 1, a 2 } ad {a 2, a 3 }, espectively. As fo cocateatio, the textual defiitio is a bit laboious. Defiitio 10. Let N 1,... N k+l be egotiatios ove (ot ecessaily disjoit) sets of agets A 1,..., A k+l. Let N i = (N i, 0i, fi, X i ) fo evey 1 i k + l, whee the N i ae paiwise disjoit. The egotiatio choice[n 1,..., N k ; N k+1,..., N k+l ] = (N, 0, f, X) ove agets A = k+l i=1 A i is defied as follows:

11 k+l N = {, 0, f } N i \ { 0i, fi } i=1 X( 0, a, st) = fo evey a A { Xi ( Fo evey 1 i k: X(, a, i ) = 0i, a, i ) if a A i f if a / A i Fo evey k + 1 i k + l: X(, a, i ) = { Xi ( 0i, a, i ) if a A i if a / A i Fo evey 1 i k, N i, a P, R : { Xi (, a, ) if X X(, a, ) = i (, a, ) fi f if X i (, a, ) = fi Fo evey k + 1 i k + l, N i, a P, R : { Xi (, a, ) if X X(, a, ) = i (, a, ) fi if X i (, a, ) = fi Lemma 3. Let P = do [] k i=1 a i : P i ed [] k+l j=k+1 a j : P j loop. If [P i ] = [N i ] fo evey 1 i k + l, the [P ] = [choice[n 1,... N k ; N k+1,..., N k+l ]]. 5 Fom Nomed SDNs to Pogams We show that fo evey omed SDN N thee is a egotiatio pogam P with the same agets such that [P ] = [N]. Fo this we use the esults of [1, 2] o eductio ules. Although we geeally abstact fom data aspects i this pape, states ad state tasfomatios ae helpful to udestad the eductio ules. Each aget a A has a (possibly ifiite) oempty set Q a of iteal states. We deote by Q A the catesia poduct a A Q a. Fo each atom ad esult R, thee is a state tasfome δ () epesetig a o-detemiistic state tasfomig fuctio (this o-detemiism is ot elated to the peviously defied detemiism of egotiatios). Fomally, δ () is a left-total elatio δ () Q A Q A satisfyig: if ((q a1,..., q a A ), (q a 1,..., q a A )) δ () the q ai = q a i fo all a i / P (oly the iteal states of paties of ca be tasfomed). We assig to each lage step σ = ( 0, 0 )... ( f, f ) a tasfome δ σ = δ( 0, 0 ) δ( f, f ) (cocateatio is the usual cocateatio of elatios). The summay tasfome of egotiatio N ad esult f of the fial atom f, δ N ( f ), is the uio of all δ σ fo lage steps σ edig with ( f, f ). Two egotiatios N 1 ad N 2 ove A ae sematically equivalet, deoted N 1 N 2, if eithe both ae ot soud o if both ae soud, thei fial atoms have the same esults ad δ N1 ( f ) = δ N2 ( f ) fo evey fial esult f. A eductio ule, o just a ule, is a biay elatio o the set of egotiatios. R Give a ule R, we wite N 1 N 2 fo (N 1, N 2 ) R. A ule R is coect if R N 1 N 2 implies that N 1 N 2 ) ad theefoe i paticula that N 1 is soud iff N 2 is soud.

12 1 1 2 1 2 2 1 m 1 m 1 m 1 m 1 m f f f......... 1f mf 1f mf 1f mf......... 1f...... mf 1f...... mf 1f,..., mf Mege ule Iteatio ule Shotcut ule Fig. 6. The eductio ules Give a set of ules R = {R 1,..., R k }, we deote by R the eflexive ad tasitive closue of R 1... R k. We say that R is complete with espect to a class of egotiatios if N R N mi holds fo evey egotiatio N i the class, whee N mi is a miimal egotiatio of that class. I the class of soud egotiatios, each miimal egotiatio has a sigle atom, which is both iitial ad fial. I the class of omed soud egotiatios, each miimal egotiatio has two atoms, a iitial ad a fial oe, ad the iitial oe has oly oe esult, st, which seds all agets to the fial atom. Give a eductio ule R, we say that R 1 is its associated sythesis ule. By the defiitio of completeess, fo evey omed SDN N ove the set X of agets thee is a chai NX ɛ = N 1 N 2... N m = N whee each egotiatio is obtaied fom the pevious oe though the applicatio of a sythesis ule. We will pove the existece of a sequece ɛ = P 1 P 2... P m = P of pogams such that [P i ] = [[N i ] fo evey 1 i. We do so by povig the followig statemet fo each sythesis ule R 1 i the followig complete set of eductio ules: if (N, N ) R 1 ad thee is P such that [[P ] = [N], the thee exists P such that [P ] = [N ]. We epeat the coect ad complete set of ules fo omed SDNs fom [2]. Rules ae descibed by a guad ad a actio; N R 1 N 2 holds if N 1 satisfies the guad ad N 2 is a possible esult of applyig the actio to N 1. The ules itoduced i [1, 2] ae summaized i Figue 6. The tasfomatios of state tasfomes (δ ) ae actually ot impotat i the peset cotext but ae povided fo the sake of completeess. Mege ule. Ituitively, this ule (Figue 6, left) meges two outcomes with idetical ext eabled atoms ito oe sigle outcome with a fesh label. Guad: N cotais a atom with distict outcomes 1, 2 R such that X(, a, 1 ) = X(, a, 2 ) fo evey a A. Actio: (1) R (R \ { 1, 2 }) { f }, with f beig a fesh label. (2) Fo all a P : X(, a, f ) X(, a, 1 ). (3) δ(, f ) δ(, 1 ) δ(, 2 ).

13 Iteatio ule. The ule eplaces the iteatio of a outcome followed by some othe outcome by oe outcome f with the same effect (Figue 6, middle). Guad: N cotais a atom with a outcome such that X(, a, ) = fo evey paty a of. Actio: (1) R { f R \ {}}, with f beig a fesh label. (2) Fo all a P : X(, a, f ) X(, a, ) \ {}. (3) Fo evey f R : δ ( f ) δ () δ ( ). Shotcut ule. The shotcut ule meges the outcomes of two atoms that ca occu subsequetly ito oe sigle outcome with the same effect (Figue 6, ight). Give atoms,, we say that (, ) ucoditioally eables if P P ad X(, a, ) = fo evey a P. If (, ) ucoditioally eables the, fo evey makig x that eables, the makig x (,) give by x x eables. Moeove, ca oly be disabled by its ow occuece. Guad: N cotais two distict atoms, 0 such that (, ) ucoditioally eables. Actio: (1) R (R \ {}) { f R }, with f beig fesh labels. (2) Fo all a P, R : X(, a, f ) X(, a, ). Fo all a P \ P, R : X(, a, f ) X(, a, ). (3) Fo all R : δ ( f ) δ ()δ ( ). (4) If X 1 ( ) = afte (1)-(3), the emove fom N, whee X 1 ( ) = {(ñ, ã, ) T (N) X(ñ, ã, )}. Theoem 2. [1, 2] The mege, shotcut, ad iteatio ules ae complete ad coect fo the class of detemiistic egotiatios (ad thus peseve soudess as well as usoudess). Moeove, evey SDN with k atoms ca be completely educed by meas of a polyomial umbe (i k) of applicatios of the ules. Fo defiig accodig pogam ules, it is coveiet to itoduce labeled pogams, i which each do...od-block caies a label. Two blocks cay the same label if ad oly if they ae sytactically idetical. A labeled pogam P ove a set of agets A matches a omed egotiatio N = (N, 0, f, X), deoted by P A N, if each block P of P is labeled with a atom N \ { 0, f } havig the same agets ad outcomes as P, ad fo each atom N \ { 0, f } some block of P is labeled by. Fo each of the ules above we pove the followig statemet: if (N, N ) R 1 ad thee is a egotiatio pogam P such that [P ] = [N] ad P A N, the thee exists a egotiatio pogam P such that [P ] = [N ], ad P A N. Fo the mege ad iteatio ules this is vey simple, but the shotcut ule is otivial. I the est of the sectio, kwd (fo keywod) stads fo eithe ed o loop.

14,,, do [] : P kwd [] od do [] : P kwd [] : P kwd [] od Fig. 7. Pogam ule fo the (ivese of the) mege ule 1 m 1 m 1 m do m []......... 1 m 1 m 1......... m i=1 i : P i kwd od do m [] i : P i kwd [] : loop od i=1 Fig. 8. Pogam ule fo the (ivese of the) iteatio ule Mege ule. Lemma 4. Let (N, N ) M 1, whee M is the biay elatio of the mege ule. If thee is P such that [P ] = [N] ad P A N, the thee exists P such that [P ] = [N ], ad P A N. Poof. Let (, ) be the outcome of N to which the sythesis ule is applied. Sice P A N, all blocks of P labeled by ae idetical ad have the fom :: do [] : P kwd [] od (1) fo some pogam P. If P is the esult of eplacig all blocks labeled by by :: do [] : P kwd [] : P kwd [] od the we clealy have [P ] = [N ], ad P A N. Obseve that, due to the duplicatio of P, the size of P ca be essetially twice the size of P. Iteatio ule. Lemma 5. Let (N, N ) I 1, whee I is the biay elatio of the iteatio ule. If thee is P such that [P ] = [[N] ad P A N, the thee exists P such that [P ] = [N ], ad P A N. Poof. Let be the atom of N to which the sythesis ule adds oe moe outcome, ad let X be the set of agets of. Sice P A N, all blocks of P labeled

15 a 1 a 2 a 3 1 1 2 2 1, 2 a 1 a 2 a 3 1 1 do [] 1 : P 1 ed [] 2 : P 2 ed od do : do [] 1 : P 1 ed [] 2 : P 2 ed od od 2 2 Fig. 9. The aïve pogam ule fo the shotcut ule fails by ae idetical ad have the fom :: do m [] i : P i kwd i od (2) i=1 Let P be the esult of eplacig all blocks labeled by by :: do m [] i : P i kwd i [] : loop od i=1 The we clealy have [P ] = [N ], ad P A N. Shotcut ule. The shotcut ule pesets a poblem, illustated i Figue 9. The left pat of the figue epesets a applicatio of the sythesis ule. Let (N, N ) S 1 be this applicatio, whee S is the biay elatio of the shotcut ule. The pogam fo N must cotai a block labeled by with set of agets {a 1, a 2, a 3 } ad two outcomes 1, 2, as show i the uppe-ight pat of the figue. Assume, as show i the figue, that P 1 ad P 2 have {a 1, a 2 } ad {a 1, a 2, a 3 } as sets of paties, espectively. The the pogam fo N must still cotai a do-block P fo the atom, but ow with a sigle outcome leadig to a secod do-block P with two outcomes 1 ad 2, leadig to the pogams P 1 ad P 2. Sice the outcome oly has a 1 ad a 2 as paties, P has to be a pogam deived fom the otemial pog {a1,a 2}. But the, sice P 2 has {a 1, a 2, a 3 } as paties, it caot be a subpogam of P. Fotuately, we ca sidestep the poblem by havig a close look at the completeess poofs of [1, 2]. Those poofs imply the followig esult: completeess is etaied if the shotcut ule is esticted to two special cases. Defiitio 11. The oe-outcome shotcut ule is like the shotcut ule, but with the additioal coditio i its guad that the atom has oly oe outcome. The same-paties shotcut ule is like the shotcut ule, but with the additioal coditio i its guad that atoms ad have idetical sets of paties.

16 do [] : P kwd [] od do [] : (do : ed od P ) kwd [] od Fig. 10. Pogam ule mimickig the (ivese of the) oe-outcome shotcut ule The poof of this completeess esult is o-tivial, ad we delay it to Sectio 6. Assumig the esult holds, we show ext that we fid pogam tasfomatios matchig the iveses of the oe-outcome ad same-paties shotcut ules. Lemma 6. Let (N, N ) O 1, whee O is the biay elatio of the oeoutcome shotcut ule. If thee is P such that [P ] = [[N] ad P A N, the thee exists P such that [P ] = [N ], ad P A N. Poof. Let be the atom of N with a outcome to which the ivese of the oe-outcome ule is applied. Give a set T of taces, let T [,,, ] be the esult of eplacig i T each tace of the fom [σ 1 (, ) σ 2 ] by the tace [σ 1 (, ) (, ) σ 2 ]. It follows easily fom the defiitio of N ad N that [N ] = [N][, ]. The costuctio is illustated i Figue 10. Sice P A N, all blocks of P labeled by ae idetical ad have the fom B = :: do [] : P kwd []... od. Let P [B/B ] be the esult of eplacig all blocks labeled by by B = :: do [] : (do : ed od P ) kwd []... od. By the defiitio of the pogam sematics we have [B ] = [B ][,,, ]. We pove [[P [B/B ]] = [P ][,,, ] by iductio o the stuctue of P, which, takig P = P [B/B ], cocludes the poof. If P = B, the apply P [B/B ] = B ad [[B ] = [B ][,,, ]. If P = do [] m i=1 i : P i kwd i od, whee kwd i = ed fo 1 i m ad kwd i = loop fo m < i m, the P [B/B ] = do [] m i=1 i : P i [B/B ] kwd i od. By iductio hypothesis [P i [B/B ]] = [P i ][,,, ], ad so we get [P [B/B ]] = ( m i=m +1 [P i [B/B ]] ) m j=1 [P j [B/B ]] = ( m i=m +1 [P i ][,,, ] ) m j=1 [P j ][,,, ] (iductio hypothesis) = m m j=1 i=m +1 ([P i ][,,, ]) [P j ][,,, ] = m m ( j=1 i=m +1 ([P i ] [P j ]) [,,, ] ( m = i=m +1 [P i ] ) ) m j=1 [P j ] [,,, ] = [P ][,,, ]

17 1 m 1 m 1......... m do [] : do [] od 1 1 1 m m m......... do [] m i=1 i : P i kwd i od m i=1 i : P i kwd i od ed Fig. 11. Pogam ule fo the (ivese of the) same-paties shotcut ule If P = P 1 P 2, the [P [B/B ]] = [P 1 [B/B ]] [P 2 [B/B ]] = [P 1 ][,,, ] [P 2 ][,,, ] (iductio hypothesis) = ([P 1 ] [P 2 ])[,,, ] = [P 1 P 2 ][,,, ] Lemma 7. Let (N, N ) O 1, whee O is the biay elatio of the same paties shotcut ule. If thee is P such that [P ] = [N] ad P A N, the thee exists P such that [P ] = [N ], ad P A N. Poof. Let be the atom of N with outcome to which the ivese of the same-paties ule is applied. Give a set T of taces, let T [,,, 1,..., m] be the esult of eplacig i T each tace of the fom [σ 1 (, i )σ 2 ] by the tace [σ 1 (, )(, i )σ 2]. It follows easily fom the defiitio of N ad N that [N ] = [N][,,, 1,..., m]. Figue 11 illustates this costuctio. Sice P A N, all blocks of P labeled by ae idetical. Let B be the sytactic expessio of the block. Let B = do : B ed od. The [B ] = [B ][,,, 1,..., m]. Let P [B/B ] be the esult of eplacig all occueces of B i P by B. A iductio poof aalogous to that of Lemma 6 shows that [P [B/B ]] = [B ][,,, 1,..., m]. Takig P = P [B/B ] we ae doe. This cocludes the poof of Theoem 1 (modulo the emaiig poof obligatio dischaged to Sectio 6). It was show i [2] that evey SDN N ca be completely educed by meas of O(a 4 ) applicatios of the ules, whee a ad ae the umbe of atoms ad the total umbe of esults of N. Sice the pogam ule fo the ivese of the mege ule ca at most duplicate the size of the pogam, ad the othe pogam ules oly icease its size by a costat, we obtai a uppe boud of O(2 a4 ) fo the size of the pogam P equivalet to N. A pogam of liea size ca be obtaied by eichig the pogammig laguage with pocedues. Istead of duplicatig pogam P i the poof of Lemma 4, we call twice a pocedue with body P.

18 6 Completeess of Rules fo omed SDNs It emais to show that the mege, iteatio, oe-outcome shotcut ad samepaties shotcut ules ae complete fo omed SDNs, i.e., that they educe evey omed SDN to a egotiatio with just two atoms. Defiitio 12. A cycle of a egotiatio N is a sequece of outcomes ( 1, 1 ),..., ( k, k ) such that thee ae agets a 1,..., a k ad 2 X( 1, a 1, 1 ), 3 X( 2, a 2, 2 ),..., 1 X( k, a k, k ). The egotiatio N is called cyclic if it cotais a cycle, ad acyclic othewise. We coside the acyclic ad cyclic cases sepaately. The completeess of the ules (mege, iteatio, oe-outcome shotcut ad same-paties shotcut) i the acyclic case was pove i [1]: Lemma 8. The mege ule, iteatio ule, oe-outcome shotcut ule ad samepaties shotcut ule ae complete fo soud detemiistic acyclic SDNs. Poof. This claim is a immediate cosequece of Lemma 1 i [1] (ou oeoutcome shotcut ule is called d-shotcut ule thee). Actually, Lemma 1 i [1] states that wheeve the mege ule ad the same-paties shotcut ule ae ot applicable to a soud detemiistic acyclic egotiatio the evey aget paticipates i all atoms with moe tha oe output. If the egotiatio ude cosideatio is ot miimal yet, we ca apply the shotcut ule to atoms ad. Sice the same-paties shotcut ule is ot applicable, has less paties tha, ad hece ot all agets paticipate i. Theefoe ca have oly oe outcome, ad the coditios of the oe-outcome shotcut ule ae satisfied. Fo the cyclic case, we have a close look to the esults of [2]: σ Defiitio 13. A loop is a occuece sequece σ such that x x fo some makig x eachable fom the iitial makig x 0. A miimal loop is a loop σ satisfyig the popety that thee is o othe loop σ such that the set of atoms i σ is a pope subset of the set of atoms i σ. Lemma 9 (Lemma 1 of [2]). (1) Evey cyclic SDN has a loop. (2) The set of atoms of a miimal loop geeates a stogly coected subgaph of the gaph of the cosideed egotiatio. Usually, moe tha oe atom is ivolved i a loop, ad these atoms have diffeet sets of paties. Fo soud detemiistic egotiatios, it was pove i [2] that at least oe of these atoms ivolve all paties that paticipate i ay of these atoms. These atoms ae called sychoizes of the loop. I tu, a sychoize of oe loop ca sychoize othe loops as well. Fo a sigle atom we coside the fagmet of the egotiatio which is costituted by all atoms ad outcomes appeaig i ay loop sychoized by the atom (which is oempty oly if

19 is a sychoize of at least oe loop). Each fagmet is cyclic by costuctio. Now we ae lookig fo a fagmet with the popety that all its cycles pass though its geeatig sychoize. It is ot difficult to see that this popety is satisfied by miimal fagmets, which do ot popely iclude ay smalle oes: if a cycle of a fagmet does ot pass though the geeatig sychoize, the thee is a accodig loop fo this cycle, which agai has a sychoize, ad the fagmet geeated by is smalle tha the oe geeated by. The pocedue itoduced i [2] shows that a miimal fagmet geeated by a sychoize ca be viewed as a acyclic soud egotiatio statig with ad edig with (a copy of), ad ca thus be educed by the same ules as fo the acyclic case. This pocedue eds with a miimal cycle, which eables the iteatio ule. Afte applyig this ule, the cycle vaishes. The complete pocedue deletes this way cycle by cycle, util the egotiatio is acyclic ad ca be educed to a miimal oe as above. Aothe impotat poit made i [2] is that the atoms of a miimal fagmet ejoy the followig popety: Each atom is eithe a sychoize (ad has hece the same paties as the geeatig atom) o has o exits, which meas that all outcomes of the atom ae also outcomes of the fagmet. This implies that it suffices to apply the esticted same-paties ad oe-outcome shotcut ules istead of the geeal shotcut ule also fo the acyclic case, as we will ague ext. We have ecalled above that the esticted ules suffice fo soud ad detemiistic acyclic egotiatios, ad we educe the fagmet exactly like a coespodig acyclic egotiatio. If a same-paties shotcut ule is applied i the fagmet, the the same ule applies to the etie egotiatio. The oeoutcome shotcut ule, howeve, equies that the educed egotiatio (called i the defiitio) has oly oe output. Eve if this is the case withi the fagmet, additioal outputs might exist i the etie egotiatio. Howeve, i this case this atom must be a sychoize, ad thus all paties of the fagmet paticipate i this atom. I paticula, it caot have less paties tha the othe atom of the ule (called i the defiitio), which implies that the additioal guad of the same-paties ule is also fulfilled. I othe wods: Fo each applicatio of the oe-outcome shotcut ule i the fagmet, which is ot at the same time a applicatio of the same-paties shotcut ule, the educed atom ( ) has oly oe outcome i the egotiatio, too, ad hece, the same applicatio of the shotcut ule i the egotiatio is also a oe-outcome shotcut eductio. These cosideatios, all fom [2], pove the followig lemma: Lemma 10. The mege ule, iteatio ule, oe-outcome shotcut ule ad samepaties shotcut ule ae complete fo soud detemiistic cyclic SDNs. Fially, ecall that completeess of a set of ules meas that each egotiatio ca be educed to a miimal oe. Miimal egotiatios have a sigle atom, wheeas miimal omed egotiatios have two. Sice we apply the eductio ules to omed egotiatios, we still have to show that we ae always able to ed the eductio pocedue with a miimal omed egotiatio. Theoem 3. The mege ule, iteatio ule, oe-outcome shotcut ule ad same-paties shotcut ule ae complete fo omed SDNs.

20 Poof. This poof is heavily based o Lemma 8 ad Lemma 10. We oly have to show that fo evey omed SDN N at least oe ule ca be applied that does ot spoil the omedess popety. By defiitio of the ules, applicatio of the mege ule o of the iteatio ule tasfoms a omed SDN ito a omed SDN. Fo the shotcut ule, the deived egotiatio might be ot omed, if the ule is applied to the iitial atom 0 ad its uique successo. Howeve, it suffices to coside the esticted vaiats of the oe-outcome shotcut ule ad the same-paties shotcut ule. We moeove ule out the case that the egotiatio befoe tasfomatio is aleady a miimal omed oe, i.e., we assume that it has moe tha two atoms. Fo the oe-outcome shotcut ule, i the esultig egotiatio, the iitial atom still has oe outcome oly, by defiitio of the shotcut ule. Fo the same-paties shotcut ule, howeve, this is ot ecessaily the case. So we coside this case i the sequel ad assume that the same-paties shotcut ule ca be applied to the iitial atom 0 ad its successo 1 of a omed egotiatio. By defiitio of a omed egotiatio, oe of the pots of the iitial atom has a igoig ac. Sice the same-paties shotcut ule is applicable, 1 cotais the same paties as 0, ad sice 0 is the iitial atom, all agets paticipate i both atoms. So it is obvious that the egotiatio obtaied afte deletio of 0, takig 1 as iitial atom, is also soud (but ot omed i geeal). This smalle egotiatio N ca be educed to a miimal egotiatio by the mege ule, the iteatio ule ad the two esticted vaiats of the shotcut ule. We coside two cases: If N is aleady miimal, it cosists of a sigle atom. The the cosideed egotiatio with 0 is aleady a miimal omed SDN. If N is ot miimal, the oe of the ules ca be applied to N. The same ule ca be applied to N, efeig to the same ivolved atoms. 7 Coclusios We have itoduced a specificatio laguage fo detemiistic egotiatios. The laguage has a vey special featue: evey pogam of the laguage is soud (the pogam ca temiate fom evey eachable state, meaig i paticula that the pogam is deadlock-fee) ad evey soud egotiatio ca be specified i the laguage. So the laguage povides a sytactic chaacteizatio of soudess. Desig equiemets fo distibuted systems ae ofte captued with the help of sceaios, specifyig the iteactios that take place betwee sequetial pocesses. Thee exist diffeet fomal otatios fo sceaios, depedig o the udelyig commuicatio mechaism betwee pocesses. Fomal otatios also pemit to specify multiple sceaios by meas of opeatios like choice, cocateatio, ad epetitio. A set of sceaios specified usig such opeatios ca be viewed as a ealy model of the system aalyzable usig fomal techiques. A key featue of sceaio-based otatios is that they peset a global view of the system as a set of cocuet executios epesetig use cases. While this view is usually moe ituitive fo developes, implemetatios equie a cocuet compositio of sequetial models, i.e., of state machies. A specifi-

21 catio is ealizable if thee exists a set of state machies, oe fo each sequetial compoet, whose set of cocuet behavious coicides with the set globally specified. The ealizablity poblem cosists of decidig if a give specificatio is ealizable ad, if so, computig a ealizatio, i.e., a set of state machies. The poblem has bee studied fo vaious fomalisms. Fo egotiatios, the ealizability poblem eads as follows: give a sytactically coect egotiatio pogam, is thee a soud detemiistic egotiatio with the same behaviou? The esults of this pape show that, fo detemiistic egotiatios, the ealizability poblem is fa moe tactable tha i othe laguages, because the aswe to the above questio is always positive. I tu, egotiatio pogams ae expessively complete: evey soud detemiistic egotiatio diagam has a equivalet egotiatio pogam. Fially, egotiatio pogams ca be distibuted i liea time. We povided a algoithm to deive a detemiistic egotiatio fom a pogam that geealizes classical costuctios to deive a automato fom a egula expessio. The egotiatio is the pojected oto its compoets. Negotiatios ae closely elated to wokflow Peti ets epesetig busiess pocesses, ad detemiistic egotiatios to fee-choice wokflow ets. Ou futue wok tasfes the cocepts of this pape to the aea of busiess pocesses. Refeeces 1. Espaza, J., Desel, J.: O egotiatio as cocuecy pimitive. I: CONCUR. (2013) 440 454 2. Espaza, J., Desel, J.: O egotiatio as cocuecy pimitive II: Detemiistic cyclic egotiatios. I: FoSSaCS. (2014) 258 273 3. Davis, R., Smith, R.G.: Negotiatio as a metapho fo distibuted poblem solvig. Atificial itelligece 20(1) (1983) 63 109 4. Jeigs, N.R., Faati, P., Lomuscio, A.R., Pasos, S., Wooldidge, M.J., Siea, C.: Automated egotiatio: pospects, methods ad challeges. Goup Decisio ad Negotiatio 10(2) (2001) 199 215 5. Böhm, C., Jacopii, G.: Flow diagams, tuig machies ad laguages with oly two fomatio ules. Commu. ACM 9(5) (May 1966) 366 371 6. Hael, D.: O folk theoems. Commu. ACM 23(7) (1980) 379 389 7. Koze, D., Tseg, W.L.D.: The Böhm-Jacopii theoem is false, popositioally. I: MPC. (2008) 177 192 8. Vahatalo, J., Völze, H., Koehle, J.: The efied pocess stuctue tee. Data Kowl. Eg. 68(9) (2009) 793 818 9. Zwies, J.: Compositioality, Cocuecy ad Patial Coectess - Poof Theoies fo Netwoks of Pocesses, ad Thei Relatioship. Volume 321 of Lectue Notes i Compute Sciece. Spige (1989) 10. va de Aalst, W.M.P.: The applicatio of Peti ets to wokflow maagemet. J. Cicuits, Syst. ad Comput. 08(01) (1998) 21 66 11. va de Aalst, W.M.P., va Hee, K.M., te Hofstede, A.H.M., Sidoova, N., Vebeek, H.M.W., Voohoeve, M., Wy, M.T.: Soudess of wokflow ets: classificatio, decidability, ad aalysis. Fomal Asp. Comput. 23(3) (2011) 333 363 12. Dieket, V., Rozebeg, G., Rozebug, G.: The book of taces. Volume 15. Wold Scietific (1995)