dtmcisir
Check if P is irreducible, and identify Strongly Connected Components (SCC) in the transition graph of the DTMC with transition matrix P.
INPUTS
P(i,j)
transition probability from state to state . P must be an stochastic matrix.
OUTPUTS
r
1 if P is irreducible (i.e., the state transition graph is strongly connected), 0 otherwise (scalar)
s(i)
strongly connected component (SCC) that state belongs to
(vector of length ). SCCs are numbered .
The number of SCCs is max(s)
. If the graph is
strongly connected, then there is a single SCC and the predicate
all(s == 1)
evaluates to true