I try to understand algorithm from this Wikipedia article. Initially it is talking about some function f. I specifically getting problem in that part. Below is the paragraph which is quite mathematical. Can anyone explain me that?
For any function $f$ that maps a finite set $S$ to itself, and any initial value $x_0$ in $S$, the sequence of iterated function values
$x_0, x_1 = f(x_0), x_2 = f(x_1), ..., x_i $
must eventually use the same vale twice: there must be some pair of distinct indices $i$ and $j$ such that $x_i$ = $x_j$. Once this happens, the sequence must continue periodically, by repeating the same sequence of values from $x_i$ to $x_{j−1}$. Cycle detection is the problem of finding $i$ and $j$, given $f$ and $x_0$.