
Algorithmic Methods for Markov Chains in Industrial Engineering Lectures
Explore numerical solutions for equilibrium equations, transient analysis, M/M/1-type models, G/M/1 and M/G/1-type models, and finite Quasi Birth Death processes in Algorithmic Methods for Markov Chains. Learn about stationary Markov chains, irreducibility, absorbing Markov chains, and more.
Download Presentation

Please find below an Image/Link to download the presentation.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.
You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.
E N D
Presentation Transcript
Algorithmic Methods for Markov Chains Dr. Ahmad Al Hanbali Industrial Engineering Dep University of Twente a.alhanbali@utwente.nl 1 Lecture 1: Algo. Methods for discrete time MC
Content 1. Numerical solution for equilibrium equations of Markov chain: Exact methods: Gaussian elimination, and GTH Approximation (iterative) methods: Power method, Gauss- Seidel variant 2. Transient analysis of Markov process, uniformization, and occupancy time 3. M/M/1-type models: Quasi Birth Death processes and Matrix geometric solution 4. G/M/1 and M/G/1-type models: Free-skip processes in one direction 5. Finite Quasi Birth Death processes 2 Lecture 1: Algo. Methods for discrete time MC
Lecture 1 Algorithmic methods for finding the equilibrium distribution of finite Markov chains Exact methods: Gaussian elimination, and GTH Approximation (iterative) methods: Power method, Gauss- Seidel variant 3 Lecture 1: Algo. Methods for discrete time MC
Introduction Let ??:? 0 denote a discrete time stochastic process with finite states space 0,1, ,? Markov property: ? ??= ?|?? 1, ,?0 = ? ??= ?|?? 1 If the process ??:? 0 satisfies the Markov property, it is then called a discrete time Markov chain A Markov chain is stationary if ? ??= ?|?? 1= ? is independent of ?, i.e., ? ??= ?|?? 1= ? = ???. In this case ???is called the one-step transition probability from state i to j The matrix P = ???, is transition probability matrix of 0 , P? = ? , where ? is column vector of ones. The element ?,? of P?, matrix P to power n, represents the transition probability to go from i to j in ? steps ??:? 4 Lecture 1: Algo. Methods for discrete time MC
Introduction A stationary Markov chain can be represented by a transition states diagram In a transition states diagram, two states can communicate if there is a route that joins them A Markov chain is irreducible if all its states can communicate between each other, i.e., ? an integer ? 1 such that ??? 1 ? >0) 0.5 1 2 1 2 0.3 0.3 0.7 0.7 0.5 0.5 3 3 1 0.5 Three states absorbing MC: state 3 is absorbing, {1,2} are transient Three states irreducible MC 5 Lecture 1: Algo. Methods for discrete time MC
Introduction Let t denotes the set of transient states and a the set of absorbing states. For absorbing Markov chains the transition probability matrix P can be written as, I identity matrix, 0.5 1 2 0.3 Ptt 0 Pta I 0.7 1 P = , 3 1 Let ???, ?,? t, denote expected number of visits to ? before absorption given that the chain starts in ? at the time 0. The matrix M= ???gives M = I Ptt Lecture 1: Algo. Methods for discrete time MC 1= I + Ptt+ (Ptt)2+ 6
Equilibrium distribution of MC The equilibrium, steady state, probability is defined ??= lim ? ? ??= ?|?0= ? ,?,? = 0, ,? The equilibrium distribution ? = ?0,?1, ,?? of the (irreducible) MC is the unique solution to ? = ??,?? = 1, where ? is a column vector of ones For small size Markov chains ? can be computed ? = ??? ? + ??? 1, where ? is a column vector of ones, ?? is the transpose of ?. Note ??? is a matrix of ones Lecture 1: Algo. Methods for discrete time MC 7
Exact Methods 1. Gaussian elimination algorithm (linear algebra) 2. Grassmann, Taskar and Heyman (GTH) algorithm 8 Lecture 1: Algo. Methods for discrete time MC
Gaussian Elimination Algorithm (1) Example on board of 3 states Markov chain Equilibrium equation can be written ? ????? ??? = 0,? = 0,1, ,?, ?=0 where ???= 1 if ?=? and 0 otherwise Gaussian elimination: Step 1: First isolate ?0 in Eq. 0, and eliminate ?0 from all other equations. Then we isolate ?1 from first equation (modified second of the original system) in the new system and eliminate ?1 from the remaining equations, and so on, until we solve Eq. N-1 for ?? 1 which gives ?? 1as function of ?? 9 Lecture 1: Algo. Methods for discrete time MC
Gaussian Elimination Algorithm (2) Gaussian elimination: Step2 (backward iterations): Call the unknowns ??. Use Eq. N- 1 in the last iteration to express ?? 1 as function of ??= 1, and so on until you find ?0. Note, here the values of ?? is equal to the probability ?? up to scale parameter c (??= ???) Step 3 (normalization): the constant ? can be found using the normalization equation ( ?=0 gives, ?? ?=0 ?? ? ??= 1). This ??= ? Question: shows that ??, ? = 0, ,? 1, can be interpreted the mean number of visits to state i between two successive visits to state N multiplied by (1-???). Hint: given that the chain has just left state N at time 0, the mean number of visits to state i before returning to N can be found by assuming that N is an absorbing state. Lecture 1: Algo. Methods for discrete time MC 10
Gaussian elimination Gaussian eliminations Gaussian backward iterations Normalization 11 Lecture 1: Algo. Methods for discrete time MC
Complexity of Gaussian Algorithm The operations required to solve the equilibrium equation involve subtractions which may cause a loss of high order precision For Gaussian elimination the complexity is O(N3) 12 Lecture 1: Algo. Methods for discrete time MC
GTH Algorithm (1) GTH is based on Gaussian elimination algorithm and on state space reduction (1) be equal to ??? after the first iteration in step 1 of the Gaussian algorithm. We find ?0???0 1 ?00 (1) can be interpreted as the one step transition probability from state ? to ? in the chain restricted to states 1,2, ,? Let ??? (1)= ???+ (1) ??? ??? ???= ??? ??? ??? j i 0 ?0? ??0 Is this chain irreducible? Markovian? ?00 13 Lecture 1: Algo. Methods for discrete time MC
GTH (2) By induction one may prove that the value of ??? after the n-th iteration in step 1 of the Gaussian algorithm gives, (?)= ??? ? ???, ??? ? is the transition probability of the where ??? Markov chain restricted to the states 1, ,? . Therefore, the sum of ??? 1, ,? is one. This is called folding ?,? + ? over i = ?,? + 14 Lecture 1: Algo. Methods for discrete time MC
GTH (3) Gaussian algorithm rewrites: Folding Forward Gaussian iterations Backward iterations Unfolding Normalization Normalization This is a numerically stable algorithm. Can we generalize the idea folding to more than one states, e.g., folding multiple states at once? 15 Lecture 1: Algo. Methods for discrete time MC
References (Direct Methods) W.K. Grassmann, M.I. Taskar, D.P. Heymann, Regenerative analysis and steady state distributions for Markov chains, Operations Research, 33 (1985), pp. 1107-1116 W.J. Stewart, Introduction to the numerical solution of Markov chains, Princeton University Press, Princeton, 1994 J. Stoer, R. Bulirsch, Introduction to numerical analysis, Springer-Verlag, New York, 1980 J. Kemeny and J. Snell, Finite Markov Chains, Springer- Verlag, New York, 1976 http://www.win.tue.nl/~iadan/algoritme/ 16 Lecture 1: Algo. Methods for discrete time MC
Iterative methods for solving the equilibrium equations Problem: find p such that (matrix form of equilibrium equations) ? = ??, where p equilibrium probability vector, Pis transition matrix of an irreducible Markov chain, and e a column vector with ones ?? = 1, ?denote the entries the matrix Pn, then ??? ? Let ??? represents the probability of transition from state i to j in n steps A matrix is aperiodic if the largest common divisor is one for all n such that ??? Lecture 1: Algo. Methods for discrete time MC ?>0 17
Background (1) The spectral radius of Q a nonnegative, irreducible and aperiodic N-by-N matrix is ? ? =max{ | |; is an eigenvalue of Q }. Let y* be the corresponding left eigenvector of ? ? referred to as spectral vector. Under the previous assumptions ? ? is unique and positive, and y*>0 The sub-radius of Q defines 2(Q)=max{ | |; is eigenvalue of Q with | | < ? ? } Proposition: Let ? be an N-row vector with ? 0 and ? 0. Then there exist a constant ? > 0 and an integer k, with 0 ? ?, such that ???= ?? ??? + ? ???2??,? What does this proposition mean for P, a transition matrix of an irreducible, aperiodic Markov chain? 18 Lecture 1: Algo. Methods for discrete time MC
Iterative methods 1. Matrix power 2. Power method 3. Gauss-Seidel method 4. Iterative bounds 19 Lecture 1: Algo. Methods for discrete time MC
Matrix powers Compute ?,? ,?4,?8, , until ?2? is almost constant matrix If ?is irreducible aperiodic transition proba. matrix then [?2?]??converges to ??and both ????([?2?]??) and ????([?2?]??) converges to ?? ?2? is dense matrix. Each iteration requires ?(?3) Remark: Any irreducible transition probability matrix can be made aperiodic by the following transformation: ? = ?? + 1 ? ?, 0 < ? < 1. Note if ? = ?? then ?? = ? 20 Lecture 1: Algo. Methods for discrete time MC
Power method Choose an initial probability distribution?(0), and compute for ? = 0,1, ?(?+1)= ?(?).?, (1) until |?(?+1) ?(?)| is small ?(?+1) is an approximation of ?, equilibrium probability vector Note: ?(?)= ?(0).?? = ?.? + ? ???2??,? , then Power method converges geometrically with a rate determined by the sub-radius of ? 21 Lecture 1: Algo. Methods for discrete time MC
Gauss-Seidel method It is variant of the Power method. The Power method computes ?(?+1) recursively from ?(?). However, Gauss-Seidel method uses for the computation of ?? Let ?? the upper triangular matrix of P incl. main diagonal and ?? the lower triangular matrix. The power method iteration, Equation (1), rewrites ?(?+1)= ?(?+1)??+ ?(?)?? ?(?+1)= ?(?+1)??? ?? The convergence of Gauss-Seidel in much faster than Power method (?+1) the new values ?? (?+1) for ? ? and ?? (?),? > ? 1 22 Lecture 1: Algo. Methods for discrete time MC
Iterative bounds (1) Let ?? denote expected number of visits to state ? between two consecutive visits to state 0 multiplied by 1 ?00. Then ?0= 1 and ??reads ??=?? ?0,? = 0,1, ,? This latter equality is due to renewal reward theorem with inter-renewal times as time between two consecutive visits to state 0 Plugging ??into balance equations gives ? ??= ?0?+ ????? ?=1 23 Lecture 1: Algo. Methods for discrete time MC
Iterative bounds (2) Let ? denote the N-by-N matrix where entries ??? = ??? for ?,? = 1, ,?. The mean visits equation then rewrites (contractive equation ? ? < 1) ?(?+1)= ? + ???, ? where ???-column vectors with elements ?? and ?? = ?0? ,? = 1, ,? ?? Once ?? is determined then, ??= ? ?=0 ?? 24 Lecture 1: Algo. Methods for discrete time MC
Iterative bounds (3) Further, it is possible to construct an upper and lower bounds of ??and shows that these bounds are contractive under the condition that Q is irreducible and aperiodic. ?, and The upper bound of ?? is denoted by ?? lower bound by ?? ? ?+1 ?? ? ?? ? ?+1 ?? ? ?? ? ?? ?? ?? ?? Let ??= min ? 1,??= m?? ? 1 ? ? 25 Lecture 1: Algo. Methods for discrete time MC
Iterative bounds (4) 26 Lecture 1: Algo. Methods for discrete time MC
References A. Berman, R.J. Plemmons, Nonnegative matrices in the mathematical sciences, Academic Press, New York, 1979. J.L. Doob, Stochastic processes, Wiley, New York, 1953. M.C. Pease, Methods of matrix algebra, Academic Press, New York, 1965. E. Seneta, Nonnegative matrices and Markov chains, 2nd edition, Springer- Verlag, Berlin, 1980. P.J. Schweitzer, Iterative solution of the functional equations of undiscounted Markov renewal programming, J. Math. Anal. Appl., 34 (1971), pp. 495-501. H.C. Tijms, Stochastic modelling and analysis: a computational approach, John Willey & Sons, Chichester, 1990. R. Varga, Matrix iterative analysis, Prentice Hall, Englewood Clis, 1962. J. van der Wal, P.J. Schweitzer, Iterative bounds on the equilibrium distribution of a finite Markov chain, Prob. Eng. Inf. Sci., 1 (1987), pp. 117- 131. 27 Lecture 1: Algo. Methods for discrete time MC