<< Chapter < Page Chapter >> Page >

The procedure arrival assumes the setup provided by chainset, including a set E of target states. The procedure prompts for the number r of repetitions and the initial state. Then it produces r succesive trajectories, each starting with the prescribed initial state and ending on one of the target states. The arrivaltimes vary from one run to the next. Various statistics are computed and displayed or made available. In the single-run case ( r = 1 ), the trajectory may be displayed. An auxiliary procedure plotdbn may be used in the multirun case to plot the distribution of arrival times.

Arrival time to a target set of states

rand('seed',0) arrival % Assumes chainset has been run, as aboveEnter the number of repetitions 1 % Single run case The target state set is:16 22 25 Enter the initial state 34 % Specified initial stateThe arrival time is 6 % Data on trajectory The state reached is 16To view the trajectory of states, call for TR disp(TR') % Optional call to view trajectory0 1 2 3 4 5 6 34 13 10 28 34 37 16rand('seed',0) arrivalEnter the number of repetitions 1000 % Call for 1000 repetitions The target state set is:16 22 25 Enter the initial state 34 % Specified initial stateThe result of 1000 repetitions is: % Run data (see optional calls below) Term state Rel Freq Av time16.0000 0.3310 3.3021 22.0000 0.3840 3.244825.0000 0.2850 4.3895 The average arrival time is 3.59The standard deviation is 3.207 The minimum arrival time is 1The maximum arrival time is 23 To view the distribution of arrival times, call for dbnTo plot the arrival time distribution, call for plotdbn plotdbn % See [link]
Figure two is a graph labeled, time distribution. Its horizontal axis is labeled time in number of transitions. Its vertical axis is labeled relative frequency. The values on the horizontal axis range from 0 to 25 in increments of 5. The values on the vertical axis range from 0 to 0.35 in increments of 0.05. The data plotted on the graph are a series of small circles following a consistent curved shape. The shape, or pattern, created by the small circles, would begin at approximately (1, 0.3), in the top-left side of the graph, and would move to the right with a strong negative slope, but would decrease at a decreasing rate until approximately (15, 0), where the shape would continue horizontally. Along this general shape, the small circles initially appear to be spread apart very far. There is one small circle for every horizontal value from 1 to 19, so as the slope of the general shape of the plotted circles becomes more horizontal, the circles begin to be plotted more closely. After the circle at approximately (19, 0), there is one final circle furthest to the right, located at approximately (23, 0). Figure two is a graph labeled, time distribution. Its horizontal axis is labeled time in number of transitions. Its vertical axis is labeled relative frequency. The values on the horizontal axis range from 0 to 25 in increments of 5. The values on the vertical axis range from 0 to 0.35 in increments of 0.05. The data plotted on the graph are a series of small circles following a consistent curved shape. The shape, or pattern, created by the small circles, would begin at approximately (1, 0.3), in the top-left side of the graph, and would move to the right with a strong negative slope, but would decrease at a decreasing rate until approximately (15, 0), where the shape would continue horizontally. Along this general shape, the small circles initially appear to be spread apart very far. There is one small circle for every horizontal value from 1 to 19, so as the slope of the general shape of the plotted circles becomes more horizontal, the circles begin to be plotted more closely. After the circle at approximately (19, 0), there is one final circle furthest to the right, located at approximately (23, 0).
Time distribution for [link] .

It would be difficult to establish analytically estimates of arrival times. The simulation procedure gives a reasonable “feel” for these times and how they vary.

The procedure recurrence is similar to the procedure arrival. If the initial state is not in the target set, it behaves as does the procedure arrival and stops on the firstvisit to the target set. However, if the initial state is in the target set, the procedures are different. The procedure arrival stops with zero transitions, sinceit senses that it has “arrived.” We are usually interested in having at least one transition– back to the same state or to another state in the target set.We call these times recurrence times .

Got questions? Get instant answers now!
rand('seed',0) recurrenceEnter the number of repititions 1 The target state set is:16 22 25 Enter the initial state 22
Figure three is a graph labeled, time distribution. Its horizontal axis is labeled time in number of transitions. Its vertical axis is labeled relative frequency. The values on the horizontal axis range from 0 to 25 in increments of 2. The values on the vertical axis range from 0 to 0.35 in increments of 0.05. The data plotted on the graph are a series of small circles following a consistent curved shape. The shape, or pattern, created by the small circles, would begin at approximately (1, 0.34), in the top-left side of the graph, and would move to the right with a strong negative slope, but would decrease at a decreasing rate until approximately (12, 0.01), where the shape would continue horizontally. Along this general shape, the small circles initially appear to be spread apart very far. There is one small circle for every horizontal value from 1 to 18, so as the slope of the general shape of the plotted circles becomes more horizontal, the circles begin to be plotted more closely. After the circle at approximately (18, 0), there is one final circle furthest to the right, located at approximately (20, 0). Figure three is a graph labeled, time distribution. Its horizontal axis is labeled time in number of transitions. Its vertical axis is labeled relative frequency. The values on the horizontal axis range from 0 to 25 in increments of 2. The values on the vertical axis range from 0 to 0.35 in increments of 0.05. The data plotted on the graph are a series of small circles following a consistent curved shape. The shape, or pattern, created by the small circles, would begin at approximately (1, 0.34), in the top-left side of the graph, and would move to the right with a strong negative slope, but would decrease at a decreasing rate until approximately (12, 0.01), where the shape would continue horizontally. Along this general shape, the small circles initially appear to be spread apart very far. There is one small circle for every horizontal value from 1 to 18, so as the slope of the general shape of the plotted circles becomes more horizontal, the circles begin to be plotted more closely. After the circle at approximately (18, 0), there is one final circle furthest to the right, located at approximately (20, 0).
Transition time distribution for [link] .
The recurrence time is 1 The state reached is 16To view the trajectory of state numbers, call for TR disp(TR') 0 122 16 recurrenceEnter the number of repititions 1000 The target state set is:16 22 25 Enter the initial state 25The result of 1000 repetitions is: Term state Rel Freq Av time16.0000 0.3680 2.8723 22.0000 0.2120 4.674525.0000 0.4200 3.1690 The average recurrence time is 3.379The standard deviation is 3.0902 The minimum recurrence time is 1The maximum recurrence time is 20 To view the distribution of recurrence times, call for dbnTo plot the recurrence time distribution, call for plotdbn % See [link]
Got questions? Get instant answers now!

The procedure kvis stops when a designated number k of states are visited. If k is greater than the number of target states, or if no k is designated, the procedure stops when all have been visited. For k = 1 , the behavior is the same as arrival. However, that case is better handled by the procedure arrival, which provides more statistics on the results.

rand('seed',0) kvis % Assumes chainset has been runEnter the number of repetitions 1 The target state set is:16 22 25 Enter the number of target states to visit 2Enter the initial state 34 The time for completion is 7To view the trajectory of states, call for TR disp(TR')0 1 2 3 4 5 6 7 34 13 10 28 34 37 16 25rand('seed',0) kvisEnter the number of repetitions 100 The target state set is:16 22 25 Enter the number of target states to visit % Default-- visit all threeEnter the initial state 31 The average completion time is 17.57The standard deviation is 8.783 The minimum completion time is 5The maximum completion time is 42 To view a detailed count, call for D.The first column shows the various completion times; the second column shows the numbers of trials yielding those times
Got questions? Get instant answers now!

The first goal of this somewhat sketchy introduction to Markov processes is to provide a general setting which gives insight into the essential character and structure of such systems.The important case of homogenous chains is introduced in such a way that their algebraic structure appears as a logical consequence of the Markov propertiy. The general theoryis used to obtain some tools for formulating homogeneous chains in practical cases. Some MATLAB tools for studying their behavior are applied to anartificial example, which demonstrates their general usefulness in studying many practical, applied problems.

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Applied probability. OpenStax CNX. Aug 31, 2009 Download for free at http://cnx.org/content/col10708/1.6
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Applied probability' conversation and receive update notifications?

Ask