I am solving different problems from my practice exam. However, this is the one top I do not understand at all. If someone could help me go through this that would be amazing.
Consider a random graph G on n vertices {1,2,...,n} where every possible edge is present independently with probability p, 0 ≤ p ≤ 1.
Introduce indicator random variables for edges and compute the expected number of edges in G.
For a given subset of five vertices {i,j,k,l,m} find the probability that all edges between these vertices are present in G (in other words, there is a complete subgraph K5 on the vertices {i, j, k, l, m} in G).
Since you made an effort (though I agree with Trần Thúc Minh Trí that you should include more discussion so we can see where you're coming from. For instance, are you having 'graph-related' or 'probability-related' problems?):
Enumerate the $n_e=\frac{n(n-1)}{2}$ possible edges $e_1,\ldots,e_{n_e}$ and let $E_i$ be the event that $e_i$ is in the graph. Then the number of edges in the graph is $$ N_e = \sum_{i=1}^{n_e} 1(E_i)$$ where $1(E_i)$ is the indicator function that is one if $e_i$ is in the graph and zero otherwise. We have $E(1(E_i)) = P(E_i) = p,$ so $$ E(N_e) = \sum_{i=1}^{n_e} E(1(E_i))=\sum_{i=1}^{n_e} P(E_i) =pn_e.$$
For the second one, each of the ten possible edges occur independently with probability $p.$ So this is just the same thing as the probability of flipping ten heads in a row when the probability of heads is $p.$