  We give an algorithm, based on the $\phi$-expansion of Parry, in order to
compute the topological entropy of a class of shift spaces. The idea is the
solve an inverse problem for the dynamical systems $\beta x+\alpha \mod1$.The
first part is an exposition of the $\phi$-expansion applied to piecewise
monotone dynamical systems. We formulate for the validity of the
$\phi$-expansion, necessary and sufficient conditions, which are different from
those in Parry's paper.
