4. Let $S=\{1,2, \cdots, 50\}$. Find the smallest positive integer $k$, such that in any $k$-element subset of $S$, there exist two distinct numbers $a$ and $b$ satisfying $(a+b) \mid a b$.
$(1996$, China Mathematical Olympiad)
Let the greatest common divisor of $a$ and $b$ be $d$, and $a = a_{1}d$, $b = b_{1}d$. Then $\left(a_{1}, b_{1}\right) = 1$.
Substituting into $(a+b) \mid ab$, we get
$$
\left(a_{1} + b_{1}\right) \mid a_{1} b_{1} d \Rightarrow \left(a_{1} + b_{1}\right) \mid d.
$$

Let $d = k\left(a_{1} + b_{1}\right)$, we obtain all pairs satisfying the condition:
$$
a = k a_{1}\left(a_{1} + b_{1}\right), \quad b = k b_{1}\left(a_{1} + b_{1}\right).
$$

Assume $a_{1} < b_{1} \leqslant 6$.
List all 23 pairs $(a, b)$ in the set $S$ as follows:
$$
\begin{array}{l}
(3,6), (6,12), (9,18), (12,24), (15,30), \\
(18,36), (21,42), (24,48), (4,12), (8,24), \\
(12,36), (16,48), (10,15), (20,30), (30,45), \\
(5,20), (10,40), (21,28), (6,30), (14,35), \\
(24,40), (36,45), (7,42).
\end{array}
$$

Now construct a graph with $S$ as the vertex set, such that the graph has 26 isolated points:
$$
\begin{array}{l}
1, 2, 11, 13, 17, 19, 22, 23, 25, 26, 27, 29, \\
31, 32, 33, 34, 37, 38, 39, 41, 43, 44, 46, \\
47, 49, 50,
\end{array}
$$

The remaining 24 points (23 edges) are divided into 3 connected components, as shown in Figure 3.

From Figure 3, we can select 38 points such that no two points are adjacent: 26 isolated points and 12 points:
$$
14, 7, 21, 5, 4, 9, 8, 16, 3, 40, 15, 45.
$$

Therefore, $k \geqslant 39$.
On the other hand, in any 39-element subset, at least 13 points are not isolated. They are distributed among 12 adjacent pairs:
$$
\begin{array}{l}
(14,35), (7,42), (21,28), (5,20), \\
(9,18), (4,12), (8,24), (16,48), \\
(3,6), (40,10), (15,30), (45,36),
\end{array}
$$

At least one pair of these points will belong to the subset, and they satisfy the divisibility condition.
Therefore, the minimum value of $k$ is 39.