The controlling factor in a Markov chain is the transition probability, it is a conditional probabilty for the system to go to a particular new state, given the current state of the system. For many problems, such as simulated annealing, the Markov chain obtains the much desired importance sampling. This means that we get fairly efficient estimates if we can determine the proper transition probabilities.
Markov chains can be used to solve a very useful class of problems in a rather remarkable way. We will illustrate with the following problem: suppose we wanted to find the value of the vector x that is the solution to,
where the
A little mathematics is needed to see how this would work. First lets symbolically solve (15),
This can be expanded to,
Now lets suppose we have an
and we have an array,
further we will define,
P can then describe a Markov chain where the states of the chain are n integers. The element
While taking the random walk we need to accumulate the product,
and the sum,
The final W value is important because, its mean value (averaged over the walks that start at index i) is,
Notice that the final form of (23) is exactly the ith element from equation (17).
So to solve this problem we have three major steps:
- Set up the probabilities p and g and start off the system at the index at which we want to solve for x, lets call that index i.
- Then we take a random walk until the walk terminates, accumulating the product V and the sum W.
- Then we take the average of the W values over several walks to obtain our estimate of
.
is less than one (the smaller
It turns out we can use this idea for all sorts of problems that have the same general form as (15). If we write (15) as,
and now consider A to be any linear operator that can operate on x, not just a matrix multiply. Given the appropriate operator for a given problem, we can use the above method to solve several kinds of problems. We can do a matrix inverse, i.e. solve
if we let A = I - H. Starting out at index i, will give us row i of
If we restrict the chains to start at index i and end at index j, then we obtain a single element of the inverse,
Notice that equation (27) has the same kind of form as equation (25), (integration is a linear operator). If we made a discrete grid upon which we wanted to solve (27) then we could use exactly the same code that we used to solve equation (15). However in a practical application the dimension of equation (27) would be extremely large, or
Walang komento:
Mag-post ng isang Komento