Question

Consider an undirected random graph of eight vertices. The probability that there is an edge between a pair of vertices is 1/21/2. What is the expected number of unordered cycles of length three?

Choose one option
Official answer and solution
Official answer
C
From
Official GATE 2013 answer key

Solution

Use linearity of expectation to sum the probability of forming a 3-cycle over all combinations of 3 vertices.

In an Erdős-Rényi random graph G(n,p)G(n, p) with n=8n = 8 vertices and independent edge probability p=1/2p = 1/2:

  1. An unordered cycle of length 3 (a triangle) is determined by a choice of 3 vertices {u,v,w}\{u, v, w\}.
  2. The total number of triplets of vertices is:
    (n3)=(83)=8×7×63×2×1=56\binom{n}{3} = \binom{8}{3} = \frac{8 \times 7 \times 6}{3 \times 2 \times 1} = 56
  3. For any specific triplet of vertices, a cycle of length 3 forms if and only if all 3 edges (u,v)(u, v), (v,w)(v, w), and (w,u)(w, u) are present.
  4. Since edge occurrences are independent with probability p=1/2p = 1/2:
    P(all 3 edges present)=p3=(12)3=18P(\text{all 3 edges present}) = p^3 = \left(\frac{1}{2}\right)^3 = \frac{1}{8}
  5. By linearity of expectation, the expected number of 3-cycles is:
    E[Cycles of length 3]=(83)×p3=56×18=7E[\text{Cycles of length 3}] = \binom{8}{3} \times p^3 = 56 \times \frac{1}{8} = 7

Thus, the expected number is 7.

Final answer

Option (C)

Common trap

Computing directed cycles (56×256 \times 2) or confusing unordered triangles with permutations of vertices.

The answer is the one in the official GATE answer key. The solution is this site's own explanation.

Source

Paper
GATE 2013 Computer Science and Information Technology (CS)
Question
24 of 65, printed as CS Q.24
Section
Computer Science and Information Technology

Report an error in this question

GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.