There are three coplanar parallel lines; if any \(p\) points are taken on each of the lines, then find the maximum number of triangles with the vertices of these points.
Show Hint
In combinatorics geometry problems, first find total combinations, then subtract invalid cases.
We must choose vertices from at least two different lines, as all 3 from one line form no triangle.
Total points = \(3p\).
Total triangles from all points = \(\binom{3p}{3}\).
Subtract triangles from same line: \(3 \times \binom{p}{3}\).
Simplify:
\[
\binom{3p}{3} - 3\binom{p}{3} = p^2(4p - 3)
\]
Thus, maximum number of triangles = \({p^2(4p - 3)}\).