\section*{Problem 2 - 081212}

a) On the sides \(AB, BC\), and \(CA\) of the triangle \(\triangle ABC\), there are points \(A_{1}, A_{2}, A_{3}\) respectively, \(B_{1}, B_{2}, B_{3}, B_{4}\) respectively, and \(C_{1}, C_{2}, C_{3}, C_{4}, C_{5}\) respectively, which are different from the vertices and pairwise different from each other.

Determine the number of all triangles that can be formed from all these points (including the vertices \(A, B, C\))! Two triangles are considered the same if and only if each vertex of one triangle is also a vertex of the other.

b) Determine the number of all different triangles if the points are \(A_{1}, \ldots, A_{k}\) respectively, \(B_{1}, \ldots, B_{m}\) respectively, and \(C_{1}, \ldots, C_{n}\) respectively (\(k, m, n\) given natural numbers)!
From the given 15 points, exactly \(\binom{15}{3}\) different point triplets can be formed. The points of each such triplet are the vertices of a triangle if and only if they do not lie on the same line.

a) In the given case, however, exactly 5 of the points lie on \(B C\), 6 on \(C A\), and 7 on \(A B\). From these, \(\binom{5}{3}, \binom{6}{3}\), and \(\binom{7}{3}\) of the \(\binom{15}{3}\) triplets are formed, respectively. Therefore, the number \(Z\) of triangles is

\[
Z=\binom{15}{3}-\binom{5}{3}-\binom{6}{3}-\binom{7}{3}=390
\]

b) For the same reasons, we now obtain

\[
Z=\binom{k+m+n+3}{3}-\binom{k+2}{3}-\binom{m+2}{3}-\binom{n+2}{3}
\]

Adapted from \([5]\)