4 A class has 30 students, all of different ages, and each student has the same number of friends within the class. For a student $A$, if $A$ is older than more than half (not including half) of $A$'s friends, then $A$ is called elderly. What is the maximum number of elderly students? (20th All-Russian Mathematical Olympiad
4. Suppose there are $t$ older students, each of whom has $k$ friends. For the convenience of describing the problem, use 30 points to represent 30 students. For any two points $A$ and $B$, if $A$ and $B$ are friends, and $A$ is older than $B$, then draw a directed edge pointing to $B$, resulting in a tournament graph. The points corresponding to older students are called "large points", and all the large points are denoted as $A_{1}, A_{2}, \cdots, A_{t}$. According to the problem, $d^{+}\left(A_{i}\right) > d^{-}\left(A_{i}\right)$, $d\left(A_{i}\right) = d^{+}\left(A_{i}\right) + d^{-}\left(A_{i}\right) = k$, thus $d^{+}\left(A_{i}\right) \geqslant \frac{k+1}{2}$. Without loss of generality, assume the age of $A_{1} \leqslant$ the age of $A_{2} \leqslant \cdots \leqslant$ the age of $A_{t}$, then $d^{+}\left(A_{1}\right) \leqslant 30-t$ (point $A_{1}$ can draw edges to at most $30-t$ points outside of $A_{1}, A_{2}, \cdots, A_{t}$), $d^{+}\left(A_{t}\right) = k$. Calculate the sum $S$ of the out-degrees of all "large points". On one hand, $S = d^{+}\left(A_{1}\right) + d^{+}\left(A_{2}\right) + \cdots + d^{+}\left(A_{t-1}\right) + k \geqslant \frac{k+1}{2}(t-1) + k$. On the other hand, $S \leqslant \|G\| = 15k$, so $15k = \|G\| \geqslant S \geqslant \frac{k+1}{2}(t-1) + k$, thus $t \leqslant \frac{28k}{k+1} + 1$ (1). Additionally, $\frac{k+1}{2} \leqslant d^{+}\left(A_{1}\right) \leqslant 30-t$, so $k \leqslant 59 - 2t$ (2). By eliminating $k$ from (1) and (2) (using the monotonicity of the function on the right side of (1) with respect to $k$), we have $t \leqslant \frac{28(59-2t)}{60-2t} + 1$, which simplifies to $t^2 - 59t + 856 \geqslant 0$ (3). However, $t \leqslant 30$, and the largest integer $t$ that satisfies (3) is $t = 25$. Therefore, the number of older students is no more than 25. Finally, $t = 25$ is possible. In fact, when $t = 25$, the above inequalities hold with equality, substituting into (2), we solve to get $k = 9$.

Arrange $1, 2, \cdots, 30$ into 6 rows (as shown in the figure),
specifying that $i$ and $j$ are a pair of friends if and only if $i$ and $j$ satisfy one of the following 3 conditions:
(1) $i$ and $j$ are in adjacent rows but different columns.
(2) $i$ and $j$ are in the same column, but one of them is in the last row.
(3) $i$ and $j$ are both in the first row.
\begin{tabular}{rrrrr}
1, & 2, & 3, & 4, & 5 \\
6, & 7, & 8, & 9, & 10 \\
11, & 12, & 13, & 14, & 15 \\
16, & 17, & 18, & 19, & 20 \\
21, & 22, & 23, & 24, & 25 \\
26, & 27, & 28, & 29, & 30
\end{tabular}

In this case, each person has 9 friends. For example, the 9 friends of 1 are $2, 3, 4, 5, 7, 8, 9, 10$, and 26. Therefore, the maximum value of $t$ is 25.