Graphs and Stochastic Automata Networks1 1

0 downloads 0 Views 223KB Size Report
Graphs and Stochastic Automata Networks1. Jean-Michel Fourneau and Franck Quessette. Universit e de Versailles Saint-Quentin. 45, Avenue des Etats-Unis.
Graphs and Stochastic Automata Networks1 Jean-Michel Fourneau and Franck Quessette Universite de Versailles Saint-Quentin 45, Avenue des E tats-Unis F-78 035 Versailles Cedex, France Abstract

We show how some graph theoretical arguments may be used to reduce the complexity of the computation of the steady-state distribution of Markov chain. We consider the directed graph associated to a Markov chain derived from a Stochastic Automata Network (SAN). The structural properties of the automata are used to establish new various results. First, we establish the complexity of the resolution for Stochastic Automata Networks with a sparse matrix representation of the automata. This results are used to compare simple SAN (i.e. without functions) with methods which generates a sparse representation of Markov chains (i.e. Markovian Petri Nets for instance) on some examples. Then, we show how to apply state reduction techniques on a chain associated to a SAN. We present an algorithm to solve the steady-state equations and we prove its complexity. Finally, we extend our algorithm to allow the semi- parametric analysis of Stochastic Automata Networks.

1 Introduction The complexity of the new generation of distributed systems has made the availability of ecient modeling tools a very important issue. These systems are complex to study because they lead to models with an exponential growth of the number of states. We lack analytical results for systems with complex synchronizations and naive numerical analysis is not sucient. 1

This work is partially supported by a grant from CNRS, project A .

1

In this paper, we investigate the complexity and the computational aspects of the numerical and parametric resolution of continuous time nite Markov chains. These chains are often large and sparse. They usually lead to a modeling problem (how to build large Markov chains from the speci cations of our problem) and to an algorithmic problem (how to solve the steady-state distribution with a sucient accuracy). In this paper, we consider an approach designed for the representation of parallel systems: Stochastic Automata Networks (SAN) [12]. We advocate that this methodology answers the rst problem (i.e. the design of large Markov chain from speci cations) and may help to derive new numerical methods. Indeed, the main advantage of SAN is the automatic generation of the transition matrix using tensor algebra. Thus, structural properties (i.e. properties of the underlying directed graphs) of the chain may be veri ed without explicitly generating the transition matrix. Directed graphs may be easily associated to Markov chains since Markov chains on discrete space are state-transition diagrams with transition rates. Some graph properties have been recently used to prove analytical results for the steady-state distribution of Markov chains [3, 7]. In this paper, the structural properties of the automata are used to establish new various results. These results are connected to a new formalism, the so-called process algebra method. This formalism has been recently developed by various authors, see [1] for applications to Markov chains and [2] for stochastic Petri nets. First, we establish the complexity of the iterative resolution for Stochastic Automata Networks with a sparse matrix representation of the automata. More precisely, we obtain the complexity of the product of a vector by a sum of tensor product of matrices. This algorithm is the main part of various iterative resolution scheme such as the power method or Arnoldi's algorithm. We also obtain a bound on the number of non zero elements in the transition matrix. These results are used to compare simple SAN (i.e. without functions) with methods which generates a sparse representation of Markov chains (i.e. Markovian Petri Nets for instance). These results and comparisons were previously made only for complete matrix representation. Then, we investigate some state reduction techniques to obtain new algorithms for the computation of the steady state distribution of Markov chains. These algorithms may have a smaller complexity for some types of SAN than the rst algorithm developed under this formalism [12]. Intuitively, state reduction techniques consists of using a partition of the generator Q of the Markov chain into four blocks. This partition is usually 2

suggested by the problem (see [8] for a bibliography on this topic). Assume that we have done a partition of the Markov chain into two sets of states (S0 ; S1), the steady-state of which are denoted by X0 and X1, then we may use this block structure to de ne the problem:

! 8 > < (X ; X ) A B = 0 C D > : (X ; X )e = 1 0

1

0

1

(1)

where e is a column vector whose components are all equal to 1. Note that A and D are square blocks. Assume that D is not singular, and let be H = ?BD?1 , we now have to solve what is known as a reduced problem in Markov chain [8]:

8 > < X =X H X (A + HC ) = 0 > : X (e + He ) = 1 1

0

0 0

0

1

where (e0; e1) = e. In this paper, we will state that this partition may be eciently done using graphs arguments. Our work is based on a generalization of an idea used by Robertazzi [14]. The key idea is to nd a partition such that matrix H is easy to compute. Two strategies have been studied: in the rst strategy, we chose a partition such that matrix D is triangular. The second strategy is a little bit more complex: we design a partition such that D is block triangular. In section 2, we introduce the SAN methodology and the graph operations which are associated to the automatic generation of the transition matrix. Then, we derive in section 3 the complexity of one product vector/matrix used in the iterative method X (n) = X (n?1) (Q + I ) where X (n) is the nth step of the evolution of the Markov chain with generator Q. We present in section 4 and 5 how some graph properties may lead to state reduction algorithms and give their complexity. Section 4 is devoted to the rst strategy (D is triangular) while section 5 presents the second strategy (D is block triangular). Finally, in section 6, we derive new results for parametric analysis of some networks of stochastic automata. These methods do not eciently deal with the same classes of SAN. So they can not be compared in general. Our aim is to provide a quick way to evaluate the complexity of these methods. This evaluation is based on the automata rather than on the Markov chain, therefore it may be perform 3

with a very small complexity. So it may be easy to nd the most ecient method to solve a particular problem. These methods will be implemented an improved version of the package described in [13]. SAN have been applied to model ATM networks [4, 5, 6]. Furthermore, in [4] an example of the applications of the various reduction methods is presented.

2 Stochastic Automata Networks and Directed Graphs The Stochastic Automata Network (SAN) approach was originally designed to evaluate the performance of distributed algorithms [12]. Under this formalism, the behavior of any algorithm is typically modeled by an automaton. The method may be used in discrete time or continuous time. A SAN (A1; A2; : : :; An ) consists of a set of n automata. An automaton Ai consists of states and transitions. The states of the global system are obtained from the product of the states of the automata. Transitions of the global system are obtain from the local transitions using Kronecker algebra. An automaton itself is not Markovian, but the whole automata network is represented by a multidimensional discrete or continuous Markov chain. Transition rates are expressed as labels on the arcs and are exponentially (in continuous time) or geometrically (in discrete time) distributed. Transitions in the SAN model must be one of the following:  xed rate (just like for ordinary Markov chains).  network dependent rate: the transition rate is a function of the states of the other automata.  synchronizations: several transitions occur at the same time in all the automata where this synchronization appears. The rates of synchronizations may be either xed or state-dependent. All of the automata must be in a suitable state for ring the synchronization. In the literature, this type of synchronization is denoted as \Rendez-vous". Translation from a SAN to the transition rate matrix Q is automatic. This translation is based on tensor algebra of matrices (see [12] for more details and proofs). First let us de ne some operations: 4

De nition 1 (Tensor Product) Let A be a matrix of order n  n, and B a matrix of order p  p. The tensor product of A and B is a matrix of order np  np that may be decomposed into n2 blocks of size p. A

O

0 B=B @

a11B    a1n B 1 .. .

.. .

...

an1 B    ann B

CA

A and B are matrices of real values but we generalize the de nition of tensor product on matrices of functional values (i.e. the elements of A and B are

functions using states as arguments). Some properties of the classical tensor product still hold.

De nition 2 (Tensor Sum) Let A be a matrix of order n  n, and B a matrix of order p  p. M O O A

B=A

IB + IA

B

where IA (IB ) represents the identity matrix with the same size as matrix A (IA ).

Assume that the states are in lexicographic order, the rate matrix of a SAN (A1; A2; : : :; An ) with s synchronizations is given by

Q=

n M i=1

Fi +

n s O X

j =1 i=1

Si;j ?

n s O X j =1 i=1

Ri;j

(2)

where

 Fi is the contribution matrix of automaton Ai to transitions without

synchronizations.  Sij is the contribution matrix of automaton Ai to synchronization j .  Rij is a matrix representing the normalization associated to the synchronization j on automaton Ai . A similar construction also exists for discrete-time Stochastic Automata Networks. We restrict ourselves to a simpler result: the automatic construction of the directed graph (digraph) of the Markov chain and we only consider continuous time Stochastic Automata Network. First, we introduce the de nitions of some operations on graphs which are equivalent to tensor operators on matrices. 5

De nition 3 We denote by  the usual product of sets. The Cartesian sum of two digraphs G = (V ; E ) and G = (V ; E ), 1

1

1

2

is the digraph G = (V; E ) denoted by G = G1 2 G2 where

2

2

8 V = V V > 8 > < > < (x ; y ) 2 E and x = y > or (( x ; x ) ; ( y ; y )) 2 E () > > : : x = y and (x ; y ) 2 E The Cartesian product of two digraphs G = (V ; E ) and G = (V ; E ), is the digraph G = (V; E ) denoted by G % & G , where ( V = V V ((x ; x ); (y ; y )) 2 E () (x ; y ) 2 E and (x ; y ) 2 E The union of two digraphs G = (V; E ) and G = (V; E ) with the same set of vertices V , is the digraph G = (V; E ) denoted by G t G , where (x; y ) 2 E () (x; y ) 2 E or (x; y ) 2 E 1

2

2

1

1

1

1

1

2

1

1

2

1

2

2

1

1

1

2

2

1

2

2

2

1

1

1

1

2

1

1

2

2

1

2

2

2

2

2

1

1

2

2

2

Let us now proceed with this automatic derivation of the digraph of the global Markov chain of a SAN composed of n automata (A1 ; A2; : : :; An ). For all Ai in the SAN, we decompose Ai into partial digraphs with the same nodes as Ai , in the following way:  Zi is the digraph of the non synchronized transitions. Zi does not contain any loops. (This digraph corresponds to the transitions that appear in the matrix Fi ).  Yi;j is the digraph of the transitions labeled by synchronization sj . By de nition, if synchronization sj does not occur in Ai , then Yi;j contains only loops on all the vertices since this synchronization does not a ect Ai . (This digraph corresponds to the transitions that appear in the matrix Sij ). Using the former notation, we may build the digraph Wi of the automaton Ai : Gs Wi = Zi t ( Yi;j ) j =1

6

where s is the number of synchronizations in the network. From the construction of the rate matrix, we obtain the following formula for the construction of the graph of the Markov chain:

Gs

n

n Z ) t ( (% G  (i2=1 & Yi;j )) i j =1 i=1

Here the inclusion means inclusion of the sets of the edges. We have inclusion and not equality since we do not evaluate the functional rates on the directed edges and we assume that these rates are non zero. Of course, if the rate is zero, then the transition in the Markov chain (and the edge in the digraph) does not exist.

3 Complexity of iterative method on sparse matrices From this construction of the graph we may derive easily the number of edges of the graph (or the number on non zero elements in the transition rate matrix). Thus, we may have the complexity of the product of a vector by a sparse rate matrix. Let G = (V; E ) be a digraph, we denote by V (G) the set of vertices of G and by E (G) the set of edges. jAj is the size of set A. First let us recall two classical lemmas.

Lemma 1 Let F and G be two digraphs, then the number of edges of F 2 G is jE (F )jjV (G)j + jE (G)jjV (F )j. Lemma 2 Let F and G be two digraphs, then the number of edges of F % &G is jE (F )jjE (G)j. Let us now de ne some notation:

Notation 1  ti is the size of automata i, ti = jV (Zi)j = jV (Yi;j )j for all j .  di is the mean in degree of digraph Zi; then the number of edges in Zi is jE (Zi)j = ti di .  dji is the mean in degree of digraph Yi;j ; then the number of edges in Yi;j is jE (Yi;j )j = ti dji . 0

0

7

 di = di + Psj dji ; then the number of edges in Wi is ti di.  T = Qni ti is the total number of states in the chain.  Ti = tT . If we assume that all the arcs generated by 2ni Zi and & %ni Yi;j are all 0

=1

=1

i

=1

distinct, we easily obtain the number of edges of the graph of the chain. If some edges are generated twice by two synchronizations, or if some functional rates are zero, then we only obtain an upper bound for the number of edges. =1

P P Lemma 3 The number of edges in a SAN is bounded by T ( ni di + sj Qn dj ). This bound is exact if all the edges in 2n Z and % &n Y are =1

i=1 i

i=1 i

0

=1

i=1 i;j

distinct and if there exist no functional rates in the SAN.

Proof: Lemmas 1 and 2 implies that the number of edges in 2ni=1 Zi is

1 0 n n n n X X Y X n C B jE (i2 Zi )j = @jE (Zi)j jV (Zk )jA = tidi Ti = T di 0

i=1

=1

0

i=1

k =1 k =i

i=1

6

And the number of edges in % &ni=1 Yi;j is n

n Y

i=1

i=1

jE ( % & Yi;j )j =

jE (Yi;j )j =

n Y i=1

ti dji

=T

n Y i=1

dji

Clearly, if a matrix is stored in a suitable form, then the complexity of the product of a vector by this matrix is exactly the number of non zero elements in the matrix and we get the result. 2

Proposition 1 Building the rate matrix associated to a SAN and using a

sparse matrix representation, the complexity of one iteration of the product vector/matrix is in n n s Y X X O(T ( d0i + dji )): i=1

j =1 i=1

Let us now investigate the computation of this product using equation (2). The complexity of this product has been studied in [13] for matrices 8

with a complete representation. If we use a sparse matrix representation instead, only the last part of the algorithm is changed. So we rst outline the rst steps of the method and we refer to [13] for more details. The rst step is to transform the model to obtain a canonical form only with tensor product. The number of terms in the summation increases because of this transformation of tensor sum into tensor product. Thus equation (2) becomes n nX +2s O Mij Q= i=1 j =1

where each Mij is one of the three types of matrices de ning a SAN: Fi , Sij or Rij . Let us denote by i the permutation of the index of the automata which exchanges automata Ai and An . P is the matrix of the permutation of the states induced by the permutation i . We use the compatibility of tensor product with ordinary product to obtain relation (3). This relation is only true for ordinary tensor product (see [11] for its proof). i

n O j =1

Mij =

n  Y

i=1

P (IT i

O

i



Mij )Pt

i

(3)

where IT is the identity matrix of size Ti and Pt is the transpose matrix of P . P +2s Nn M ). This relation provides an easy algorithm to compute X ( in=1 j =1 ij We propagate the basic product of vector X by ordinary matrices. The basic operation consists of the computation of: i

i

i



X  P (IT

O

i

i



Mij )Pt

i

P is a permutation matrix and IT N Mij is a block diagonal matrix whose i

i

blocks are equal to Mij . Therefore, the complexity of the basic operation is O(2  T ) for the product by the permutation matrices plus Ti multiply by the numbers of elements in Mij .

Proposition 2 Using a complete matrix representation for Mij , the complexity of one iteration of the product vector/matrix is in O(2T + Ti  ti ). 2

After simpli cation and summation, the nal complexity is in

O(T (4s + 2n + 9

X i

ti )):

If we use instead a sparse matrix representation, the complexity of the basic operation is reduced to O(2T + Ti  ti D(i; j )) where D(i; j ) is the mean degree of matrix Mij . Remember that there exist three types of matrices Mij : the matrices due to the expansion of the tensor sum, the matrices of synchronization, and the normalization matrices. Due to the expansion of the tensor sum into tensor product, the matrices Mij are equal to the identity if i 6= j . Then, for this matrices D(i; j ) equals 1 if i 6= j and equals d0i otherwise. Furthermore the normalization matrices Ri;j are always diagonal. Therefore D(i; j ) for this matrices is smaller than 1. In the other cases D(i; j ) is equal to dji .

Proposition 3 Using a sparse matrix representation for Mij , the complexity of one iteration of the product vector/matrix is in

O(T (4s + 2n +

X i

(d0i +

s X

j =1

dji )):

Clearly, complexity of proposition 3 is better than complexity of proposition 2 due to sparse matrix representation. Comparison between complexity of proposition 1 and proposition 3 cannot be done in general.

4 State Reduction using Transversal First, we present a state reduction technique on a Markov chain. Then, we apply the results to SAN. We assume that we have made a partition of the states of the chain into two sets S0 and S1 . And the rate matrix of the chain is! decomposed into four blocks according to the partition (S0; S1): A B C D . We try to de ne a partition such that matrix D is triangular. Then, D?1 (and H = ?BD?1 ) is easy to compute. We denote by N0 (resp. N1) the size of the set S0 (resp. S1 ). So A is a square matrix of size N0  N0. N is the order of the graph (N = N0 + N1) and m is the size of the graph (i.e. the number of directed edges). As we consider a continuous time Markov chain, the associated graph G has no loops. We denote by mB (resp. mC ) the number of non zero elements of the matrix B (resp. C ). And we denote by mA (resp. mD ) the number of non zero and non diagonal elements of the matrix A (resp. D). Clearly, there is a one to one mapping between the directed edges of the graph 10

and the non zero and non diagonal elements of the matrix Q. So we have m = m A + mB + m C + m D . We denote by d?i the input degree (in degree) of vertex i in the subgraph of G restricted to states in S1. So d?i is also the number of non zero and non diagonal elements in column i of D. De nition 4 Let G = (V; E ) be a digraph (directed graph). TG  V is a transversal of the directed cycles of G i each directed cycle of G has at least one vertex in TG . This set is also called cutset of the directed cycles by some authors [15]. Lemma 4 Let the state space be partitioned into two sets S0 and S1, if S0 is a transversal of the digraph G associated to Q, then i) there exists an ordering of the vertices of S1 such that D is upper triangular, ii) D is not singular. Proof: Since S0 is a transversal, there is no directed cycle in the subgraph of G restricted to vertices included in S1. So, this subgraph is a directed acyclic graph (dag) and as D is the matrix associated to this subgraph, D is upper triangular if the states in S1 are numbered with a topological order. Proof of ii) may be found in [10]. 2 Now, we prove the complexity of algorithms based on reduction on a transversal. Lemma 5 If D is upper triangular, then the ith column of H may be computed in time O(N0  d?i ). P 0 X [j ]H [j; i]. As D Proof: By de nition of H , we have for all i: X1[i] = Nj =1 0 P N 0 X [j ]B [j; i] ? is upper triangular, we also have for all i: X1[i]D[i; i] = ? j =1 0 Pi?1 X [j ]D[j; i]. j =1 1 For i = 1 by identi cation, we have H [j; 1] = ? DB[1[j;;1]1] and by induction on i, we have: P B [j; i] + ik?=11 H [j; k]D[k; i] 8j; H [j; i] = ? D[i; i] And by induction on k, H [j; k] is already obtained for all k < i. The number of non zero values D[k; i] is less or equal to the input degree of i, d?i . Then, the complexity is of the order of O(N0  d?i ). 2 11

Theorem 1 The algorithm, based on a reduction of the state space on a

transversal of size N0, computes the steady-state distribution of Markov chains with a complexity of the order of O(N03 + N0  m). Proof: P 1. We compute H , using lemma 5, in time O( Ni=11 N0  d?i ) = O(N0  (mB + mD )). 2. We compute A + HC in time O(N0  mC ) for multiplication and in time O(N02) for addition. 3. Any usual algorithm nds the solution for X0 on reduced system in time O(N03). 4. We obtain solution of X1 from X0 in time O(N0  N1). As mB + mC + mD < m and N1 < m, we nally obtain the result. 2 Note that resolution of system (1), where X is a N components vector has a complexity of the order of O(N 3) with an usual algorithm. With this previous result, if N0 is not too large, we obtain a better complexity. Note that it is sucient to consider an arbitrary transversal to prove the former results. However, in order to reduce the complexity, we have to nd one of the smallest transversals of the graph. Since the minimal transversal problem is a NP-complete problem, we have to consider non optimal solutions. Fortunately enough, there exist good heuristics such as the maximum degree heuristic which has a complexity which is linear in the number of edges.

4.1 Reduction for Stochastic Automata Network F

We note Y the global graph of synchronizations: Y = sj=1 % &ni=1 Yi;j . The edges of Y are called synchronization edges. We will present now how it is possible to nd easily the directed cycles of restricted family of SAN. We assume in the following that the nodes of the graph are labeled with the usual vectors numbering associated to the product space. We denote by dH (x; y ) the Hamming distance between nodes x and y. We also assume that the synchronizations are real synchronizations: they always change at least the states of two automata. Theorem 2 Let (A1; A2; : : :; An) a SAN, if for each Ai , the partial digraph Zi is a dag, then all the directed cycles of G contain at least one synchronization edge. 12

Proof: Let (a1 ; : : :; ap; a1) be a directed cycle of length p in the graph G. We will provePthat one edge in this cycle is a synchronization edge. Let L = pi=1 dH (ai ; ai+1). When i = p, the edge (ai ; ai+1) has to be understood as the edge (ap; a1). We have to consider the following three cases: 1. L < p this case is impossible since 8i 2 [1::p], dH (ai ; ai+1 )  1. 2. L > p in this case, 9j 2 [1::p] such that dH (aj ; aj +1)  2. Then (aj ; aj +1) is a synchronization. 3. L = p in this case, 8i 2 [1::p], dH (ai; ai+1 ) = 1. Therefore, there is no synchronization edge in the directed cycle and all the edges of the directed cycle are obtained from the Cartesian sum (2ni=1 Zi ). Since the Cartesian sum of dags is a dag and since all the Zi are dags, we get a contradiction. We now have to nd a transversal of the directed cycles in a SAN under assumptions of theorem 2. Lemma 6 Let G be the graph of a SAN (A1; A2; : : :; An) such that for each Ai, the partial digraph Zi is a dag. If C is an edge cover of Y then C is a transversal of the directed cycles of G. Before we give the proof, we give the de nition of an edge cover. De nition 5 Let G = (V; E ), C  V is an edge cover of G if for all (x; y) 2 E , x 2 C or y 2 C . Proof: Each cycles of G has at least one edge which is a synchronization edge (i.e. an edge of Y ). Thus every edge cover of Y is a transversal of the cycles of G. 2 The previous lemma signi cantly decreases the computation time to nd a transversal. Indeed the number of edges in Y is usually quite smaller than the number of edges in G. Note that the set product of the edge covers of graphs is generally not an edge cover of the Cartesian product of graphs. However the following result gives an algorithm to nd a cover of Y and then a transversal of G. Lemma 7 Let (Gi)i=1::n be a set of directed graphs. Let us denote by Degi? (resp. Degi+ ) the subset of the vertices of Gi which have a non zero input degree (resp. output degree). Then the two sets (ni=1 Degi? ) and (ni=1 Degi+ ) are edge cover of (% &ni=1 Gi). Moreover, if Ci is an edge cover of Gi then n ([i=1 Ci ) is an edge cover of ([ni=1 Gi).

13

We are now able to apply result of theorem 1 to SAN that satis es the assumptions of theorem 2.

Corollary 1 Let G be the graph of a SAN that veri es the assumptions of theorem 2. If C is an edge cover of Y then the algorithm based on state reduction on Qa transversal associated to C has a complexity of the order of O(jCj3 + jCj( ni=1 ti )[Pni=1 d0i + Psj=1 Qni=1 dji ]) Proof: From theorem 1, we know that the algorithm computes in time O(N03 + N0  m) where N0 is the size of the transversal which we consider. Lemma 6 implies that N0  jCj. Now, we have to compute the number m of edges in the graph. The number of edges of the Cartesian product is the product ofPthe number of edges. Thus the number of edges in Y is bounded: Q j n s the number of edges in the Cartesian sum is jE (Y )j  j=1 Pi=1 di ti. And jE (2ni=1 Zi)j = ni=1 jE (Zi)j Qnj=1;j6=i jV (Zj )j. Since we have jE (Zi)j = d0i ti , jV (Zj )j = tj and m  jE (Y )j+jE (2ni=1 Zi )j we nally obtain the result. 2

5 State Reduction to Balance Complexity The transversal obtained in the previous section may be quite large. In the worst case, the set S1 is reduced to a single vertex and the complexity of the algorithm is almost O(N 3). In such a case, the resolution of the reduced system X0 (A + HC ) = 0 is as dicult as the initial problem. So we design another partition principle to more eciently balance the complexity between the reduction and the propagation phases. We present a small example to introduce the principle of this partition. Then, the complexity of the computation of the steady-state distribution is given and some considerations on the application of this principle to SAN are presented. Assume that we have divided the set of vertices into two set S0 and S1 such that S0 is associated to a transversal. Assume that there exists a directed cycle of length 2. Let v0 and v1 the two vertices of this cycle and let v0 the vertex which is in the set S0 . Assume that the only edge leaving v1 goes to v0 . The key idea is to move v0 out of the set S0 . We consider a new partition of the vertices into four sets : R0 ; R1; R2; R3 such that  R0 = S0 ? fv0g.  R2 = fv0; v1g 14

 R is the set of vertices which are the predecessors of v and v in G?R ?R .  R is the set of vertices which are the successors of v and v in G ? R ?R . The sets R and R may be empty. Clearly, the block D associated to the union of the sets R , R and R is a block triangular matrix and the computation of D? is easy. Furthermore, the complexity of the resolution 1

0

0

2

3

0

1

0

1

2

1

3

1

1

2

3

may be improved by this new partition. Indeed, the complexity is now O((N0 ? 1)3 + 23 + m(N0 ? 1)) rather than O(N03 + mN0). If N0 is large enough, the new partition leads to a smaller complexity than the previous one. So it may be possible to more eciently balance the computation for bad structured problems with large transversals. We propose now a generalization of this example. We divide the vertices into a partition (S0 ; S1; : : :; Sn ) such that for every directed cycle of the graph, either a vertex of the cycle is in S0, or all the vertices of the directed cycle are in the same Si . Then, we may decompose Q according to the partition in the following manner:

A B1 K1 B2 : : : K2 Bn?1 Bn Q= . .. C 0 0 Kn?1 0 0 Kn where A is a square matrix of size N0  N0 and matrices Ki are square matrices of size Ni  Ni. We can now give the complexity of this algorithm. The proof is omitted. Note that some results in [10] prove that the matrices Ki are not singular.

Theorem 3 This reduction algorithm computes the steady-state distribu-

tion of Markov chain with a complexity of the order of

O N0 m +

n X i=0

Ni + N0 3

! n X i=1

Ni2 :

This technique may be applied to a larger family of SAN. Several sucient conditions have been obtained to prove that the graph can be divided 15

eciently using this new principle. These conditions allow that some of the digraphs Zi contain small directed cycles. Brie y, If there is a cycle in Zi then there will be Ti cycles in the global graph and each cycle in the global graph is associated to a set of our partition. Further researches are still under progress to obtain more general heuristics to balance the complexity.

6 Parametric Analysis of SAN Quite often, performance evaluation of a system implies an analysis for large number of values for some parameters. In the context of Markov chains analysis, this means that some edges of the graph are labeled with parameters. Doing the analysis for two sets of values for the parameters, one may avoid to do the same computation twice. So, we present now a new partition principle which allows the ecient computation of steady-state distribution for Markov chains with some parameters. We assume that p edges of the graph are labeled with p parameters (1; : : :; p) which may be equal. Note that the number of parameters means the number of edges labeled with a parameter, even if these labels are all the same. We also denote as a parametric vertex, a vertex u such that Q[u; u] contains at least one parameter. Let us remark that if u is a parametric vertex then it exists an edge [u; v ] with parameter i but the converse may be wrong because the sum of two parameters may be a constant. Lemma 8 (obvious) Let ([u1; v1]; : : :; [up; vp]) be the edges with parameters (1; : : :; p). If we make a partition of the states in (S!0; S1) and consequently A B such that: a partition of the matrix Q in four blocks C D 1. S0 contains a transversal of the directed cycles of G, 2. 8i 2 [1::p], vi 2 S0 , 3. 8i 2 [1::p], if ui is a parametric vertex then ui 2 S0 . then D is upper triangular, all the parameters are elements of the blocks A or C and the computation of H = BD?1 can be done exactly once since B and D do not contain any parameters.

Note that the partition proposed by Li and Georganas in [9] is quite di erent since all the parameters are in A. This is due to their resolution algorithm which is based on exact aggregation of the Markov chain. 16

To apply this approach to chains associated to SAN, one must take into account the multiplication e ect of the Cartesian product and sum. Indeed, if  is a parameter on a transition on automaton Ai , this parameter will appear several times in the global graph. The two propositions give more precise results on the number of parameters in a graph generated by one parameter in an automaton.

Proposition 4 If parameter  is a label on an edge of theQsubgraph Yi;j , then the number of edges with parameter  in the graph G is nk ;k6 i jE (Yk;j )j. Proposition 5 If parameter  is a label on an edge of theQsubgraph Zi, then the number of edges with parameter  in the graph G is nk ;k6 i jV (Zk )j. Q Q Usually k6 i jV (Zk )j is very large (i.e. almost the state space) but k6 i jE (Yk;j )j may be quite small. So we restrict ourselves to the case of SAN with =

=1

=

=1

=

=

parameters on synchronization edges. In this case, the resolution algorithm is a simple extension of the former algorithm. It consists of three steps. Step 1 The partition into S0 and S1: { we initialize S0 with the vertices of Y which are the terminal vertices of the edges labeled with parameters, { we add in S0 the parametric vertices, { we add in S0 an edge cover of the remaining edges of Y . Step 2 The reduction on S0 which consists of the computation of H = BD?1 . Step 3 The resolution on S0 and the propagation to S1 for each set of parameters values. Clearly if the parameters (1; 2; : : :; p) takes K di erent values, then step 2 is only done once. This implies a substantial reduction of the complexity of the analysis. Note that one may even found analytical results using a package for symbolic manipulations when the set of parameters and the number of vertices in S0 are small.

17

References [1] Buchholz P., \Numerical solution methods based on structural descriptions of Markovian models," Balbo G./Serazzi G. (Eds.), Computer performance evaluation - modelling techniques and tools, Elsevier, 1992. [2] Donatelli S., \Superposed generalized stochastic Petri nets: De nition and ecient solution", Valette R. (Ed.), Application and Theory of Petri Nets, LNCS, Vol. 815, pp. 258{277. [3] Feinberg B. N. and Chiu, S. S. \A method to calculate steady-state distributions of large Markov chains by aggregating states," Oper. Res. Vol. 35, pp. 282{290, 1987. [4] Fourneau J.-M., Kloul L., Mokdad L. and Quessette F., \A new tool to model parallel systems and protocols," European Simulation Symposium, I_stanbul, Turkey, 1994. [5] Fourneau J.-M., Kloul L., Quessette F. and and Veque V., \Performance evaluation of a simple congestion control at burst level for ATM networks," 2nd International Conference on Telecommunication Systems Modelling and Analysis, Mars 1994, Nashville, USA. [6] Fourneau J.-M., Maisonniaux H., Pekergin N. and Veque V., \Performance evaluation of bu er policies with stochastic automata networks," Workshop IFIP on Modelling and Performance Evaluation of ATM Technology, pp. 433{451, La Martinique, 1993. [7] Lazar A., \Markovian petri net protocol with product form solution," Performance Evaluation, Vol. 12, pp. 67{77, 1991. [8] Lal R. and Bhat U. N., \Reduced systems in Markov chains and their applications in queueing theory," Queueing Systems, Vol. 2, pp. 147{172, 1987. [9] Li M. and Georganas N.D., \Parametric analysis of stochastic Petri nets," 5th International Conference on Modelling Techniques and Tools for Computational Performance Evaluation, Torino, Italy, 1991. [10] Meyer C.D. \Stochastic complementation, uncoupling Markov chains, and the theory of nearly reducible systems," SIAM review, Vol. 31(2), pp. 240{272, June 1989. 18

[11] Plateau B. and Atif K., \Stochastic automata network for modeling parallel systems," IEEE Transactions on Software Engineering, 17, 1991. [12] Plateau B. and Fourneau J.-M., \A methodology for solving complex Markov models of parallel systems," Journal of Parallel and Distributed Computing, Vol. 12, pp. 370{387, 1991. [13] Plateau B., Fourneau J.-M. and Lee K.H., \Peps: A package for solving complex Markov models of parallel systems," Proceedings of the 4th Int. Conf. on Modelling Techniques and Tools for Computer Performance Evaluation, Palma de Majorca, Spain, 1988. [14] Robertazzi T., \Recursive solution of a class of non-product form protocol models," INFOCOM, 1989. [15] Shamir A., \A linear time algorithm for nding minimum cutsets in reducible graph," Siam J. Comput., Vol. 8, No. 4, 1979.

19