The following files are provided in this package: README.txt (this file) infinite2finite.m infinite2finiteA.m infinite2finiteB.m finiteforeground.m Neuts3.m homoNeuts.m nonhomoNeuts.m FPmatrix.m RUGmatrices.m Gmatrix.m Mmatrix.m MRImatrix.m coxian2.m -- infinite2finite.m finiteforeground.m These two files are used to create a single QBD process for a foreground QBD process whose transitions depend on the level of a background QBD process. infinite2finiteA.m infinite2finiteB.m These two files can (should) replace infinite2finite.m. infinite2finiteA.m and infinite2finiteB.m approximate infinite2finite.m, but they are much more efficient. infinite2finite.m converts a background QBD process with infinite levels to a QBD process with finite levels. finiteforeground.m, then, creats a single QBD process for a foreground QBD process. Let the generator matrix of the background QBD process be [ A1{1} A0{1} ] [ A2{2} A1{2} A0{2} ] [ A2{3} A1{3} A0{3} ] [ : : ] [ A2{n} A1{n} A0{n} ] [ A2{n} A1{n} A0{n} ] [ : : ] Note that the QBD process repeats after level n. infinite2finite.m converts the background QBD process, which has infinite levels, to a QBD process with finite levels, whose generator matrix has following form: [ B1{1} B0{1} ] [ B2{2} B1{2} B0{2} ] [ B2{3} B1{3} B0{3} ] [ : : ] [ B2{kB} B1{kB} B0{kB} ] There are kB generator matrices for the foreground QBD process. The i-th generator matrix is used when the background process is in level i. [ F1{i,1} F0{i,1} ] [ F2{i,2} F1{i,2} F0{i,2} ] [ F2{i,3} F1{i,3} F0{i,3} ] [ : : ] [ F2{i,n} F1{i,n} F0{i,n} ] [ F2{i,n} F1{i,n} F0{i,n} ] [ : : ] finiteforeground.m returns the generator matrix for a single QBD process for the foreground QBD process. [ S1{1} S0{1} ] [ S2{2} S1{2} S0{2} ] [ S2{3} S1{3} S0{3} ] [ : : ] [ S2{n} S1{n} S0{n} ] [ S2{n} S1{n} S0{n} ] [ : : ] Example: Consider the background QBD process below: ----1---> ----1---> [1] [2] ... <---2---- <---2---- ^ | ^ | | | | | 3 3 3 3 | | | | | v | v ----1---> ----1---> [1] [2] ... <---2---- <---2---- A0, A1, A2 are given by: A0{1} = [1 0; 0 1]; A0{2} = A0{1}; A2{2} = [2 0; 0 2]; A1{1} = [-4 3; 3 -4]; A1{2} = [-6 3; 3 -6]; Thus, n = 2; Let kB = 1; epsilon = 1e-6; PH = 2; We now create an approximate QBD process with finite levels (kB+1 levels). [B0,B1,B2] = infinite2finiteB(A0,A1,A2,n,kB,epsilon,PH); The output is a QBD process with 2 levels. B0{1} = [1 0; 1 0]; B2{2} = [0.7500 0.7500; 0.1464 0.1464]; B1{1} = [-4 3; 3 -4]; B1{2} = [-1.7071 0.2071; 0 -0.2929]; Consider a foreground QBD process whose transitions depend of the level of the background QBD process. Whene the level of the background QBD process is 1, the foreground QBD process is: [1] [2] ... <---4---- <---4---- ^ | ^ | | | | | 3 3 3 3 | | | | | v | v [1] [2] ... <---4---- <---4---- When the level of the background QBD process is 2, the foreground QBD process is ----1---> ----1---> [1] [2] ... ^ | ^ | | | | | 3 3 3 3 | | | | | v | v ----1---> ----1---> [1] [2] ... That is, F0, F1, and F2 are given by F0{1,1} = [0 0; 0 0]; F0{1,2} = F0{1,1}; F2{1,2} = [4 0; 0 4]; F1{1,1} = [-3 3; 3 -3]; F1{1,2} = [-7 3; 3 -7]; F0{2,1} = [1 0; 0 1]; F0{2,2} = F0{2,1}; F2{2,2} = [0 0; 0 0]; F1{2,1} = [-4 3; 3 -4]; F1{2,2} = F1{2,1}; Thus, n = 2; Finally, the generator matrix for the single foreground QBD process is given by [S0,S1,S2] = finiteforeground(F0,F1,F2,n,B0,B1,B2,kB+1); The output is S0{1} = S0{2} = [0 0 0 0 0 0 0 0; [0 0 0 0 0 0 0 0; [0 0 0 0 0 0 0 0; [0 0 0 0 0 0 0 0; [0 0 0 0 1 0 0 0; [0 0 0 0 0 1 0 0; [0 0 0 0 0 0 1 0; [0 0 0 0 0 0 0 1]; S2{2} = [4 0 0 0 0 0 0 0; [0 4 0 0 0 0 0 0; [0 0 4 0 0 0 0 0; [0 0 0 4 0 0 0 0; [0 0 0 0 0 0 0 0; [0 0 0 0 0 0 0 0; [0 0 0 0 0 0 0 0; [0 0 0 0 0 0 0 0]; S1{1} = [-7.0000 3.0000 3.0000 0 1.0000 0 0 0; 3.0000 -7.0000 0 3.0000 0 1.0000 0 0; 3.0000 0 -7.0000 3.0000 1.0000 0 0 0; 0 3.0000 3.0000 -7.0000 0 1.0000 0 0; 0.7500 0 0.7500 0 -5.7071 3.0000 0.2071 0; 0 0.7500 0 0.7500 3.0000 -5.7071 0 0.2071; 0.1464 0 0.1464 0 0 0 -4.2929 3.0000; 0 0.1464 0 0.1464 0 0 3.0000 -4.2929]; S1{2} = [-11.0000 3.0000 3.0000 0 1.0000 0 0 0; 3.0000 -11.0000 0 3.0000 0 1.0000 0 0; 3.0000 0 -11.0000 3.0000 1.0000 0 0 0; 0 3.0000 3.0000 -11.0000 0 1.0000 0 0; 0.7500 0 0.7500 0 -5.7071 3.0000 0.2071 0; 0 0.7500 0 0.7500 3.0000 -5.7071 0 0.2071; 0.1464 0 0.1464 0 0 0 -4.2929 3.0000; 0 0.1464 0 0.1464 0 0 3.0000 -4.2929]; The following three fils are used to calculate the moments of the sojourn time in levels > kB in the background process Neuts3.m homoNeuts.m nonhomoNeuts.m The following files are used in homoNeuts.m FPmatrix.m RUGmatrices.m Gmatrix.m Mmatrix.m MRImatrix.m coxian2.m is used to creat a PH distribution that approximates the sojourn time distribution.