Solution (source code)

= Solution

In the unrearranged <likelihood> there are four summands. Each is a product of four supplied <probabilities> and takes three multiplications. Summing the four results takes three additions. Thus
$$
\boxed{12\text{ multiplications},\qquad3\text{ additions}.}
$$
This count concerns direct evaluation without reusing repeated factors; zero-or-one <phenotype> values could of course allow extra special-case savings.