%% Math 152: Random walk demo
% The "somewhat nerdy" Example 4.1 from notes.pdf

P = [0 0.5 0 0;
     2/3 0 0 0;
     1/3 0 1 0;
     0 0.5 0 1]

x0 = [1; 0; 0; 0]

x = P^5*x0


%% long duel

x_long = P^50*x0
