SP10081 PERIODIC - Periodic Points
Description
Computing the number of fixed points and, more generally, the number of periodic orbits within a dynamical system is a question attracting interest from different fields of research. However, dynamics may turn out to be very complicated to describe, even in seemingly simple models. In this task you will be asked to compute the number of periodic points of period _n_ of a piecewise linear map _f_ mapping the real interval \[0,_m_\] into itself. That is to say, given a map _f_ : \[0, _m_\] → \[0, _m_\] you have to calculate the number of solutions to the equation _f_ $ ^{n} $ (_x_) = _x_ for _x_ ∈ \[0, _m_\], where _f_ $ ^{n} $ is the result of iterating function _f_ a total of _n_ times, i.e.
_f_ $ ^{n} $ = _n_ _f_′_s_ ◢ - - - - - -
- - - - - -
◣ _f_ ∘ .. ∘ _f_ ∘ _f_ ,where ∘ stands for the composition of maps, (_g_ ∘ _h_) (_x_) = _g_(_h_(_x_)).
Fortunately, the maps you will have to work with satisfy some particular properties:
- _m_ will be a positive integer and the image of every integer in \[0,_m_\] under _f_ is again an integer in \[0,_m_\], that is, for every _k_ ∈ {0, 1, … , _m_} we have that _f_(_k_) ∈ {0, 1, … , _m_}.
- For every _k_ ∈ {0, 1, …, _m_ − 1}, the map _f_ is linear in the interval \[_k_, _k_ + 1\]. This means that for every _x_ ∈ \[_k_, _k_ + 1\], its image satisfies _f_(_x_) = (_k_ + 1 − _x_)_f_(_k_) + (_x_ − _k_)_f_(_k_ + 1), which is equivalent to its graph on \[_k_,_k_ + 1\] being a straight line segment.
> - - - - - -
Input Format
N/A
Output Format
N/A