This is an example of a two-state Markov Chain. 
The example follows the Example 1.1, p. 3 of Levin, Peres, Wilmer: 
"Markov Chains and Mixing Times".

		Daniel Aalto, 7 Jan 2013.

The transition probability matrix is given by:

P[p_,q_]:={{1-p,p},{q,1-q}}

P[p,q]//MatrixForm

The initial state of the frog is

mu0 = {1,0}

mu1 = mu0.P[.2,.7]
mu2 = mu1.P[.2,.7]

In Mathematica there are plenty of ways to iterate functions. 
A compact way is by using NestList. 
The symbol # is used for a variable which 
is here a row vector, it is initialized by mu0, 
and there are 10 repetitions.

M=NestList[#.P[.2,.7]&,mu0,10]
ListLinePlot[{M.{1,0},M.{0,1}},PlotRange-> Full]

Limit[{nu1,nu2}.MatrixPower[P[p,q],n],n->Infinity]