Example 3.1.3 Given nine points in space, where no four points are coplanar, connect several line segments among these nine points so that there is no tetrahedron in the graph. How many triangles can there be at most in the graph?
Analysis: Let there be at most $n$ triangles, with nine points $A_{1}, A_{2}, \cdots, A_{9}$, divided into three groups $\left\{A_{1}, A_{2}, A_{3}\right\},\left\{A_{4}, A_{5}, A_{6}\right\},\left\{A_{7}, A_{8}, A_{9}\right\}$. No two points in the same group are connected, while any two points in different groups are connected. In this case, there are no tetrahedra, but there are $3 \times 3 \times 3=27$ triangles, so $n \geqslant 27$.
Next, prove that in a graph of 9 points, if there are at least 28 triangles, there must be a tetrahedron.
Solution: Use proof by contradiction: If not, assume there is a graph of 9 points containing 28 triangles but no tetrahedron.
First, prove that there must be a point that is a vertex of at least 10 triangles.
Assume each $A_{i}(i=1,2, \cdots, 9)$ is a vertex of at most 9 triangles. Then the total number of vertices (counting repetitions) is at most $9 \times 9=81$. Since there are 28 triangles, the total number of vertices should be $28 \times 3=84>81$, which is a contradiction.

Without loss of generality, assume $A_{1}$ is the vertex of the most triangles, and $A_{1}$ is a vertex of at least 10 triangles. Let $d\left(A_{1}\right)=k$. If any two of the $k$ edges form a triangle, since $\mathrm{C}_{4}^{2}=6<10$, it follows that $k \geqslant 5$. Since there are only nine points, $k \leqslant 8$. We will discuss the cases $k=5,6,7,8$ separately.
(1) $k=5$, assume these five edges are $A_{1} A_{2}, A_{1} A_{3}, A_{1} A_{4}, A_{1} A_{5}, A_{1} A_{6}$. Since there is no tetrahedron, the subgraph of $A_{2}, A_{3}, A_{4}, A_{5}, A_{6}$ contains no triangles. By Example 1.2.2, this subgraph has at most $\left[\frac{5^{2}}{4}\right]=6$ edges, so the number of triangles with $A_{1}$ as a vertex is at most 6, which is a contradiction.
(2) $k=6$, the proof is similar.
(3) $k=7$, assume these seven edges are $A_{1} A_{2}, A_{1} A_{3}, \cdots, A_{1} A_{8}$. Since there is no tetrahedron, the subgraph of $A_{2}, A_{3}, \cdots, A_{8}$ contains no triangles and has at most $\left[\frac{7^{2}}{4}\right]=12$ edges. The number of triangles with $A_{1}$ as a vertex is at most 12. Since there is no tetrahedron, any triangle not containing $A_{1}$ must contain $A_{9}$, so the total number of triangles in the original graph is $\leqslant d\left(A_{1}\right)+d\left(A_{9}\right) \leqslant 12 \times 2=24<28$, which is a contradiction.
(4) $k=8$, from point $A_{1}$, draw 8 edges $A_{1} A_{2}, A_{1} A_{3}, \cdots, A_{1} A_{9}$. The subgraph of $A_{2}, A_{3}, \cdots, A_{9}$ contains no triangles and has at most $\left[\frac{8^{2}}{4}\right]=16$ edges, so the total number of triangles in the original graph is $\leqslant 16<28$, which is a contradiction.