4. 2. 25 ** Let $n$ be a given positive integer, $n \geqslant 2, a_{1}, a_{2}, \cdots, a_{n} \in(0,1)$. Find the maximum value of $\sum_{i=1}^{n} \sqrt[6]{a_{i}\left(1-a_{i+1}\right)}$, where $a_{n+1}=a_{1}$.
By the AM-GM inequality, we have $\sqrt[6]{a_{i}\left(1-a_{i+1}\right)}=2 \sqrt[\frac{1}{6}]{a_{i}\left(1-a_{i+1}\right) \cdot \frac{1}{2} \cdot \frac{1}{2} \cdot \frac{1}{2} \cdot \frac{1}{2}}$ $\leqslant 2^{\frac{2}{3}} \cdot \frac{1}{6}\left(a_{i}+1-a_{i+1}+2\right)=2^{\frac{2}{3}} \cdot \frac{1}{6}\left(a_{i}-a_{i+1}+3\right)$, so
$$
\sum_{i=1}^{n} \sqrt[6]{a_{i}\left(1-a_{i+1}\right)} \leqslant 2^{\frac{2}{3}} \cdot \frac{1}{6} \sum_{i=1}^{n}\left(a_{i}-a_{i+1}+3\right)=2^{\frac{2}{3}} \cdot \frac{1}{6} \cdot 3 n=\frac{n}{\sqrt[3]{2}},
$$

equality holds if and only if $a_{1}=a_{2}=\cdots=a_{n}=\frac{1}{2}$. Therefore, the maximum value of $y$ is $\frac{n}{\sqrt[3]{2}}$.