% part_a
%
% Takes one step in the simple random walk Markov chain

function y = part_a(x,u,n)
% Input Variables
%   x		The state of the chain
%   u		A uniform [0,1] random variable
%   n		The size of the state space

y = x - (u <.5)*(x > 1) + (u >= .5)*(x < n);

