scieee AI-readable full text Open interactive document viewer

Computing the expected Markov reward rates with stationarity detection and relative error control

Suñé, Víctor

Abstract

By combining in a novel way the randomization method with the stationary detection technique, we develop two new algorithms for the computation of the expected reward rates of finite, irreducible Markov reward models, with control of the relative error. The first algorithm computes the expected transient reward rate and the second one computes the expected averaged reward rate. The algorithms are numerically stable. Further, it is argued that, from the point of view of run-time computational cost, for medium-sized and large Markov reward models, we can expect the algorithms to be better than the only variant of the randomization method that allows to control the relative error and better than the approach that consists in employing iteratively the currently existing algorithms that use the randomization method with stationarity detection but allow to control the absolute error. The performance of the new algorithms is illustrated by means of examples, showing that the algorithms can be not only faster but also more efficient than the alternatives in terms of run-time computational cost in relation to accuracy.

Full text

Noname manuscript No. (will be inserted by the editor) Computing the Expected Markov Reward Rates with Stationarity Detection and Relative Error Control V´ıctor Su˜n´e the date of receipt and acceptance should be inserted later Abstract By combining in a novel way the randomization method with the stationary detection technique, we develop two new algorithms for the computation of the expected reward rates of finite, irreducible Markov reward models, with control of the relative error. The first algorithm computes the expected transient reward rate and the second one computes the expected averaged reward rate. The algorithms are numerically stable. Further, it is argued that, from the point of view of run-time computational cost, for medium-sized and large Markov reward models, we can expect the algorithms to be better than the only variant of the randomization method that allows to control the relative error and better than the approach that consists in employing iteratively the currently existing algorithms that use the randomization method with stationarity detection but allow to control the absolute error. The performance of the new algorithms is illustrated by means of examples, showing that the algorithms can be not only faster but also more efficient than the alternatives in terms of run-time computational cost in relation to accuracy. Keywords Markov reward model, Markov chain, expected reward rate, relative error, randomization, stationarity detection. Mathematics Subject Classification (2000) 60J28, 60J22, 65C40. 1 Introduction Consider a finite Markov reward model (MRM) consisting of a finite, irreducible (time homogeneous) continuous-time Markov chain (CTMC) X = {X ( t ) , t ≥ 0 } with infinitesimal generator and a reward rate vector r = ( ri ) whose i th entry has the meaning of “rate” at which reward is earned while X is in state i . In this paper, we will be concerned with the computation of the expected transient reward rate at time t , t > 0, ETRR ( t ) = E [ rX(t) ], and the expected averaged reward rate in the time interval [0 , t ], t > 0, EARR ( t ) = E [(1 /t ) Rt 0rX(τ) d τ ]. To illustrate the usefulness of ETRR ( t ) and EARR ( t ), consider a CTMC modeling a fault-tolerant system that can be up or down and assume that a reward rate 1 is assigned to the states in which the system is up and a reward rate 0 is assigned to the states in which the system is down. Then, ETRR ( t ) would be the availability of Departament d’Enginyeria Electr`onica Universitat Polit`ecnica de Catalunya Colom, 1, 08222 Terrassa Catalonia, Spain Tel.: +034-93-7398219, Fax: +034-93-7398225 E-mail: [email protected] 2 V´ıctor Su˜n´e the system at time t , i.e., the probability that the system is up at time t , and EARR ( t ) would be the expected interval availability at time t , i.e., the expected fraction of the time interval [0 , t ] in which the system is up. We will assume that all reward rates are nonnegative and, to avoid trivialities, that at least one of them is nonnull. Since X is irreducible, this implies that, for t > 0, both ETRR ( t ) and EARR ( t ) are positive. The assumption that there are not negative reward rates is not a true restriction as it can be easily circumvented (Carrasco, 2004). Both ETRR ( t ) and EARR ( t ) can be computed with well-controlled error using the randomization method (also called uniformization) (Grassmann, 1977; Gross and Miller, 1984) and variants (van Moorsel and Sanders, 1994; Sericola, 1999; Carrasco, 2003a, 2004; Su˜n´e and Carrasco, 2005; Sidje et al., 2007). Almost all these variants allow to compute ETRR ( t ) and EARR ( t ) with control of the absolute error, which is not always satisfactory. The reason is that if ETRR ( t ) and EARR ( t ) have to be computed with prescribed relative accuracy, then one has to use those algorithms iteratively until the accuracy requirement is fulfilled. To the best of the author’s knowledge, the only variants that allow to compute ETRR ( t ) and EARR ( t ) with control of the relative error are the implementations of the randomization method developed in (Su˜n´e and Carrasco, 2005). However, like most randomization-based methods, when the time t at which ETRR ( t ) and EARR ( t ) have to be computed is large, those implementations tend to have high run-time computational cost. In the case of finite, irreducible MRMs with infinitesimal generator, the run-time computational cost of the randomization method can be reduced by using the so-called stationarity detection technique. Broadly speaking, the technique consists in detecting when the underlying CTMC is close enough to its stationarity regime so that the computations can be stopped and, therefore, can result in significant reductions of the run-time computational cost when t is large. The stationarity detection technique has already been combined with the randomization method to develop algorithms for the computation of ETRR ( t ) and EARR ( t ) (Sericola, 1999) which can be much faster than most randomization-based algorithms. 1 But, those algorithms allow to control the absolute error. Currently, then, to compute ETRR ( t ) and EARR ( t ) with prescribed relative accuracy, one can use the implementations of the randomization method developed in (Su˜n´e and Carrasco, 2005), which, as previously commented, can be very slow when the time t is large, or else can use iteratively the algorithms developed in (Sericola, 1999), an approach that is not completely satisfactory either because unless a good estimate for ETRR ( t ) and EARR ( t ) is available, it can be necessary to execute the algorithms twice or more times, thus (partially) offsetting the reduction in run-time computational cost brought up by the stationarity detection technique. In this paper, by combining in a novel way the randomization method with the stationarity detection technique proposed in (Sericola, 1999), we develop two new algorithms, one for the computation of ETRR ( t ) and another for the computation of EARR ( t ), with control of the relative error. The algorithms are numerically stable. Compared with the implementations of the randomization method developed in (Su˜n´e and Carrasco, 2005) and the approach that consists in using iteratively the algorithms developed in (Sericola, 1999), the algorithms can be expected to have, for medium-sized and large MRMs, a lower run-time computational cost. Besides, when accuracy is taken into account, the algorithms can be substantially more efficient in the sense of being able to achieve the same accuracy with a much lower run-time computational cost. The rest of the paper is organized as follows. The algorithms are developed in Sections 2 and 3. In Section 4, we discuss the numerical stability and the run-time computational cost of the proposed algorithms. In Section 5, we illustrate the performance of the algorithms and compare them with the alternatives. Finally, in Section 6 we present some conclusions. The Appendix collects the proofs of the theoretical results on which the new algorithms are based. 1 In (Sericola, 1999), ETRR ( t ) and EARR ( t ) are referred to as point performability and expected interval perform-ability, respectively. Title Suppressed Due to Excessive Length 3 2 Computation of ETRR(t) First, we introduce some notations. We will denote by α the initial probability distribution vector of X and by A = ( ai,j ) its infinitesimal generator. The probability of having j≥ 0 arrivals in a Poisson distribution with parameter λ > 0 will be denoted Pj ( λ ) = e −λλj/j !. In addition, we will denote by I the identity matrix, by bxc the largest integer nonlarger than x , by T the transpose operator, by rmin the minimal reward rate miniri , by rmax the maximal reward rate maxiri , by ε a positive relative error tolerance, and by δa positive quantity 1. Let Λ≥maxi|ai,i| and B = I + (1 /Λ ) A and define, for k≥ 0, c(k) = ( c(k) i ) = Bk ( r/rmax ) and vk = αTc(k) . Using the well-known randomization result (see, e.g., (Kijima, 1997, Theorem 4.19)), we can write ETRR(t) = αTeAtr = ∞ X j=0 αTBje−Λt (Λt)j j!r =rmax ∞ X j=0 αTBjr rmax e−Λt (Λt)j j! =rmax ∞ X j=0 αTc(j)Pj(Λt) =rmax ∞ X j=0 vjPj(Λt).(1) Let π denote the steady-state probability distribution vector of X . If Λ > maxi|ai,i| , as k→ ∞ each entry of the vector c(k) tends to its stationary value πTr/rmax (Sericola, 1999). Formally, for every state iof X, lim k→∞ c(k) i=πTr/rmax .(2) In (Sericola, 1999), the above limit was turned into a practical test for stationarity detection by proving that, given the sequences {mk= minic(k) i}and {Mk= maxic(k) i}, we have vj−mk+Mk 2≤Mk−mk 2, j ≥k≥0,(3) and, therefore, given k≥ 0, the approximation for ETRR ( t ) that results from replacing in (1) all vj , j > k, by (mk+Mk)/2, \ ETRR(t, k) = rmaxk X j=0 vjPj(Λt) + mk+Mk 21− k X j=0 Pj(Λt),(4) has well-controlled error ETRR(t)− \ ETRR(t, k)≤rmax Mk−mk 21− k X j=0 Pj(Λt).(5) The new algorithm is based on (1) , (3) . We start by noting that, since, as assumed, X is irreducible and rmax >0, we have Mk>0, k ≥0,(6) 4 V´ıctor Su˜n´e implying mk + Mk> 0, k≥ 0. Therefore, by (4) , we have \ ETRR ( t, k ) > 0, t > 0, k≥ 0, and can then define the relative error incurred by approximating ETRR(t) by \ ETRR(t, k), t > 0, k≥0, as  ETRR(t)− \ ETRR(t, k) \ ETRR(t, k)=|ETRR(t)− \ ETRR(t, k)| \ ETRR(t, k). Trivially, to make that relative error nonlarger than ε , the index k much be such that |ETRR ( t ) − \ ETRR(t, k)| ≤ ε \ ETRR(t, k). By (4), (5), to satisfy the previous inequality it is sufficient that Mk−mk≤2Pk j=0 vjPj(Λt) 1−Pk j=0 Pj(Λt)+mk+Mkε . (7) Since, by (2) , limk→∞ ( Mk−mk ) = 0, (6) Mk> 0, k≥ 0, and ε > 0, there exist infinitely many indices k satisfying Inequality (7) and ETRR ( t ) could be computed with relative error ≤ε by using (4) with k set to the minimal of those indices. However, that scheme would not be completely satisfactory because of the potential numerical cancellations involved in the computation in (4) of the term 1 −Pk j=0 Pj ( Λt ) (Inequality (7) can be easily rewritten to avoid the computation of that term) when the sum Pk j=0 Pj ( Λt ) is close to 1. To avoid those potential numerical cancellations, we will replace 1 −Pk j=0 Pj ( Λt ) by a lower bound that does not involve significant cancellations and will tighten Inequality (7) to offset the additional error introduced by the bound. The lower bound is h1− k X j=0 Pj(Λt)ilb =(1−Pk j=0 Pj(Λt) if Pk j=0 Pj(Λt)≤0.9 PR1 j=k+1 Pj(Λt) otherwise ,(8) where R1= min nr≥k+ 1 : 1 r+3−Λt r+3 r+2 r+ 2 + Λt r+3−Λt Pr+1(Λt) Pr j=k+1 Pj(Λt)≤δo.(9) Proposition 1 below shows that [1 −Pk j=0 Pj ( Λt )] lb bounds 1 −Pk j=0 Pj ( Λt ) from below with a relative error ≤δ. Proposition 1 Assume t > 0 ,k≥ 0 , and δ > 0 . Then, the truncation parameter R1given by (9) is finite and [1 −Pk j=0 Pj(Λt)]lb defined by (8) satisfies 0≤1−Pk j=0 Pj(Λt)−[1 −Pk j=0 Pj(Λt)]lb 1−Pk j=0 Pj(Λt)≤δ . (10) That the computation of the lower bound [1 −Pk j=0 Pj ( Λt )] lb will not involve significant numerical cancellations can be shown as follows. If Pk j=0 Pj ( Λt ) ≤ 0 . 9, then [1 −Pk j=0 Pj ( Λt )] lb = 1 −Pk j=0 Pj ( Λt ) ≥ 0 . 1, and, therefore, [1 −Pk j=0 Pj ( Λt )] lb can be computed without significant numerical cancellations. If Pk j=0 Pj ( Λt ) > 0 . 9, then [1 −Pk j=0 Pj ( Λt )] lb = PR1 j=k+1 Pj ( Λt ) and the only subtractions are the ones involved in the computation of the term r + 3 −Λt in (9) . Those subtractions, however, will not involve significant numerical cancellations because, using the fact that the median of a Poisson distribution with parameter Λt is nonsmaller than Λt −log 2 (Choi, 1994), in (9) we will have k≥Λt −log 2, implying r + 3 −Λt ≥k + 4 −Λt ≥Λt −log 2+4 −Λt > 3. If in (4) we now replace the term 1 −Pk j=0 Pj ( Λt ) by the lower bound [1 −Pk j=0 Pj ( Λt )] lb , we obtain the new approximation \ ETRR(t, k) = rmaxk X j=0 vjPj(Λt) + mk+Mk 2h1− k X j=0 Pj(Λt)ilb.(11) Title Suppressed Due to Excessive Length 5 Let ε0=1−δ1 + 1 εε=ε(1 −δ)−δ . (12) To offset the additional error introduced by the lower bound [1 −Pk j=0 Pj ( Λt )] lb , we require k in (11) to satisfy Mk−mk≤2Pk j=0 vjPj(Λt) 1−Pk j=0 Pj(Λt)ε+ (mk+Mk)ε0(13) instead of (7). Then, defining K1= min k≥0 : Inequality (13) holds,(14) we have the following result. Proposition 2 Let t,t0, 0 < t0≤t, and assume 0 < δ < 1 ,ε > δ/ (1 −δ ) . Then, the truncation parameter K1given by (13),(14) is finite and \ ETRR ( t0, K1 ) given by (11) with treplaced by t0and k replaced by K1satisfies  ETRR(t0)− \ ETRR(t0, K1) \ ETRR(t0, K1) ≤ε . We are now in a position to describe the proposed algorithm for the computation of ETRR ( t ) for a set of n , n≥ 1, time points 0 < t1<· · · < tn . First, we obtain the integer K1 using (14) with t set to the largest time point tn . To avoid the numerical cancellations potentially involved in the computation of the term 1 −Pk j=0 Pj ( Λt ) in Inequality (13) , that inequality is used in its equivalent form Mk1 + ε0 k X j=0 Pj(Λt)+mk(1 + ε0) k X j=0 Pj(Λt) ≤Mkk X j=0 Pj(Λt) + ε0+mk(1 + ε0) + 2ε k X j=0 vjPj(Λt).(15) By Proposition 2, the integer K1thus obtained is such that  ETRR(ti)− \ ETRR(ti, K1) \ ETRR(ti, K1) ≤ε for all ti , 0 < ti≤tn . Therefore, once K1 is known, we compute \ ETRR ( ti, K1 ), 1 ≤i≤n , using (8) , (9) , (11) with t replaced by ti and k replaced by K1 . Finally, since ETRR ( ∞ ) = πTr and (Sericola, 1999) mk≤πTr/rmax ≤Mk, k ≥0,(16) we also compute the bounds rmaxmK1≤ETRR ( ∞ ) ≤rmaxMK1 . A detailed description of the algorithm follows. 6 V´ıctor Su˜n´e Algorithm 1: Computation of ETRR ( t ) with control of the relative error using the randomization method with stationarity detection. input :r,α,B,Λ,δ, 0 < δ < 1, ε,ε > δ/(1 −δ), n,n≥1, 0 < t1<· · · < tn output : ETRR(ti), 1 ≤i≤n; bounds for ETRR(∞) 1rmin := miniri; 2rmax := maxiri; 3c(0) := r/rmax; 4m0:= rmin/rmax; 5M0:= 1; 6v0:= αTc(0); 7ε0:= ε(1 −δ)−δ; 8k:= 0; 9while Inequality (15) with treplaced by tndoes not hold do 10 k:= k+ 1; 11 c(k):= Bc(k−1); 12 mk:= minic(k) i; 13 Mk:= maxic(k) i; 14 vk:= αTc(k); 15 end 16 K1:= k; 17 i:= n; 18 while i≥1do 19 Approximate ETRR(ti) by \ ETRR(ti, K1) computed using (8), (9), (11) with t replaced by tiand kreplaced by K1; 20 i:= i−1; 21 end 22 rmaxmK1≤ETRR(∞)≤rmaxMK1; Since the parameter δ in Algorithm 1 must be positive and the larger it is, making ε0 smaller, the larger K1 can be, in practice one will use the algorithm with δ set to a positive quantity  1, e.g., some multiple of the machine epsilon. To conclude this section, we note that the bounds rmaxmK1 and rmaxMK1 computed by the proposed algorithm can be used to approximate ETRR ( ∞ ) by \ ETRR ( ∞, K1 ) = rmax ( mK1 + MK1 ) / 2. Since (Sericola, 1999) |ETRR ( ∞ ) −rmax ( mk + Mk ) / 2 | ≤ rmax ( Mk−mk ) / 2, k≥ 0, the incurred relative error will satisfy  ETRR(∞)− \ ETRR(∞, K1) \ ETRR(∞, K1)≤MK1−mK1 MK1+mK1 .(17) For large enough Λtn , we can expect that error to be close to ε . Indeed, it is easy to check that, for a fixed value of k , the function ( Pk j=0 vjPj ( Λt )) / (1 −Pk j=0 Pj ( Λt )) decreases to 0 as Λt → ∞ . Therefore, by (13) , (14) , for large enough Λtn , the parameter K1 will be almost independent of Λtn , satisfying MK1−mK1≈(mK1+MK1)ε0and, consequently, we will have  ETRR(∞)− \ ETRR(∞, K1) \ ETRR(∞, K1)≤MK1−mK1 MK1+mK1 ≈ε0< ε . Title Suppressed Due to Excessive Length 7 3 Computation of EARR(t) Using EARR ( t ) = (1 /t ) Rt 0ETRR ( τ ) d τ , (1) , and Rt 0Pl ( Λτ ) d τ = (1 /Λ ) P∞ j=l+1 Pj ( Λt ), we obtain the well-known result EARR(t) = 1 tZt 0 ETRR(τ) dτ =rmax ∞ X l=0 1 tZt 0 vlPl(Λτ) dτ =rmax ∞ X l=0 vl 1 Λt ∞ X j=l+1 Pj(Λt) =rmax ∞ X l=0 vl ∞ X j=l 1 j+ 1Pj(Λt) =rmax ∞ X j=0 1 j+ 1 j X l=0 vlPj(Λt) =rmax ∞ X j=0 wjPj(Λt),(18) where wj=1 j+ 1 j X l=0 vl.(19) Again, as in (Sericola, 1999), given some k , k≥ 0, we will replace all vj , j > k , in (18) by ( mk + Mk ) / 2, obtaining the approximation for EARR(t), \ EARR(t, k) = rmaxk X j=0 wjPj(Λt) + ∞ X j=k+1 1 j+ 1k X l=0 vl+ j X l=k+1 mk+Mk 2Pj(Λt).(20) Since, by (6) , mk + Mk> 0, k≥ 0, we have \ EARR ( t, k ) > 0, t > 0, k≥ 0, and can then define the relative error incurred by approximating EARR(t) by \ EARR(t, k) as  EARR(t)− \ EARR(t, k) \ EARR(t, k)=|EARR(t)− \ EARR(t, k)| \ EARR(t, k). For that relative error to be nonlarger than ε, the index kmust be such that |EARR(t)− \ EARR(t, k)| ≤ ε \ EARR(t, k).(21) For that inequality to be useful, we need computable expressions for \ EARR ( t, k ) and |EARR ( t ) − \ EARR(t, k)|. Let us start with \ EARR(t, k). By combining (19), (20), and ∞ X j=k+1 j−k j+ 1Pj(Λt) = ∞ X j=k+1 j+ 1 −(k+ 1) j+ 1 Pj(Λt) = ∞ X j=k+1 Pj(Λt)−k+ 1 Λt ∞ X j=k+2 Pj(Λt) 8 V´ıctor Su˜n´e =Pk+1(Λt) + Λt −(k+ 1) Λt 1− k+1 X j=0 Pj(Λt),(22) we obtain \ EARR(t, k) = rmaxk X j=0 wjPj(Λt) + ∞ X j=k+1 k+ 1 j+ 1 wk+j−k j+ 1 mk+Mk 2Pj(Λt) =rmaxk X j=0 wjPj(Λt) + k+ 1 Λt wk ∞ X j=k+2 Pj(Λt) + mk+Mk 2 ∞ X j=k+1 j−k j+ 1Pj(Λt) =rmaxk X j=0 wjPj(Λt) + k+ 1 Λt wk1− k+1 X j=0 Pj(Λt)+mk+Mk 2Pk+1(Λt) +Λt −(k+ 1) Λt 1− k+1 X j=0 Pj(Λt).(23) With regard to |EARR(t)− \ EARR(t, k)|, using (3), (18), (19), (20), and (22), we get EARR(t)− \ EARR(t, k) =rmaxk X j=0 wjPj(Λt) + ∞ X j=k+1 1 j+ 1k X l=0 vl+ j X l=k+1 vlPj(Λt) −rmaxk X j=0 wjPj(Λt) + ∞ X j=k+1 1 j+ 1k X l=0 vl+ j X l=k+1 mk+Mk 2Pj(Λt) =rmax ∞ X j=k+1 1 j+ 1 j X l=k+1 vl−mk+Mk 2Pj(Λt) ≤rmax ∞ X j=k+1 1 j+ 1 j X l=k+1 vl−mk+Mk 2Pj(Λt) ≤rmax ∞ X j=k+1 1 j+ 1 j X l=k+1 Mk−mk 2Pj(Λt) =rmax Mk−mk 2 ∞ X j=k+1 j−k j+ 1Pj(Λt) =rmax Mk−mk 2Pk+1(Λt) + Λt −(k+ 1) Λt 1− k+1 X j=0 Pj(Λt).(24) Then, using (23), (24), it is easily seen that Inequality (21) holds for any index ksatisfying Mk−mk≤2Pk j=0 wjPj(Λt) + k+1 Λt wk1−Pk+1 j=0 Pj(Λt) Pk+1(Λt) + Λt−(k+1) Λt 1−Pk+1 j=0 Pj(Λt)+mk+Mkε . (25) However, in order to obtain a simpler algorithm, we will consider the inequality Mk−mk≤2Pk j=0 wjPj(Λt) Pk+1(Λt) + Λt−(k+1) Λt 1−Pk+1 j=0 Pj(Λt)+mk+Mkε , (26) Title Suppressed Due to Excessive Length 9 which, since 1 −Pk+1 j=0 Pj(Λt)>0, is more restrictive than (25). Since, by (2) , limk→∞ ( Mk−mk ) = 0, (6) Mk> 0, and ε > 0, there are infinitely many indices k satisfying (26) and EARR ( t ) could be computed with relative error ≤ε by using (23) with k set to the minimal of those indices. This, however, could be problematic because of the numerical cancellations potentially involved in the computation of the terms 1 −Pk+1 j=0 Pj ( Λt ) and Pk+1 ( Λt ) + (( Λt − ( k + 1)) / ( Λt ))(1 −Pk+1 j=0 Pj ( Λt )) (Inequality (26) can be easily rewritten to avoid the computation of the latter term). To avoid those potential numerical cancellations, we will replace those terms by appropriate lower bounds not involving significant cancellations and will modify Inequality (26) appropriately. The term 1 −Pk+1 j=0 Pj(Λt) will be replaced by h1− k+1 X j=0 Pj(Λt)ilb =(1−Pk+1 j=0 Pj(Λt) if Pk+1 j=0 Pj(Λt)≤0.9 PR2 j=k+2 Pj(Λt) otherwise ,(27) where R2= min nr≥k+ 2 : 1 r+3−Λt r+3 r+2 r+ 2 + Λt r+3−Λt Pr+1(Λt) Pr j=k+2 Pj(Λt)≤δo,(28) and, recalling (22) , the term Pk+1 ( Λt ) + (( Λt − ( k + 1)) / ( Λt ))(1 −Pk+1 j=0 Pj ( Λt )) = P∞ j=k+1 (( j− k)/(j+ 1))Pj(Λt) will be replaced by h∞ X j=k+1 j−k j+ 1Pj(Λt)ilb =           Pk+1(Λt) +Λt −(k+ 1) Λt 1− k+1 X j=0 Pj(Λt) if k +1 ≤Λt or else 1 − 0 . 9 Λt k+1−Λt Pk+1 ( Λt ) ≤ Pk+1 j=0 Pj(Λt)≤0.9 PR3 j=k+1 j−k j+1 Pj(Λt) otherwise ,(29) where R3= min nr≥k+ 1 : 1 r+3−Λt r+3 r+2 r+ 1 −k+Λt r+3−Λt Pr+1(Λt) Pr j=k+1 j−k j+1 Pj(Λt)≤δo.(30) The factor Λt − ( k + 1) in (29) will be computed accurately by casting it as the dot product ( Λ, k + 1)( t, − 1) and computing that dot product using Algorithm 5.3 in (Ogita et al., 2005). By Proposition 3 below, [1 −Pk+1 j=0 Pj ( Λt )] lb bounds 1 −Pk+1 j=0 Pj ( Λt ) from below with a relative error ≤δ and [ P∞ j=k+1 (( j−k ) / ( j +1)) Pj ( Λt )] lb bounds Pk+1 ( Λt )+(( Λt− ( k +1)) / ( Λt ))(1 −Pk+1 j=0 Pj ( Λt )) from below with a relative error ≤δ. Proposition 3 Let t > 0 ,k≥ 0 , and δ > 0 . Then, the truncation parameters R2and R3given by, respectively, (28) and (30) are finite, [1 −Pk+1 j=0 Pj(Λt)]lb defined by (27) satisfies 0≤1−Pk+1 j=0 Pj(Λt)−[1 −Pk+1 j=0 Pj(Λt)]lb 1−Pk+1 j=0 Pj(Λt)≤δ , (31) and [P∞ j=k+1((j−k)/(j+ 1))Pj(Λt)]lb defined by (29) satisfies 0≤Pk+1(Λt) + Λt−(k+1) Λt 1−Pk+1 j=0 Pj(Λt)−P∞ j=k+1 j−k j+1 Pj(Λt)lb Pk+1(Λt) + Λt−(k+1) Λt 1−Pk+1 j=0 Pj(Λt)≤δ . (32) 16 V´ıctor Su˜n´e ≤rmax(MK2−mK2)PK2+1(Λt) + Λt−(K2+1) Λt (1 −PK2+1 j=0 Pj(Λtn)) rmax PK2 j=0 wjPj(Λtn) ≤2ε+PK2+1(Λt) + Λt−(K2+1) Λt (1 −PK2+1 j=0 Pj(Λtn)) PK2 j=0 wjPj(Λtn)(mK2+MK2)ε0 = 2ε+P∞ j=K2+1 j−K2 j+1 Pj(Λt) PK2 j=0 wjPj(Λtn)(mK2+MK2)ε0. which is >2ε. Therefore, taking into account that, by (22), (Mk−mk)Pk+1(Λt) + Λt −(k+ 1) Λt 1− k+1 X j=0 Pj(Λt) = (Mk−mk)1− k X j=0 Pj(Λtn)−k+ 1 Λtn1− k+1 X j=0 Pj(Λtn) ≤(Mk−mk)1− k X j=0 Pj(Λtn) ≤min n1− k X j=0 Pj(Λtn), Mk−mk)o, that, again by (22) , the left-hand side of the above inequality is decreasing on k , and that 1 /min1≤i≤n \ EARR(S2) ( ti ) ≥ 1 / \ EARR(S2) ( tn ), we can expect K2≤min{N(S2), K(S2)} ≤ PS2 j=1 min{N(j), K(j)} . Further, given the way Algorithm SE2 works, we can expect S2 = 1 if min1≤i≤nEARR ( ti ) is not smaller than ( rmin + rmax ) / 2 and otherwise can expect S2≥ 2. Therefore, we also conclude that, for medium-sized and large MRMs, we can expect the run-time computational cost of Algorithm 2 to be lower than that of Algorithm SE2 and that the smaller min1≤i≤nEARR ( ti ) than ( rmin + rmax ) / 2, the larger we can expect the difference in run-time computational cost to be. 5 Numerical Experiments In this section, we will illustrate the performances of Algorithms 1 and 2. We will also compare the performance of Algorithm 1 with the performances of Algorithms SC1 and SE1 and will compare the performance of Algorithm 2 with the performances of Algorithms SC2 and SE2. 5.1 Examples We will use two MRMs. The first one is taken from (Carrasco, 2003b) and corresponds to a RAID 5 storage system (Chen et al., 1994) with the architecture shown in Figure 1. The system comprises 40 × 5 disks, 5 controllers, 3 hot spare disks, and 1 hot spare controller. The disks are organized into 40 parity groups with 5 disks each. Each controller controls a string of 40 disks. A disk is said to be unavailable if it has failed, or the controller of the string the disk belongs to has failed, or the data in the disk is out of date. The system is in a failed state if there is any parity group in which two or more disks are unavailable. The data of a non-failed disk becomes out of date if it is a disk that has just replaced a failed one or it belongs to a string of disks whose controller was failed and has just been replaced. Out-of-date disks become up-to-date after a reconstruction process that proceeds at a rate of 1 h −1 . That process has a success probability 0.999 and can take place only Title Suppressed Due to Excessive Length 17 1 2 40 parity group controller 2 ... controller 5 ... ... controller 1 ... Fig. 1 Architecture of the RAID 5 storage system. when the system is in a non-failed state. All disks of a parity group involved in a reconstruction process fail at a rate of 2 × 10 −5 h −1 . Disks not involved in a reconstruction process fail at a rate of 1 × 10 −5 h −1 . Controllers fail at a rate of 5 × 10 −5 h −1 . There is one repair person that, if hot spares are available, replaces failed disks and controllers at a rate of 4 h −1 , with priority given to controllers. There is an unlimited number of repair persons that replace used hot spares and failed disks and controllers when no hot spares are available at a rate of 0 . 25 h −1 . When the system is in a failed state, no components fail or are repaired and the only repair action is one that brings the system to its fully operational state, with all disks in the parity groups available and all hot spares available, at a rate of 0 . 25 h −1 . The initial probability is one for the fully operational state and is zero for the remaining states. As in (Carrasco, 2003b), we assume that if unavailable disks do not belong to the same string, when one of them becomes available the remaining unavailable disks still belong to different strings whenever their number is ≥2. The CTMC has 14 081 states and 94 405 transition rates. The reward rates are ri = 1 for the nonfailed states and ri = 0 for the failed states. With those reward rates, ETRR ( t ) is the availability of the system at time t (probability that the system is not failed at time t ) and EARR ( t ) is the expected interval availability of the system in the time interval [0 , t ] (expected fraction of the time interval in which the system is not failed). In addition, rmin = 0, and rmax = 1. The second MRM, adapted from (Carrasco, 2015), corresponds to two FIFO queues working in tandem. Each queue has a buffer with capacity for N = 100 tasks. Tasks arrive on the first queue with rate λ = 2 h −1 . When a task of the first queue is served, it is delivered to the second queue unless it is full, in which case the task is blocked until there is room for it in the second queue. The service rates are µF = 2 . 2 h −1 for the first queue and µS = 2 . 5 h −1 for the second one. The initial probability is one for the state in which there are no tasks in the system and is zero for the remaining states. The CTMC has 10 301 states and 30 499 transition rates. Its state transition diagram is shown in Figure 2, where the states in which there are i tasks in the first queue and j tasks in the second one and no task is blocked are labeled “ i , j ”, and the states in which there are i tasks in the first queue, N tasks in the second queue, and a task of the first queue is blocked are labeled “ i ’, N ”. The reward rates are the number of tasks in the system. With those reward rates, ETRR ( t ) is the expected number of tasks in the system at time t and EARR ( t ) is the expected average number of tasks in the system in the time interval [0 , t ]. Besides, rmin = 0, and rmax = 200. 5.2 Results All algorithms were implemented using the C programming language, with all floating-point computations performed using the IEEE754-1985 (IEEE754) double format, and were compiled using the standard GNU compiler collection C-compiler (Stallman et al., 2012) with the O2 optimization option. The input parameter δ of the proposed algorithms was set to 10 3× 2 −52 . In all cases, Poisson 18 V´ıctor Su˜n´e 0,0 µS µS λ µSµS µF µF ... ... λ µF 1,0 λ µS µS µS 0,1 1,1 1,N0,N 1’,N λ λ λ λ µS µS µF µF ... λ µF λ µS µS ... ... λ λ N,0 N,1 N,N N0,N ... ... µS Fig. 2 State transition diagram of the queueing MRM. 10−210−1100101102103104 t(h) 0.00002 0.00003 0.00004 0.00005 0.00006 0.00007 +9.9993×10−1 ETRR(t) EARR(t) Fig. 3 ETRR(t) and EARR(t) for the RAID 5 storage system MRM. probabilities were computed using the method described in (Kn¨usel, 1986, pp. 1028–1029) (see also (Abramowitz and Stegun, 1964)) and Λ was set to Λ = θ×maxi∈S|ai,i| with θ = 1 . 001 > 1 to ensure that (2) holds. This latter setting resulted in Λ≈ 43 . 80 h −1 for the RAID 5 storage system MRM and Λ≈ 6 . 707 h −1 for the queueing MRM. All results were obtained on a workstation equipped with a four-core Intel i7-2630QM 2.00 GHz processor with 4 GB of RAM memory, using only one core. In Figures 3 and 4, we plot ETRR ( t ) and EARR ( t ) for the RAID 5 storage system MRM and the queueing MRM, respectively, obtained executing the proposed algorithms for 300 time points equally spaced in a logarithmic scale with a relative error tolerance ε = 10 −10 . We can observe that, for the first example, ETRR ( t ) “reaches” the stationary value very soon, at about t = 100 h, that Title Suppressed Due to Excessive Length 19 10−210−1100101102103104105 t(h) 0 2 4 6 8 10 12 14 ETRR(t) EARR(t) Fig. 4 ETRR(t) and EARR(t) for the queueing MRM. EARR ( t ) “reaches” the stationary value somewhat later, and that both ETRR ( t ) and EARR ( t ) are larger than ( rmin + rmax ) / 2=0 . 5. For the queueing MRM, we observe, both ETRR ( t ) and EARR ( t ) “reach” the stationary value later, between t = 1 000 h and t = 10 000 h, and are significantly smaller than (rmin +rmax)/2 = 100. We will compare the proposed algorithms with the alternatives from a triple perspective: run-time computational cost measured in terms of CPU time, relative accuracy, and run-time computational cost in relation to relative accuracy. To carry out those comparisons, we executed each algorithm for both MRMs with n = 1, tn = 5 h , 10 h ,..., 10 5 h, and ε = 10 −4, 10 −5,..., 10 −12 . The reference values for ETRR ( t ) and EARR ( t ), t = 5 h , 10 h ,..., 10 5 h, with which to compute the algorithms’ accuracy were obtained using the implementation of the randomization method described in (Su˜n´e and Carrasco, 2005, Section 1), computing Poisson probabilities using a variant of the algorithm described in (Fox and Glynn, 1988), which is numerically very stable, and performing all floatingpoint computations using the IEEE 754-2008 binary128 format (IEEE754-2008) emulated with the MPFR library (Fousse et al., 2007). (The binary128 format gives around 34 decimal digits precision as opposed to the approximately 16 decimal digits precision given by the double format.) The numbers of MVMs with matrix B required by the proposed algorithms were always smaller than the numbers of MVMs with matrix B required by the alternatives and, consequently, the CPU times of the proposed algorithms were almost always lower than those of the alternatives. In addition, the larger tn , the larger were the differences in terms of CPU time between Algorithm 1 and Algorithm SC1 and between Algorithm 2 and Algorithm SC2. As an illustration, in Tables 1, 2, 3, 4 we give the number of MVMs with matrix B and the CPU time for each of the algorithms, for ε = 10 −6, 10 −10 . The tables also illustrate the fact that, as commented in Section 4, how the runtime computational cost of Algorithm 1 compares with that of Algorithm SE1 depends on whether min1≤i≤nETRR ( ti ) ≥ ( rmin + rmax ) / 2, and how the run-time computational cost of Algorithm 2 compares with that of Algorithm SE2 depends on whether min1≤i≤nEARR ( ti ) ≥ ( rmin + rmax ) / 2. Thus, for the first MRM, for which both ETRR ( tn ) and EARR ( tn ), tn = 5 h , 10 h ,..., 10 5 h, are larger than ( rmin + rmax ) / 2=0 . 5, Algorithms SE1 and SE2 always terminated in one iteration and, as a consequence, Algorithm 1 was only slightly faster than Algorithm SE1 and Algorithm 2 was 20 V´ıctor Su˜n´e ε= 10−6ε= 10−10 tn(h) Alg. 1 Alg. SC1 Alg. SE1 Alg. 1 Alg. SC1 Alg. SE1 5285 (359) 4.80 ×10−2 297 5 . 20 × 10 −2295 4 . 80 × 10 −2313 (377) 5.20 ×10−2 323 5 . 60 × 10 −2321 5 . 20 × 10 −2 10 523 (628) 8.40 ×10−2 547 9 . 20 × 10 −2544 8 . 80 × 10 −2563 (651) 8.80 ×10−2 582 1 . 00 × 10 −1580 9 . 60 × 10 −2 100 2 293 (NC) 3.72 ×10−1 4 712 8 . 12 × 10 −12 656 4 . 32 × 10 −13 902 (NC) 6.36 ×10−1 4 817 8 . 28 × 10 −14 265 6 . 92 × 10 −1 1 000 2 293 (NC) 3.68 ×10−144 810 7.74 2 656 4 . 32 × 10 −13 902 (NC) 6.36 ×10−145 136 7.77 4 265 6 . 96 × 10 −1 10 000 2 293 (NC) 3.72 ×10−1 440 871 7.55 ×1012 656 4 . 44 × 10 −13 902 (NC) 6.32 ×10−1 441 895 7.63 ×1014 265 7 . 04 × 10 −1 100 000 2 293 (NC) 3.76 ×10−1 4 385 937 7.57 ×1022 656 5 . 24 × 10 −13 902 (NC) 6.28 ×10−1 4 389 171 7.52 ×1024 265 7 . 88 × 10 −1 Table 1 RAID 5 storage system MRM: numbers of MVMs with matrix B (top) and CPU times in seconds (bottom) required by Algorithms 1, SC1, and SE1 to compute ETRR ( tn ), n = 1. (For Algorithm 1, next to the number of MVMs we give between parenthesis the value of the truncation parameter R1 , with “NC” standing for “not computed”.) ε= 10−6ε= 10−10 tn(h) Alg. 2 Alg. SC2 Alg. SE2 Alg. 2 Alg. SC2 Alg. SE2 5269 (352, 357) 4.40 ×10−2 297 5 . 20 × 10 −2295 4 . 80 × 10 −2300 (369, 374) 5.20 ×10−2 323 5 . 60 × 10 −2321 5 . 20 × 10 −2 10 498 (617, 624) 8.00 ×10−2 547 9 . 20 × 10 −2544 8 . 80 × 10 −2544 (640, 647) 8.80 ×10−2 582 1 . 00 × 10 −1580 9 . 60 × 10 −2 100 2 293 (NC, NC) 3.72 ×10−1 4 712 8 . 08 × 10 −12 656 4 . 32 × 10 −13 902 (NC, NC) 6.36 ×10−1 4 817 8 . 32 × 10 −14 265 6 . 92 × 10 −1 1 000 2 293 (NC, NC) 3.68 ×10−144 810 7.80 2 656 4 . 36 × 10 −13 902 (NC, NC) 6.36 ×10−145 136 7.71 4 265 6 . 96 × 10 −1 10 000 2 293 (NC, NC) 3.72 ×10−1 440 871 7.66 ×1012 656 4 . 44 × 10 −13 902 (NC, NC) 6.32 ×10−1 441 895 7.60 ×1014 265 7 . 04 × 10 −1 100 000 2 293 (NC, NC) 3.72 ×10−1 4 385 937 7.56 ×1022 656 5 . 24 × 10 −13 902 (NC, NC) 6.28 ×10−1 4 389 171 7.58 ×1024 265 7 . 88 × 10 −1 Table 2 RAID 5 storage system MRM: numbers of MVMs with matrix B (top) and CPU times in seconds (bottom) required by Algorithms 2, SC2, and SE2 to compute EARR ( tn ), n = 1. (For Algorithm 2, next to the number of MVMs we give between parenthesis the value of the truncation parameters R2 and R3 , with “NC” standing for “not computed”.) ε= 10−6ε= 10−10 tn(h) Alg. 1 Alg. SC1 Alg. SE1 Alg. 1 Alg. SC1 Alg. SE1 569 (100) 4.00 ×10−3 72 4 . 00 × 10 −3135 8 . 00 × 10 −380 (108) 8.00 ×10−3 82 4 . 00 × 10 −3158 8 . 00 × 10 −3 10 115 (156) 8.00 ×10−3 118 8 . 00 × 10 −3227 1 . 60 × 10 −2130 (167) 8.00 ×10−3 133 1 . 20 × 10 −2257 2 . 00 × 10 −2 100 806 (920) 5.60 ×10−2 818 5 . 60 × 10 −21 613 1 . 12 × 10 −1848 (947) 6.00 ×10−2 858 6 . 00 × 10 −21 699 1 . 20 × 10 −1 1 000 7 009 (7 404) 4.92 ×10−1 7 156 5 . 00 × 10 −114 253 1.01 7 166 (7 490) 5.08 ×10−1 7 277 5 . 04 × 10 −114 511 1.02 10 000 15 912 (NC) 1.12 68 432 4.78 49 949 3.52 25 001 (NC) 1.77 68 808 4.81 77 212 5.43 100 000 15 912 (NC) 1.13 674 519 4.66 ×10149 949 3.57 25 001 (NC) 1.76 675 702 4.72 ×10177 212 5.50 Table 3 Queueing MRM: numbers of MVMs with matrix B (top) and CPU times in seconds (bottom) required by Algorithms 1, SC1, and SE1 to compute ETRR ( tn ), n = 1. (For Algorithm 1, next to the number of MVMs we give between parenthesis the value of the truncation parameter R1, with “NC” standing for “not computed”.) Title Suppressed Due to Excessive Length 21 ε= 10−6ε= 10−10 tn(h) Alg. 2 Alg. SC2 Alg. SE2 Alg. 2 Alg. SC2 Alg. SE2 564 (98, 99) 4.00 ×10−3 72 4 . 00 × 10 −3135 1 . 20 × 10 −276 (106, 108) 4.00 ×10−3 83 4 . 00 × 10 −3158 1 . 20 × 10 −2 10 108 (152, 155) 8.00 ×10−3 119 8 . 00 × 10 −3228 1 . 60 × 10 −2124 (163, 165) 1.20 ×10−2 133 8 . 00 × 10 −3257 2 . 00 × 10 −2 100 780 (906, 915) 5.60 ×10−2 819 6 . 00 × 10 −21 614 1 . 12 × 10 −1827 (934, 942) 6.00 ×10−2 859 6 . 00 × 10 −21 700 1 . 20 × 10 −1 1 000 6 872 (7 351, 7 379) 4.88 ×10−1 7 157 5 . 00 × 10 −114 254 1.01 7 072 (7 437, 7 465) 4.96 ×10−1 7 278 5 . 04 × 10 −114 511 1.02 10 000 15 912 (NC, NC) 1.12 68 432 4.73 49 958 3.55 25 001 (NC, NC) 1.76 68 809 4.77 77 221 5.48 100 000 15 912 (NC, NC) 1.12 674 519 4.65 ×10149 950 3.56 25 001 (NC, NC) 1.77 675 702 4.70 ×10177 212 5.52 Table 4 Queueing MRM: numbers of MVMs with matrix B (top) and CPU times in seconds (bottom) required by Algorithms 2, SC2, and SE2 to compute EARR ( tn ), n = 1. (For Algorithm 2, next to the number of MVMs we give between parenthesis the value of the truncation parameters R2 and R3 , with “NC” standing for “not computed”.) only slightly faster than Algorithm SE2. On the contrary, for the second MRM, for which both ETRR ( tn ) and EARR ( tn ), tn = 5 h , 10 h ,..., 10 5 h, are much smaller than ( rmin + rmax ) / 2 = 100, Algorithms SE1 and SE2 always required between two and three iterations and were therefore noticeably slower than, respectively, Algorithms 1 and 2. Also given in the tables are the values taken by the truncation parameters R1 , R2 , and R3 . As we can see, for the RAID 5 storage system MRM, the parameters were computed only for tn = 5 , 10 h and their values are larger than the numbers of MVMs with matrix B required by the alternatives, and for the queueing MRM, the parameters were computed for tn = 5 , 10 , 100 , 1 000 h and their values are moderately larger than the numbers of MVMs with matrix B required by Algorithms SC1 and SC2 and smaller than the numbers of MVMs with matrix B required by Algorithms SE1 and SE2. However, computing the truncation parameter (8) R1 essentially amounts to obtaining R1 + 1 −K1 additional Poisson probabilities and computing the truncation parameters (28) R2 and (30) R3 essentially amounts to obtaining max{R2, R3 + 1 } − K2 additional Poisson probabilities. Therefore, for medium-sized and large MRMs, assuming, quite reasonably, that the run-time computational cost of performing one MVM with matrix B will be substantially higher than the run-time computational cost of computing one Poisson probability, we expect the computation of those parameters to have a very small impact on the run-time computational cost of the proposed algorithms. That this is certainly the case for the two MRMs we are considering can be easily realized by comparing the CPU times required by the proposed algorithms with those required by Algorithms SC1 and SC2 in the cases in which the truncation parameters were computed. Since the proposed algorithms and the alternatives all control the approximation error relative to the computed estimate, we cannot expect Algorithms 1, SC1, and SE1 to yield the same approximation for ETRR ( t ) within the relative error tolerance nor can expect Algorithms 2, SC2, and SE2 to yield the same approximation for EARR ( t ) within the relative error tolerance. Instead, what must happen is that the error of each estimate relative to the estimate itself is nonlarger than ε . To compare, in terms of relative accuracy, Algorithm 1 with Algorithms SC1 and SE1, and Algorithm 2 with Algorithms SC2 and SE2, we computed the maximum over tn = 5 h , 10 h ,..., 10 5 h of the actual error relative to the computed estimate for each algorithm and each ε = 10 −4, 10 −5,..., 10 −12 . The results are shown in Figures 5, 6 for the RAID 5 storage system MRM and in Figures 7, 8 for the queueing MRM. As we can see, the control of the error in the proposed algorithms is very tight in the sense that the actual relative error is always very close to (but smaller than) the tolerance ε . We also see that, in almost all cases, the proposed algorithms are less accurate than the alternatives. Finally, we note that Algorithms SC1 and SC2 were unable to fulfill the accuracy requirement for 22 V´ıctor Su˜n´e 10−11 10−9 10−7 10−5 ε 10−13 10−12 10−11 10−10 10−9 10−8 10−7 10−6 10−5 10−4 maximum relative error Alg. 1 Alg. SC1 Alg. SE1 Fig. 5 RAID 5 storage system MRM: maximum over tn = 5 h , 10 h ,..., 10 5 h of the actual relative error in Algorithms 1, SC1, and SE1, as a function of ε. 10−11 10−9 10−7 10−5 ε 10−13 10−12 10−11 10−10 10−9 10−8 10−7 10−6 10−5 10−4 maximum relative error Alg. 2 Alg. SC2 Alg. SE2 Fig. 6 RAID 5 storage system MRM: maximum over tn = 5 h , 10 h ,..., 10 5 h of the actual relative error in Algorithms 2, SC2, and SE2, as a function of ε. Title Suppressed Due to Excessive Length 23 10−12 10−10 10−8 10−6 10−4 ε 10−12 10−11 10−10 10−9 10−8 10−7 10−6 10−5 10−4 maximum relative error Alg. 1 Alg. SC1 Alg. SE1 Fig. 7 Queueing MRM: maximum over tn = 5 h , 10 h ,..., 10 5 h of the actual relative error in Algorithms 1, SC1, and SE1, as a function of ε. 10−12 10−10 10−8 10−6 10−4 ε 10−12 10−11 10−10 10−9 10−8 10−7 10−6 10−5 10−4 maximum relative error Alg. 2 Alg. SC2 Alg. SE2 Fig. 8 Queueing MRM: maximum over tn = 5 h , 10 h ,..., 10 5 h of the actual relative error in Algorithms 2, SC2, and SE2, as a function of ε. 24 V´ıctor Su˜n´e 10−13 10−11 10−9 10−7 10−5 maximum relative error 100 101 102 103 cumulative CPU time (s) Alg. 1 Alg. SC1 Alg. SE1 Fig. 9 RAID 5 storage system MRM: cumulative CPU time in seconds required to compute ETRR ( tn ), tn = 5 h , 10 h ,..., 10 5 h, as a function of the maximum over tn of the actual relative error in Algorithms 1, SC1, and SE1. (In each case, the left-most symbol corresponds to ε= 10−4.) the queueing MRM with ε = 10 −11, 10 −12 . We conjecture that this anomalous behavior is due to the cumulative effect of round-off errors. The fact that the alternatives are more accurate than the proposed algorithms comes at the price of a higher run-time computational cost. Therefore, it would be fairer to compare the proposed algorithms with the alternatives from the perspective of relative accuracy in relation to run-time computational cost. To that end, in Figures 9, 10, 11, 12 we show the work-precision curves of the six algorithms. In each of these curves, the abscissa of the i th point, i = 1 , 2 ,..., 9, starting from the left, corresponds to the maximum over tn = 5 h , 10 h ,..., 10 5 h of the actual relative error when the algorithm was executed with a relative error tolerance ε = 10 −(3+i) , and the ordinate corresponds to the cumulative CPU time required by the algorithm for tn = 5 h , 10 h ,..., 10 5 h. We can now see that, in all cases, Algorithms 1 and 2 are much more efficient than Algorithms SC1 and SC2, respectively, in the sense of requiring a much smaller CPU time to achieve the same relative error, that Algorithm 1 is slightly more efficient than Algorithm SE1 for the RAID 5 storage system MRM and quite more efficient for the queueing MRM, and that, compared with Algorithm SE2, Algorithm 2 is slightly more efficient for the RAID 5 storage system MRM and quite more so for the queueing MRM. 6 Conclusions In this paper, by combining in a novel way the randomization method with the stationarity detection technique proposed in (Sericola, 1999), we have developed two new algorithms for the computation of the expected reward rates of finite, irreducible MRMs, with control of the relative error. The first algorithm computes the expected transient reward rate and the second one computes the expected averaged reward rate. We have argued that the algorithms are numerically stable and that, for medium-sized and large MRMs, we can expect the run-time computational cost of the Title Suppressed Due to Excessive Length 25 10−13 10−11 10−9 10−7 10−5 maximum relative error 100 101 102 103 cumulative CPU time (s) Alg. 2 Alg. SC2 Alg. SE2 Fig. 10 RAID 5 storage system MRM: cumulative CPU time in seconds required to compute EARR ( tn ), tn = 5 h , 10 h ,..., 10 5 h, as a function of the maximum over tn of the actual relative error in Algorithms 2, SC2, and SE2. (In each case, the left-most symbol corresponds to ε= 10−4.) 10−12 10−10 10−8 10−6 10−4 maximum relative error 100 101 cumulative CPU time (s) Alg. 1 Alg. SC1 Alg. SE1 Fig. 11 Queueing MRM: cumulative CPU time in seconds required to compute ETRR ( tn ), tn = 5 h , 10 h ,..., 10 5 h, as a function of the maximum over t of the actual relative error in Algorithms 1, SC1, and SE1. (In each case, the left-most symbol corresponds to ε= 10−4.) 32 V´ıctor Su˜n´e Then, using (27), (51), PR2+2(Λt)=(Λt/(R2+ 2))PR2+1(Λt), and (28), 1−Pk+1 j=0 Pj(Λt)−[1 −Pk+1 j=0 Pj(Λt)]lb 1−Pk+1 j=0 Pj(Λt)=P∞ j=k+2 Pj(Λt)−PR2 j=k+2 Pj(Λt) P∞ j=k+2 Pj(Λt) =P∞ j=R2+1 Pj(Λt) P∞ j=k+2 Pj(Λt) <P∞ j=R2+1 Pj(Λt) PR2 j=k+2 Pj(Λt) ≤1−Λt R2+3 −1PR2+1(Λt) + Λt R2+3 1 Λt 1−Λt R2+3 −1PR2+2(Λt) PR2 j=k+2 Pj(Λt) = 1 R2+3−Λt R2+3 R2+2 R2+2+ Λt R2+3−Λt PR2+1(Λt) PR2 j=k+2 Pj(Λt) ≤δ , showing Inequality (31) in the case Pk+1 j=0 Pj(Λt)>0.9. It remains to prove Inequality (32) . If k + 1 ≤Λt , or k + 1 > Λt and 1 − (0 . 9 Λt/ ( k + 1 −Λt )) Pk+1 ( Λt ) ≤ Pk+1 j=0 Pj ( Λt ) ≤ 0 . 9, the inequality is trivially true. Otherwise, i.e., if k + 1 > Λt , and 1 − (0 . 9 Λt/ ( k + 1 − Λt))Pk+1(Λt)>Pk+1 j=0 or Pk+1 j=0 Pj(Λt)>0.9, we clearly have, by (22), (29), 0≤P∞ j=k+1 j−k j+1 Pj(Λt)−PR3 j=k+1 j−k j+1 Pj(Λt) P∞ j=k+1 j−k j+1 Pj(Λt) =Pk+1(Λt) + Λt−(k+1) Λt 1−Pk+1 j=0 Pj(Λt)−P∞ j=k+1 j−k j+1 Pj(Λt)lb Pk+1(Λt) + Λt−(k+1) Λt 1−Pk+1 j=0 Pj(Λt). Besides, since, by (30) , R3≥k + 1 > Λt , implying R3 + 1 > Λt − 2, we can invoke Lemma 2 with r = R3 + 1, n=k+ 1, λ=Λt,m= 1, and m0= 1, obtaining ∞ X j=R3+1 1−k+ 1 j+ 1 Pj(Λt)≤1−Λt R3+ 3 −1 ×1−k+ 1 R3+ 2 PR3+1(Λt) + Λt R3+ 3 1 Λt1−Λt R3+ 3 −1PR3+2(Λt).(52) Then, using (22), (29), (52), PR3+2(Λt)=(Λt/(R3+ 2))PR3+1(Λt), and (30), Pk+1(Λt) + Λt−(k+1) Λt 1−Pk+1 j=0 Pj(Λt)−P∞ j=k+1 j−k j+1 Pj(Λt)lb Pk+1(Λt) + Λt−(k+1) Λt 1−Pk+1 j=0 Pj(Λt) =P∞ j=k+1 j−k j+1 Pj(Λt)−PR3 j=k+1 j−k j+1 Pj(Λt) P∞ j=k+1 j−k j+1 Pj(Λt) =P∞ j=R3+1 j−k j+1 Pj(Λt) P∞ j=k+1 j−k j+1 Pj(Λt) <P∞ j=R3+1 j−k j+1 Pj(Λt) PR3 j=k+1 j−k j+1 Pj(Λt) =P∞ j=R3+1 1−k+1 j+1 Pj(Λt) PR3 j=k+1 j−k j+1 Pj(Λt) ≤1−Λt R3+3 −11−k+1 R3+2 PR3+1(Λt) + Λt R3+3 1 Λt 1−Λt R3+3 −1PR3+2(Λt) PR3 j=k+1 j−k j+1 Pj(Λt) Title Suppressed Due to Excessive Length 33 ≤ 1 R3+3−Λt R3+3 R3+2 R3+ 1 −k+Λt R3+3−Λt PR3+1(Λt) PR3 j=k+1 j−k j+1 Pj(Λt) ≤δ , which proves Inequality (32) in the case k +1 > Λt , and 1 − (0 . 9 Λt/ ( k +1 −Λt )) Pk+1 ( Λt ) >Pk+1 j=0 or Pk+1 j=0 Pj ( Λt ) > 0.9 and concludes the proof of Proposition 3. Proof of Proposition 4. From (35), (36), and (12), the definition of K2is readily seen to be equivalent to K2= min k≥0 : Mk−mk≤2Pk j=0 wjPj(Λt) Pk+1(Λt) + Λt−(k+1) Λt 1−Pk+1 j=0 Pj(Λt)ε+ (mk+Mk)ε(1 −δ)−δ. Then, since (6) Mk> 0, k≥ 0, and, as assumed, δ < 1 and ε > δ/ (1 −δ ), we have ( mk + Mk )( ε (1 −δ ) −δ ) > 0, k≥0, which combined with (47) limk→∞ (Mk−mk) = 0 implies that K2is finite. To show the inequality  EARR(t0)− \ EARR(t0, K2) \ EARR(t0, K2)≤ε , we will start by obtaining a suitable lower bound for | \ EARR(t0, K2)|/rmax. We have, by (31), h1− K2+1 X j=0 Pj(Λt0)ilb ≥(1 −δ)1− K2+1 X j=0 Pj(Λt0) and, by (22), (32), h ∞ X j=K2+1 j−K2 j+ 1 Pj(Λt0)ilb ≥(1 −δ) ∞ X j=K2+1 j−K2 j+ 1 Pj(Λt0). Then, using (34) and the fact that, as assumed, δ < 1,  \ EARR(t0, K2) rmax = K2 X j=0 wjPj(Λt0) + wK2 K2+ 1 Λt0h1− K2+1 X j=0 Pj(Λt0)ilb +mK2+MK2 2h ∞ X j=K2+1 j−K2 j+ 1 Pj(Λt0)ilb = K2 X j=0 wjPj(Λt0) + wK2 K2+ 1 Λt0h1− K2+1 X j=0 Pj(Λt0)ilb +mK2+MK2 2h ∞ X j=K2+1 j−K2 j+ 1 Pj(Λt0)ilb ≥ K2 X j=0 wjPj(Λt0) + wK2 K2+ 1 Λt0(1 −δ)1− K2+1 X j=0 Pj(Λt0) +mK2+MK2 2(1 −δ) ∞ X j=K2+1 j−K2 j+ 1 Pj(Λt0) ,f(t0, K2) (53) >0. Now, we will derive an upper bound for |EARR ( t0 ) − \ EARR ( t0, K2 ) |/rmax . To that end, we note that, given k≥ 0 and j≥k+ 1, from (19) we obtain wj=1 j+ 1 k X l=0 vl+ j X l=k+1 vl =1 j+ 1 k X l=0 vl+(j+ 1) −(k+ 1)mk+Mk 2+ j X l=k+1 vl−mk+Mk 2 34 V´ıctor Su˜n´e =k+ 1 j+ 1 wk+mk+Mk 2−k+ 1 j+ 1 mk+Mk 2+1 j+ 1 j X l=k+1 vl−mk+Mk 2.(54) Then, using (18), (34), (57), (22), and (3), |EARR(t0)− \ EARR(t0, k)| rmax = ∞ X j=k+1 wjPj(Λt0)−k+ 1 Λt0wkh1− k+1 X j=0 Pj(Λt0)ilb −mk+Mk 2h ∞ X j=k+1 j−k j+ 1 Pj(Λt0)ilb = ∞ X j=k+1 k+ 1 j+ 1 wkPj(Λt0) + mk+Mk 2 ∞ X j=k+1 Pj(Λt0) − ∞ X j=k+1 k+ 1 j+ 1 mk+Mk 2Pj(Λt0) + ∞ X j=k+1 1 j+ 1  j X l=k+1 vl−mk+Mk 2Pj(Λt0) −k+ 1 Λt0wkh1− k+1 X j=0 Pj(Λt0)ilb −mk+Mk 2h ∞ X j=k+1 j−k j+ 1 Pj(Λt0)ilb = k+ 1 Λt0wk ∞ X j=k+2 Pj(Λt0) + mk+Mk 2 ∞ X j=k+1 Pj(Λt0) −k+ 1 Λt0 mk+Mk 2 ∞ X j=k+2 Pj(Λt0) + ∞ X j=k+1 1 j+ 1  j X l=k+1 vl−mk+Mk 2Pj(Λt0) −k+ 1 Λt0wkh1− k+1 X j=0 Pj(Λt0)ilb −mk+Mk 2h ∞ X j=k+1 j−k j+ 1 Pj(Λt0)ilb = k+ 1 Λt0wk1− k+1 X j=0 Pj(Λt0)+mk+Mk 21− k X j=0 Pj(Λt0) −k+ 1 Λt0 mk+Mk 21− k+1 X j=0 Pj(Λt0) + ∞ X j=k+1 1 j+ 1  j X l=k+1 vl−mk+Mk 2Pj(Λt0) −k+ 1 Λt0wkh1− k+1 X j=0 Pj(Λt0)ilb −mk+Mk 2h ∞ X j=k+1 j−k j+ 1 Pj(Λt0)ilb = k+ 1 Λt0wk1− k+1 X j=0 Pj(Λt0)+mk+Mk 2 ∞ X j=k+1 j−k j+ 1 Pj(Λt0) + ∞ X j=k+1 1 j+ 1  j X l=k+1 vl−mk+Mk 2Pj(Λt0) −k+ 1 Λt0wkh1− k+1 X j=0 Pj(Λt0)ilb −mk+Mk 2h ∞ X j=k+1 j−k j+ 1 Pj(Λt0)ilb Title Suppressed Due to Excessive Length 35 = k+ 1 Λt0wk1− k+1 X j=0 Pj(Λt0)−h1− k+1 X j=0 Pj(Λt0)ilb +mk+Mk 2 ∞ X j=k+1 j−k j+ 1 Pj(Λt0)−h ∞ X j=k+1 j−k j+ 1 Pj(Λt0)ilb + ∞ X j=k+1 1 j+ 1  j X l=k+1 vl−mk+Mk 2Pj(Λt0) ≤k+ 1 Λt0wk1− k+1 X j=0 Pj(Λt0)−h1− k+1 X j=0 Pj(Λt0)ilb +mk+Mk 2 ∞ X j=k+1 j−k j+ 1 Pj(Λt0)−h ∞ X j=k+1 j−k j+ 1 Pj(Λt0)ilb + ∞ X j=k+1 1 j+ 1  j X l=k+1  vl−mk+Mk 2Pj(Λt0) ≤k+ 1 Λt0wk1− k+1 X j=0 Pj(Λt0)−h1− k+1 X j=0 Pj(Λt0)ilb +mk+Mk 2 ∞ X j=k+1 j−k j+ 1 Pj(Λt0)−h ∞ X j=k+1 j−k j+ 1 Pj(Λt0)ilb +Mk−mk 2 ∞ X j=k+1 j−k j+ 1 Pj(Λt0). Now, replacing kby K2in the above inequality and using that, by (31), 1− K2+1 X j=0 Pj(Λt0)−h1− K2+1 X j=0 Pj(Λt0)ilb ≤δ1− K2+1 X j=0 Pj(Λt0), that, by (32), (22), ∞ X j=K2+1 j−K2 j+ 1 Pj(Λt0)−h ∞ X j=K2+1 j−K2 j+ 1 Pj(Λt0)ilb ≤δ ∞ X j=K2+1 j−K2 j+ 1 Pj(Λt0), Inequality (3) with kreplaced by K2, that, from (35), (36), (22), and (12), MK2−mK2≤2PK2 j=0 wjPj(Λt) P∞ j=K2+1 j−K2 j+1 Pj(Λt)ε+ (mk+Mk)ε(1 −δ)−δ, and that, as assumed, δ < ε(1 −δ), gives |EARR(t0)− \ EARR(t0, K2)| rmax ≤K2+ 1 Λt0wK21− K2+1 X j=0 Pj(Λt0)−h1− K2+1 X j=0 Pj(Λt0)ilb +mK2+MK2 2 ∞ X j=K2+1 j−K2 j+ 1 Pj(Λt0)−h ∞ X j=K2+1 j−K2 j+ 1 Pj(Λt0)ilb +MK2−mK2 2 ∞ X j=K2+1 j−K2 j+ 1 Pj(Λt0) ≤K2+ 1 Λt0wK2δ1− K2+1 X j=0 Pj(Λt0)+mK2+MK2 2δ ∞ X j=K2+1 j−K2 j+ 1 Pj(Λt0) +mK2−MK2 2 ∞ X j=K2+1 j−K2 j+ 1 Pj(Λt0) 36 V´ıctor Su˜n´e ≤K2+ 1 Λt0wK2δ1− K2+1 X j=0 Pj(Λt0)+mK2+MK2 2δ ∞ X j=K2+1 j−K2 j+ 1 Pj(Λt0) +PK2 j=0 wjPj(Λt) P∞ j=K2+1 j−K2 j+1 Pj(Λt) ∞ X j=K2+1 j−K2 j+ 1 Pj(Λt0)ε +mK2+MK2 2ε(1 −δ)−δ ∞ X j=K2+1 j−K2 j+ 1 Pj(Λt0) =K2+ 1 Λt0wK2δ1− K2+1 X j=0 Pj(Λt0) +PK2 j=0 wjPj(Λt) P∞ j=K2+1 j−K2 j+1 Pj(Λt) ∞ X j=K2+1 j−K2 j+ 1 Pj(Λt0)ε +mK2+MK2 2(1 −δ) ∞ X j=K2+1 j−K2 j+ 1 Pj(Λt0)ε ≤K2+ 1 Λt0wK2ε(1 −δ)1− K2+1 X j=0 Pj(Λt0) +PK2 j=0 wjPj(Λt) P∞ j=K2+1 j−K2 j+1 Pj(Λt) ∞ X j=K2+1 j−K2 j+ 1 Pj(Λt0)ε +mK2+MK2 2(1 −δ) ∞ X j=K2+1 j−K2 j+ 1 Pj(Λt0)ε . (55) Now, by Lemma 1 with l= 0, m=K2,f(k) = wk,λ=Λt,n=K2+ 1, g(k)=(k−K2)/(k+ 1), and λ0=Λt0, PK2 j=0 wjPj(Λt) P∞ j=K2+1 j−K2 j+1 Pj(Λt)≤PK2 j=0 wjPj(Λt0) P∞ j=K2+1 j−K2 j+1 Pj(Λt0).(56) Therefore, by (55) and (56), recalling (53), |EARR(t0)− \ EARR(t0, K2)| rmax ≤K2+ 1 Λt0wK2ε(1 −δ)1− K2+1 X j=0 Pj(Λt0) +PK2 j=0 wjPj(Λt0) P∞ j=K2+1 j−K2 j+1 Pj(Λt0) ∞ X j=K2+1 j−K2 j+ 1 Pj(Λt0)ε +mK2+MK2 2(1 −δ) ∞ X j=K2+1 j−K2 j+ 1 Pj(Λt0)ε =K2+ 1 Λt0wK2ε(1 −δ)1− K2+1 X j=0 Pj(Λt0)+ K2 X j=0 wjPj(Λt0)ε +mK2+MK2 2(1 −δ) ∞ X j=K2+1 j−K2 j+ 1 Pj(Λt0)ε =ε f(t0, K2).(57) Combined with (53), Inequality (57) gives  EARR(t0)− \ EARR(t0, K2) \ EARR(t0, K2)≤ε f(t0, K2) f(t0, K2)=ε . This concludes the proof of Proposition 4.