changeset 9764:933407a87a4e octave-forge

fixed typos in documentation
author mmarzolla
date Sun, 18 Mar 2012 18:24:04 +0000
parents 941836b60ab9
children ece29b72bf92
files main/queueing/doc/markovchains.txi main/queueing/inst/ctmc.m main/queueing/inst/dtmc.m main/queueing/inst/dtmc_exps.m
diffstat 4 files changed, 35 insertions(+), 34 deletions(-) [+]
line wrap: on
line diff
--- a/main/queueing/doc/markovchains.txi	Sun Mar 18 16:09:48 2012 +0000
+++ b/main/queueing/doc/markovchains.txi	Sun Mar 18 18:24:04 2012 +0000
@@ -35,7 +35,7 @@
 @dots{}}. The sequence @math{X_0, X_1, @dots{}, X_n, @dots{}}  is a
 @emph{stochastic process} with discrete time @math{0, 1, 2,
 @dots{}}. A @emph{Markov chain} is a stochastic process @math{@{X_n,
-n=0, 1, 2, @dots{}@}} which satisfies the following Marrkov property:
+n=0, 1, 2, @dots{}@}} which satisfies the following Markov property:
 
 @iftex
 @tex
@@ -46,7 +46,7 @@
 @math{P(X_{n+1} = x_{n+1} | X_n = x_n, X_{n-1} = x_{n-1}, ..., X_0 = x_0) = P(X_{n+1} = x_{n+1} | X_n = x_n)}
 @end ifnottex
 
-@noindent which means that the probability that the system is in 
+@noindent which means that the probability that the system is in
 a particular state at time @math{n+1} only depends on the state the
 system was at time @math{n}.
 
@@ -60,7 +60,7 @@
 
 The transition probability matrix @math{\bf P} must satisfy the
 following two properties: (1) @math{P_{i, j} @geq{} 0} for all
-@math{i, j}, and (2) @math{\sum_{j=1}^N P_{i,j} = 1}. 
+@math{i, j}, and (2) @math{\sum_{j=1}^N P_{i,j} = 1}.
 
 @c
 @DOCSTRING(dtmc_check_P)
@@ -70,8 +70,8 @@
 * Birth-death process (DTMC)::
 * Expected number of visits (DTMC)::
 * Time-averaged expected sojourn times (DTMC)::
+* Mean time to absorption (DTMC)::
 * First passage times (DTMC)::
-* Mean time to absorption (DTMC)::
 @end menu
 
 @c
@@ -134,7 +134,7 @@
 
 Given a @math{N} state discrete-time Markov chain with transition
 matrix @math{\bf P} and an integer @math{n @geq{} 0}, we let
-@math{L-I(n)} be the the expected number of visits to state @math{i}
+@math{L_i(n)} be the the expected number of visits to state @math{i}
 during the first @math{n} transitions. The vector @math{{\bf L}(n) =
 (L_1(n), L_2(n), @dots{}, L_N(n))} is defined as:
 
@@ -156,8 +156,8 @@
 @end example
 @end ifnottex
 
-@noindent where @math{{\bf \pi}(i) = {\bf \pi}(0){\bf P}^i} is the state occupancy probability
-after @math{i} transitions.
+@noindent where @math{{\bf \pi}(i) = {\bf \pi}(0){\bf P}^i} is the state 
+occupancy probability after @math{i} transitions.
 
 If @math{\bf P} is absorbing, we can rearrange the states to rewrite
 @math{\bf P} as:
@@ -186,7 +186,7 @@
 number of times that the process is in the @math{j}-th transient state
 if it is started in the @math{i}-th transient state. If we reshape
 @math{\bf N} to the size of @math{\bf P} (filling missing entries with
-zeros), we have that, for abrosbing chains @math{{\bf L} = {\bf
+zeros), we have that, for absorbing chains @math{{\bf L} = {\bf
 \pi}(0){\bf N}}.
 
 @DOCSTRING(dtmc_exps)
@@ -198,17 +198,23 @@
 @DOCSTRING(dtmc_taexps)
 
 @c
+@node Mean time to absorption (DTMC)
+@subsection Mean Time to Absorption
+
+@DOCSTRING(dtmc_mtta)
+
+@c
 @node First passage times (DTMC)
 @subsection First Passage Times
 
-The First Passage Time @math{M_{i j}} is defined as the average
+The First Passage Time @math{M_{i, j}} is defined as the average
 number of transitions needed to visit state @math{j} for the first
 time, starting from state @math{i}. Matrix @math{\bf M} satisfies the
 property that
 
 @iftex
 @tex
-$$ M_{i j} = 1 + \sum_{k \neq j} P_{i k} M_{k j}$$
+$$ M_{i, j} = 1 + \sum_{k \neq j} P_{i, k} M_{k, j}$$
 @end tex
 @end iftex
 @ifnottex
@@ -217,22 +223,15 @@
            ___
           \
 M_ij = 1 + >   P_ij * M_kj
-          /___ 
-          k!=j 
+          /___
+          k!=j
 @end group
 @end example
 @end ifnottex
 
-@c
 @DOCSTRING(dtmc_fpt)
 
 @c
-@node Mean time to absorption (DTMC)
-@subsection Mean Time to Absorption
-
-@DOCSTRING(dtmc_mtta)
-
-@c
 @c
 @c
 @node Continuous-Time Markov Chains
@@ -257,7 +256,7 @@
 that for each @math{i \neq j}, @math{Q_{i, j}} is the transition rate
 from state @math{i} to state @math{j}. The elements @math{Q_{i, i}}
 must be defined in such a way that the infinitesimal generator matrix
-@math{\bf Q} satisfies the property @math{\sum_{j=1}^N Q_{i,j} = 0}.
+@math{\bf Q} satisfies the property @math{\sum_{j=1}^N Q_{i, j} = 0}.
 
 @DOCSTRING(ctmc_check_Q)
 
@@ -301,7 +300,7 @@
 @emph{stationary state occupancy probability} @math{{\bf \pi} =
 \lim_{t \rightarrow +\infty} {\bf \pi}(t)}, which is independent from
 the initial state occupancy @math{{\bf \pi}(0)}. The stationary state
-occupancy probability vector @math{\bf \pi} satisfies 
+occupancy probability vector @math{\bf \pi} satisfies
 @math{{\bf \pi} {\bf Q} = {\bf 0}} and @math{\sum_{i=1}^N \pi_i = 1}.
 
 @DOCSTRING(ctmc)
@@ -337,8 +336,8 @@
 (L_1(t), L_2(t), \ldots L_N(t))} such that @math{L_i(t)} is the
 expected sojourn time in state @math{i} during the interval
 @math{[0,t)}, assuming that the initial occupancy probability at time
-0 was @math{{\bf \pi}(0)}. @math{{\bf L}(t)} is the solution of
-the following differential equation:
+0 was @math{{\bf \pi}(0)}. @math{{\bf L}(t)} can be expressed as the
+solution of the following differential equation:
 
 @iftex
 @tex
@@ -367,14 +366,15 @@
 @example
 @group
        / t
-L(t) = |      pi(u) du
-       / u=0
+L(t) = |   pi(u) du
+       / 0
 @end group
 @end example
 @end ifnottex
 
 @noindent where @math{{\bf \pi}(t) = {\bf \pi}(0) \exp({\bf Q}t)} is
-the state occupancy probability at time @math{t}.
+the state occupancy probability at time @math{t}; @math{\exp({\bf A})}
+is the matrix exponential of @math{\bf A}.
 
 @DOCSTRING(ctmc_exps)
 
@@ -384,7 +384,7 @@
 rate from state @math{i} to state @math{i+1} is @math{\lambda_i = i
 \lambda} (@math{i=1, 2, 3}), with @math{\lambda = 0.5}. The following
 code computes the expected sojourn time in state @math{i},
-given the initial occupancy probability @math{{\bf \pi}_0=(1,0,0,0)}. 
+given the initial occupancy probability @math{{\bf \pi}_0=(1,0,0,0)}.
 
 @example
 @group
--- a/main/queueing/inst/ctmc.m	Sun Mar 18 16:09:48 2012 +0000
+++ b/main/queueing/inst/ctmc.m	Sun Mar 18 18:24:04 2012 +0000
@@ -41,7 +41,7 @@
 ## Infinitesimal generator matrix. @var{Q} is a @math{N \times N} square
 ## matrix where @code{@var{Q}(i,j)} is the transition rate from state
 ## @math{i} to state @math{j}, for @math{1 @leq{} i \neq j @leq{} N}.
-## Transition rates must be nonnegative, and @math{\sum_{j=1}^N Q_{i j} = 0}
+## Transition rates must be nonnegative, and @math{\sum_{j=1}^N Q_{i, j} = 0}
 ##
 ## @item t
 ## Time at which to compute the transient probability
--- a/main/queueing/inst/dtmc.m	Sun Mar 18 16:09:48 2012 +0000
+++ b/main/queueing/inst/dtmc.m	Sun Mar 18 18:24:04 2012 +0000
@@ -42,7 +42,7 @@
 ## @item P
 ## @code{@var{P}(i,j)} is the transition probability from state @math{i}
 ## to state @math{j}. @var{P} must be an irreducible stochastic matrix,
-## which means that the sum of each row must be 1 (@math{\sum_{j=1}^N P_{i j} = 1}), and the rank of
+## which means that the sum of each row must be 1 (@math{\sum_{j=1}^N P_{i, j} = 1}), and the rank of
 ## @var{P} must be equal to its dimension.
 ##
 ## @item n
--- a/main/queueing/inst/dtmc_exps.m	Sun Mar 18 16:09:48 2012 +0000
+++ b/main/queueing/inst/dtmc_exps.m	Sun Mar 18 18:24:04 2012 +0000
@@ -34,12 +34,12 @@
 ##
 ## @item n
 ## Number of steps during which the expected number of visits are
-## computed (@math{@var{n} @geq{} 0}). If @code{@var{n}=0}, simply
-## returns @var{p0}. If @code{@var{n} > 0}, returns the expected number
-## of visits after exactly @var{n} transitions.
+## computed (@math{@var{n} @geq{} 0}). If @code{@var{n}=0}, returns
+## @var{p0}. If @code{@var{n} > 0}, returns the expected number of
+## visits after exactly @var{n} transitions.
 ##
 ## @item p0
-## Initial state occupancy probability
+## Initial state occupancy probability.
 ##
 ## @end table
 ##
@@ -51,7 +51,8 @@
 ## When called with two arguments, @code{@var{L}(i)} is the expected
 ## number of visits to transient state @math{i} before absorption. When
 ## called with three arguments, @code{@var{L}(i)} is the expected number
-## of visits to state @math{i} during the first @var{n} transitions.
+## of visits to state @math{i} during the first @var{n} transitions,
+## given initial occupancy probability @var{p0}.
 ##
 ## @end table
 ##