6) Let $n$ be a positive integer. Consider
$$
S=\{(x, y, z): x, y, z \in\{0,1, \cdots, n\}, x+y+z>0\}
$$

a set of points in three-dimensional space with $(n+1)^{3}-1$ points. How many planes are needed at minimum so that their union contains $S$, but does not contain $(0,0,0)$?
The answer is $3 n$ planes.
It is easy to see that $3 n$ planes can meet the requirements, for example, the planes $x=i, y=i$ and $z=i(i=1,2, \cdots, n)$, it is easy to see that the union of these $3 n$ planes contains $S$ and does not contain the origin. Another example is the set of planes
$$
x+y+z=k,(k=1,2, \cdots, 3 n) .
$$

We prove that $3 n$ is the minimum possible number. The following lemma is key.
Lemma: Consider a non-zero polynomial $P\left(x_{1}, \cdots, x_{k}\right)$ in $k$ variables. If all points $\left(x_{1}, \cdots, x_{k}\right)$ satisfying $x_{1}, \cdots, x_{k} \in\{0,1, \cdots, n\}$ and $x_{1}+\cdots+x_{k}>0$ are zeros of $P\left(x_{1}, \cdots, x_{k}\right)$, and $P(0,0, \cdots, 0) \neq 0$, then $\operatorname{deg} P \geqslant k n$.

Proof: We use induction on $k$: When $k=0$, the conclusion holds by $P \neq 0$. Now assume the conclusion holds for $k-1$, we prove the conclusion for $k$.

Let $y=x_{k}$, and let $R\left(x_{1}, \cdots, x_{k-1}, y\right)$ be the remainder when $P$ is divided by $Q(y)=y(y-1) \cdots (y-n)$.

Since the polynomial $Q(y)$ has $n+1$ zeros at $y=0,1, \cdots, n$, we have $P\left(x_{1}, \cdots, x_{k-1}, y\right)=R\left(x_{1}, \cdots, x_{k-1}, y\right)$ for all $x_{1}, \cdots, x_{k-1}$, $y \in\{0,1, \cdots, n\}$, so $R$ also satisfies the conditions of the lemma, and further $\operatorname{deg}_{y} R \leqslant n$. Clearly, $\operatorname{deg} R \leqslant \operatorname{deg} P$, so it suffices to prove $\operatorname{deg} R \geqslant n k$.
Now, write the polynomial $R$ in descending powers of $y$:
$$
\begin{aligned}
R\left(x_{1}, \cdots, x_{k-1}, y\right)= & R_{n}\left(x_{1}, \cdots, x_{k-1}\right) y^{n}+R_{n-1}\left(x_{1}, \cdots,\right. \\
& \left.x_{k-1}\right) y^{n-1}+\cdots+R_{0}\left(x_{1}, \cdots, x_{k-1}\right)
\end{aligned}
$$

We now prove that $R_{n}\left(x_{1}, \cdots, x_{k}-1\right)$ satisfies the conditions of the induction hypothesis.
In fact, consider the polynomial $T(y)=R(0, \cdots, 0, y)$, it is easy to see that $\operatorname{deg} T(y) \leqslant n$, this polynomial has $n$ roots, $y=1, \cdots, n$;

On the other hand, by $T(0) \neq 0$ we know $T(y) \neq 0$. Therefore $\operatorname{deg} T=n$, and its leading coefficient is $R_{n}(0, \cdots, 0) \neq 0$.
(Specifically, in the case $k=1$, we get that the coefficient $R_{n}$ is non-zero).
Similarly, take any $a_{1}, \cdots, a_{k-1} \in\{0,1, \cdots, n\}$ and $a_{1}+\cdots+a_{k-1}>0$.
In the polynomial $R\left(x_{1}, \cdots, x_{k-1}, y\right)$, let $x_{i}=a_{i}$, we get a polynomial in $y$, $R\left(a_{1}, \cdots, a_{k-1}, y\right)$, which has roots $y=0, \cdots, n$ and $\operatorname{deg} \leqslant n$, so it is a zero polynomial.

So $R_{i}\left(a_{1}, \cdots, a_{k-1}\right)=0,(i=0,1, \cdots, n)$, in particular $R_{n}\left(a_{1}, \cdots, a_{k-1}\right)=0$.

Thus we have proved that the polynomial $R_{n}\left(x_{1}, \cdots, x_{k-1}\right)$ satisfies the conditions of the induction hypothesis, so
$$
\operatorname{deg} R_{n} \geqslant(k-1) n
$$

Hence $\operatorname{deg} R \geqslant \operatorname{deg} R_{n}+n \geqslant k n$. The lemma is proved.
Returning to the original problem, assume the union of $N$ planes contains $S$ but does not contain the origin, let their equations be:
$$
a_{i} x+b_{i} y+c_{i} z+d_{i}=0
$$

Consider the polynomial $P(x, y, z)=\prod_{i=1}^{N}\left(a_{i} x+b_{i} y+c_{i} z+d_{i}\right)$, its degree is $N$. For any $\left(x_{0}, y_{0}, z_{0}\right) \in S$, this polynomial has the property $P\left(x_{0}, y_{0}, z_{0}\right)=0$ but $P(0,0,0) \neq 0$. Therefore, by the lemma we get
$$
N=\operatorname{deg} P \geqslant 3 n \text {. }
$$

Note: This is a class of real algebraic geometry problems, worth paying attention to.