  Given a $k$-graph $\Lambda $ we construct a Markov space $M_\Lambda $, and a
collection of $k$ pairwise commuting cellular automata on $M_\Lambda $,
providing for a factorization of Markov's shift. Iterating these maps we obtain
an action of ${\mathbb N}^k$ on $M_\Lambda $ which is then used to form a
semidirect product groupoid $M_\Lambda \rtimes {\mathbb N}^k$. This groupoid
turns out to be identical to the path groupoid constructed by Kumjian and Pask,
and hence its C*-algebra is isomorphic to the higher rank graph C*-algebra of
$\Lambda $.
