%% Decrease Feasible Transitions
% Generate random transition matrices containing a specified number of zeros in random locations. A zero in location (i, j) indicates that state i does not transition to state j.
% Generate two 10-state Markov chains from random transition matrices. Specify the random placement of 10 zeros within one chain and 30 zeros within the other chain.

rng(1); % For reproducibility
numStates = 10;
mc1 = mcmix(numStates,'Zeros',10);
mc2 = mcmix(numStates,'Zeros',30);

% mc1 and mc2 are dtmc objects.
%
% Estimate the mixing times for each Markov chain.

[~,tMix1] = asymptotics(mc1)
[~,tMix2] = asymptotics(mc2)

% mc1, the Markov chain with higher connectivity, mixes more quickly than mc2.
% Copyright 2012 The MathWorks, Inc.