5. A tournament graph is a directed graph where any two distinct vertices form an unordered pair with a directed edge from one vertex to the other. A proper directed edge coloring is defined as assigning a color to each directed edge such that every pair of directed edges $\overrightarrow{u v}$ and $\overrightarrow{w v}$ (where the endpoint of the first edge and the startpoint of the second edge are the same vertex $v$) have different colors. Pairs of directed edges like $\overrightarrow{v u}$ and $\overrightarrow{v w}$ can be the same color; pairs of directed edges like $\overrightarrow{u v}$ and $\overrightarrow{w v}$ can also be the same color. The number of colors of the directed edges of a tournament graph is the minimum number of colors required to achieve a proper directed edge coloring. For each positive integer $n$ and all tournament graphs with $n$ vertices, find the minimum number of colors $f(n)$ for the directed edges.
5. For each positive integer $n, f(n)=\left\lceil\log _{2} n\right\rceil$, where $\lceil x\rceil$ denotes the smallest integer not less than the real number $x$.

First, use the second mathematical induction to prove: For each positive integer $n$, we have $f(n) \geqslant\left\lceil\log _{2} n\right\rceil$.
When $n=1$, it is clear that $f(1) \geqslant 0=\left\lceil\log _{2} 1\right\rceil$.
For $n \geqslant 2$, assume that for all positive integers $kj$.
Let the colors be $0,1, \cdots,\left\lceil\log _{2} n\right\rceil-1$.
For the edge $\overrightarrow{i j}$, consider the largest non-negative integer $k$ such that in the binary representation, $i$ and $j$ have 1 and 0, respectively, at the position corresponding to $2^{k}$, then color the edge $\overrightarrow{i j}$ with color $k$.

Since $i>j$, and $n-1$ has at most $\left\lceil\log _{2} n\right\rceil$ bits in binary, such a $k$ exists and does not exceed $\left\lceil\log _{2} n\right\rceil$.

Assume that this coloring is not a proper directed edge coloring. Then there exist edges $\overrightarrow{i j}$ and $\vec{j} \vec{k}$ both colored $l$. Thus, in the binary representation, $j$ has both 0 and 1 at the position corresponding to $2^{l}$, which is a contradiction.
Therefore, this coloring is a proper directed edge coloring.
Thus, $f(n) \leqslant\left\lceil\log _{2} n\right\rceil$.