4、 6 male students and $x$ female students stand in a row randomly, each male student is adjacent to at least one other male student. The probability that at least 4 male students stand together is $p$, if $p \leq \frac{1}{100}$, then the minimum value of $x$ is $\qquad$ .
4. 594

Analysis: If each boy is adjacent to at least one other boy, then there must be one of the following arrangements: $M M-M M-M M, M M M M-M M, M M-M M M M, M M M-M M M$, or MMMMMM.
(1) Consider the arrangement $M M-M M-M M$. Arrange one girl between each pair of boys, and then arrange the remaining $x-2$ girls in 4 positions. Therefore, there are $C_{x+1}^{3}$ such arrangements.
(2) Consider the arrangements $M M M M-M M, M M-M M M M, M M M-M M M$. This divides the boys into two groups, with one girl arranged between the groups, and then arrange the remaining $x-1$ girls in 3 positions. Therefore, there are $C_{x+1}^{2}$ such arrangements.
(3) Consider the arrangement $M M M M M M$. Treat the 6 boys as a single unit, and arrange them with $x$ girls, resulting in $x+1$ arrangements.

In summary, $p=\frac{2 C_{x+1}^{2}+(x+1)}{C_{x+1}^{3}+3 C_{x+1}^{2}+(x+1)}=\frac{6 x+6}{x^{2}+8 x+6} \leq \frac{1}{100}$. Therefore, $f(x)=x^{2}-592 x-594 \geq 0$. Note that, $f(0)0 .\end{array}\right.$ It is easy to see that, $f(593)=593^{2}-592 \times 593-594=-10$. Thus, $x_{\min }=594$.