25. (Northern) Let $x, y, z \in [0,1], |x-y| \leqslant \frac{1}{2}, |z-y| \leqslant \frac{1}{2}, |x-z| \leqslant \frac{1}{2}$, find
$$W(x, y, z)=x+y+z-xy-yz-zx$$

the maximum and minimum values.
Given that $x, y, z \in [0,1]$, we have $W = x(1-y) + y(1-z) + z(1-x) \geqslant 0$. By setting $x = y = z = 0$, we get $W = 0$, hence $W_{\min} = 0$.

Next, we find $W_{\max}$. Notice that $W(x, y, z) = W(1-x, 1-y, 1-z)$, so we can assume that at least two of $x, y, z$ are not less than $\frac{1}{2}$. Therefore, without loss of generality, assume $x \leqslant y \leqslant z$, then by the given conditions:
$$z - \frac{1}{2} \leqslant x \leqslant y \leqslant z \leqslant 1, \quad \frac{1}{2} \leqslant y$$

Fix $y, z$ and consider $W$ as a function of $x$. Since $1 - y - z \leqslant 0$, we have:
$$\begin{aligned}
W & = x + y + z - xy - yz - zx \\
& = x(1 - y - z) + y + z - yz \\
& \leqslant \left(z - \frac{1}{2}\right)(1 - y - z) + y + z - yz
\end{aligned}$$

Apply the same method to handle $y$:
$$\left(z - \frac{1}{2}\right)(1 - y - z) + y + z - yz = y\left(\frac{3}{2} - 2z\right) - z^2 + \frac{5}{2}z - \frac{1}{2}.$$

If $z \geqslant \frac{3}{4}$, then $\frac{3}{2} - 2z \leqslant 0$, so:
$$\begin{aligned}
y\left(\frac{3}{2} - 2z\right) - z^2 + \frac{5}{2}z - \frac{1}{2} & \leqslant \frac{1}{2}\left(\frac{3}{2} - 2z\right) - z^2 + \frac{5}{2}z - \frac{1}{2} \\
& = -z^2 + \frac{3}{2}z + \frac{1}{4} \\
& = -\left(z - \frac{3}{4}\right)^2 + \frac{13}{16} \leqslant \frac{13}{16}
\end{aligned}$$

If $z < \frac{3}{4}$, then $\frac{3}{2} - 2z > 0$, so:
$$\begin{aligned}
y\left(\frac{3}{2} - 2z\right) - z^2 + \frac{5}{2}z - \frac{1}{2} & \leqslant z\left(\frac{3}{2} - 2z\right) - z^2 + \frac{5}{2}z - \frac{1}{2} \\
& = -3z^2 + 4z - \frac{1}{2} \\
& = -3\left(z - \frac{2}{3}\right)^2 + \frac{5}{6} \leqslant \frac{5}{6}
\end{aligned}$$

Since $\frac{13}{16} < \frac{5}{6}$, and when $x = \frac{1}{6}, y = z = \frac{2}{3}$, we have $W = \frac{5}{6}$, so $W_{\max} = \frac{5}{6}$.