= Solution
For each unordered triple of distinct <vertices>, let $I_A$ be the <indicator variable> that its three <edges> are present. This is a <binomial random graph>, so edge independence gives $\mathbb E[I_A]=p^3$. The <triangle count in a binomial random graph> is $T=\sum_A I_A$. There are $\binom n3$ such triples; all are triangles in the <complete graph>.
\b[The combinatorial maximum and expectation are]
$$
\boxed{T_{\max}=\binom n3,\qquad \mathbb E[T]=\binom n3p^3.}
$$
The maximum is attainable with positive probability if $p>0$; for $p=0$, the <random variable> is identically zero. The <linearity of expectation> requires no independence between different triangle indicators.
Back to article page