4. Let the set $M=\{1,2, \cdots, 10\}$ have five-element subsets $A_{1}, A_{2}, \cdots, A_{k}$ that satisfy the condition: any two elements in $M$ appear in at most two subsets $A_{i}$ and $A_{j}(i \neq j)$. Find the maximum value of $k$.
4. Solution Let $i \in M(i=1,2, \cdots, 10)$, the number of times $i$ appears in $A_{1}, A_{2}, \cdots, A_{k}$ is denoted as $d(i)$. First, we prove that $d(i) \leqslant 4(i=1,2, \cdots, 10)$.

In fact, for $i \in M$, the pair $(i, j)$ formed with any other 9 elements in $M$ (where $j \neq i$) appears at most twice in all the 5-element subsets $A_{1}, A_{2}, \cdots, A_{k}$ that satisfy the problem's conditions. Therefore, the 9 pairs $(i, j)$ (where $i \neq j$) formed by $i$ can appear at most $2 \times 9=18$ times. Since $\left|A_{j}\right|=5(j=1,2, \cdots, k)$, and each subset containing $i$ has exactly 4 pairs $(i, j)$, we have $4 \cdot d(i) \leqslant 18$, hence $d(i) \leqslant 4$.

Next, the $k$ 5-element subsets have a total of $5 k$ elements, and each element of $M$ appears $d(i)$ times in $A_{1}, \cdots, A_{k}$. Therefore, $5 k=d(1)+\cdots+d(10) \leqslant 4 \times 10 \Rightarrow k \leqslant 8$.
Moreover, when $k=8$, the following 8 5-element sets indeed satisfy the requirements:
$$
\begin{array}{ll}
A_{1}=\{1,2,3,4,5\} & A_{2}=\{1,6,7,8,9\} \\
A_{3}=\{1,3,5,6,8\} & A_{4}=\{1,2,4,7,9\} \\
A_{5}=\{2,3,6,7,10\} & A_{6}=\{3,4,7,8,10\} \\
A_{7}=\{4,5,8,9,10\} & A_{8}=\{2,5,6,9,10\}
\end{array}
$$

Thus, $k_{\min }=8$.