Question 27
Let $r_{1}, r_{2}, \ldots, r_{m}$ be a given set of $m$ positive rational numbers such that $\sum_{k=1}^{m} r_{k}=1$. Define the function $f$ by $f(n)=n-\sum_{k=1}^{m}\left[r_{k} n\right]$ for each positive integer $n$. Determine the minimum and maximum values of $f(n)$. Here $[x]$ denotes the greatest integer less than or equal to $x$.