How many edges are there in a forest with v vertices and k components?

2011

How many edges are there in a forest with v vertices and k components?

  1. A.

    (v + 1) − k

  2. B.

    (v + 1)/2 − k

  3. C.

    v − k

  4. D.

    v + k

Attempted by 88 students.

Show answer & explanation

Correct answer: C

A forest is defined as a graph consisting of disjoint trees. In any tree with n vertices, there are exactly n - 1 edges. Since the forest has k components summing to v vertices, the total edge count is the sum of (n_i - 1) for each component. This simplifies mathematically to v - k.

Explore the full course: Isro