LINE Solver
MATLAB API documentation
Loading...
Searching...
No Matches
APH3rdMomentLowerBound.m
1% m3 = APH3rdMomentLowerBound(m1, m2, n)
2%
3% Returns the lower bound of the third moment of acyclic
4% phase-type (APH) distributions of order n.
5%
6% Parameters
7% ----------
8% m1 : double
9% The first moment
10% m2 : double
11% The second moment
12% n : int
13% Number of states
14%
15% Returns
16% -------
17% m3 : double
18% The lowest third moment an order-n APH can have with
19% the given first and second moment.
20%
21% References
22% ----------
23% .. [1] A. Bobbio, A. Horvath, M. Telek, "Matching three
24% moments with minimal acyclic phase type
25% distributions," Stochastic models, pp. 303-326, 2005.
26
27function m3 = APH3rdMomentLowerBound (m1, m2, n)
28
29 n2 = m2 / m1 / m1;
30 if n2<(n+1.0)/n
31 m3 = inf;
32 elseif n2<(n+4.0)/(n+1.0)
33 p = ((n+1.0)*(n2-2.0)) / (3.0*n2*(n-1.0)) * ((-2.0*sqrt(n+1.0)) / sqrt(-3.0*n*n2+4.0*n+4.0) -1.0);
34 a = (n2-2.0) / (p*(1.0-n2) + sqrt(p*p+p*n*(n2-2.0)/(n-1.0)));
35 l = ((3.0+a)*(n-1.0)+2.0*a) / ((n-1.0)*(1.0+a*p)) - (2.0*a*(n+1.0)) / (2.0*(n-1.0)+a*p*(n*a+2.0*n-2.0));
36 m3 = real(l) * m1 * m2;
37 else
38 m3 = (n+1.0)/n * n2 * m1 * m2;
39 end
40end
41