Prove that graph G=(V,E)
has at least |v|-|E|
components
I need answer for above question with example and full description.
Prove that graph G=(V,E)
has at least |v|-|E|
components
I need answer for above question with example and full description.
A graph with |V| vertices and no edges has exactly |V| components. Adding an edge can reduce the number of components by at most one (if the vertices that the edge is incident on were not previously connected by another path; otherwise, the number of components is not reduced). Therefore the least possible number of components after adding |E| edges is |V|-|E| and no graph of |V| vertices and |E| edges can have fewer than this many components.
Claim: Each component Ci
with vertices Vi
has at least |Vi|-1
edges.
Proof: The subgraph containing only Vi
is connected, and the minimal connected graph is a tree, which has |Vi|-1
edges. If Ci
had less than Vi-1
edges - it wouldn't have been connected, which is contradicting how we defined Ci
.
Denote Ei
the number of edges in component Ci
.
Note that sum{|Ei| for each Ci} = E
, since there is no edge connecting component Ci
and component Cj
(otherwise they would have been connected themselves).
Now, let's sum all of edges in all Ci
, and we'll get
|E| =(1) sum { |Ei| } >=(2) sum{|Vi|-1} =(3) |V| - sum{1 | for each Ci}
=(4) |V| - #components
->
|E| >= |V| - #components
#components >= |V| - |E|
QED
Explanation for the equalities in the above proof:
(1) Comes from summing all edges in each component sums to |E|
, since there are no edges that cross componentes (explained above)
(2) Comes from the claim we proved
(3) Summing |Vi| for all Ci
results in |V|
(4) summing 1
for each component results in the number of components