In my classes, we found that for a graph $\mathbf{a}\in G(n,p)$, where we have labelled the graphs by their adjacency matrices,
$P(\mathbf{a}) = \prod _{i<j}p^{a_{ij}}(1-p)^{(1-a_{ij})}$
We define the entropy of the $G(n,p)$ ensemble to be
$S = -\sum _{\mathbf{a}\in G(n,p)}P(\mathbf{a})ln(P(\mathbf{a}))$
Now if I try to calculate this using the form of $P$, I obtain
$S = -\sum _{\mathbf{a}\in G(n,p)}\left(\prod _{i<j}p^{a_{ij}}(1-p)^{(1-a_{ij})}\right)\left(\sum_{k<l}a_{kl}ln(p) + (1-a_{kl})ln(1-p)\right)$
Now I am aware of the trick of splitting up the first summation as
$\sum_{a_{12}\in \{0,1\}}...\sum_{a_{(n-1)n}\in \{0,1\}}$
However I do not see that $S$ factorises nicely for this to be useful. In particular, the final sm with logarithms couples the $a_{ij}$, so we cannot split this up into these individual sums, as we would be able to do without the logarithm term.
Ultimately, I should obtain
$$S = \frac{n(n-1)}{2}\left[pln(p)+(1-p)ln(1-p)\right]$$
I would be very grateful if someone could help me to see how this comes about.
Normally in this model the events of each edge being connected (with probability $p$) are independent. Therefore by additivity of entropy $$ S=-\binom{n}{2} (p \ln p +(1-p) \ln (1-p)) $$ since $\binom{n}{2}$ is the total number of possible edges. Also note you are missing a minus sign (entropy is positive).