6. 115 Let $r_{1}, r_{2}, \cdots, r_{m}$ be $m$ given positive rational numbers, such that $\sum_{k=1}^{m} r_{k}=1$. For every positive integer $n$, define the function $f$ as
$$f(n)=n-\sum_{k=1}^{m}\left[r_{k} n\right]$$

Find the minimum and maximum values of $f(n)$.
［Solution］From the given information,
$$f(n)=\sum_{k=1}^{m}\left(r_{k} n-\left[r_{k} n\right]\right)$$

Since $0 \leqslant r_{k} n-\left[r_{k} n\right]<1$, for all $1 \leqslant k \leqslant m$,
we have $\quad 0 \leqslant f(n) \leqslant m-1$.
Next, we prove that the bounds on both sides of the above inequality can be achieved.
For $1 \leqslant k \leqslant m$, let $r_{k}=\frac{a_{k}}{b_{k}}$. Denote the least common multiple of $b_{1}, b_{2}, \cdots, b_{m}$ as $l=\left[b_{1}, b_{2}, \cdots, b_{m}\right]=b_{k} c_{k}$, where $a_{k}, b_{k}, c_{k}$ are integers, thus
$$\begin{aligned}
f(l) & =\sum_{k=1}^{m}\left(\frac{a_{k}}{b_{k}} \cdot b_{k} c_{k}-\left[\frac{a_{k}}{b_{k}} \cdot b_{k} c_{k}\right]\right)=0 \\
f(l-1) & =\sum_{k=1}^{m}\left(a_{k} c_{k}-r_{k}-\left[a_{k} c_{k}-r_{k}\right]\right) \\
& =\sum_{k=1}^{m}\left(1-r_{k}\right) \\
& =m-1
\end{aligned}$$

Therefore, the minimum value of $f(n)$ is 0, and the maximum value is $m-1$.