Show that if an undirected graph with n vertices has k connected components, then it has at least n - k edges.

Short Answer

Expert verified

The undirected graph with n vertices has k connected components with least n - k edges.

Step by step solution

01

Two sub graph of main graph  

If there is no edge between two sub-graphs of a given graph, they are said to have linked components.

That is, no edge E ( u,v) exists in which u corresponds towards the set of vertices of the very first sub-graph plus v belongs to that same vertex set of the second sub-graph, or vice versa..

02

Step 2: Evidence via Induction

Proof for the Most Basic Case:

When k = 1, there is only one linked component in a network with n vertices. All of the vertices in the network are linked since there is only one connected component.

There are at least n - 1 edges in an undirected network with n linked vertices.

As a result, the number of edges in the graph is n - 1.

Since k=1, the value of n - k = n - 1 can be calculated.

As a result, the assertion is correct for k = 0.

03

Assumption

The assumption is,

Suppose that for n = v and k = c, the assertion is correct.

As a result, there are at least v - c edges in the undirected graph G with v vertices and linked components.

Demonstrate that the assertion is correct for n = v and k = c + 1.

The proof is,

• There are at least v - c edges in a graph G with vvertices and clinked components. (based on the assumption from Step 2)

• Split one of the linked components of the graph G into two to make a graph G1 with c + 1 connected components.

• Because there must be no edge between two linked components, one of the edges must be eliminated to make a new connected component.

• Inside the graphs G1, overall number of edges is at least v - c -1 or v - (c + 1) (Since the graph G had v - cedges).

• Inside the graph G1 , the number of linked elements has become equal to c + 1, and the number of edges is at least v- ( c+ 1 ).

Assuming n = vvertices as well as k = c + 1 linked elements, the following holds true.

As a result, it has been established.

Unlock Step-by-Step Solutions & Ace Your Exams!

  • Full Textbook Solutions

    Get detailed explanations and key concepts

  • Unlimited Al creation

    Al flashcards, explanations, exams and more...

  • Ads-free access

    To over 500 millions flashcards

  • Money-back guarantee

    We refund you if you fail your exam.

Over 30 million students worldwide already upgrade their learning with Vaia!

One App. One Place for Learning.

All the tools & learning materials you need for study success - in one app.

Get started for free

Most popular questions from this chapter

Give the state of the disjoint-sets data structure after the following sequence of operations, starting from singleton sets 1,,8. Usepath compression. In the case of ties, always make the lower numbered root point to the higher numbered ones.

union1,2,union3,4,union5,6,union7,8

,union1,4,union6,7,union4,5,find1

Graphs with prescribed degree sequences. Given a list of n positive integers d1,d2,,dn, we want to efficiently determine whether there exists an undirected graphG=(V,E) whose nodes have degrees preciselyd1,d2,,dn . That is, if V={v1,,vn}, then the degree of vi should be exactly di. We call (d1,,dn) the degree sequence of G. This graph G should not contain self-loops (edges with both endpoints equal to the same node) or multiple edges between the same pair of nodes.

(a) Give an example of d1,d2,d3,d4 where all the di3 and d1+d2+d3+d4 is even, but for which no graph with degree sequence(d1,d2,d3,d4) exists.

(b) Suppose that d1d2d3dn and that there exists a graph G=(V,E) with degree sequence (d1,,dn). We want to show that there must exist a graph that has this degree sequence and where in addition the neighbors of v1 are v2,v3,,vdi+1 . The idea is to gradually transform G into a graph with the desired additional property.

i. Suppose the neighbors ofv1 in Gare not v2,v3,,vdi+1. Show that there exists i<jn and uV and such that {v1,vi},{u,vj}Eand {v1,vj},{u,vi}E

ii. Specify the changes you would make to G to obtain a new graph G'=(V,E') with the same degree sequence as G and where (v1,vi)E'.

iii. Now show that there must be a graph with the given degree sequence but in which v1 has neighbors v2,v3,,vdi+1.

c) Using the result from part (b), describe an algorithm that on input d1,,dn (not necessarily sorted) decides whether there exists a graph with this degree sequence. Your algorithm should run in time polynomial in n and in m=i=1ndi .

In this problem, we will develop a new algorithm for finding minimum spanning trees. It is based upon the following property:

Pick any cycle in the graph, and let e be the heaviest edge in that cycle. Then there is a minimum spanning tree that does not contain e.

(a) Prove this property carefully.

(b) Here is the new MST algorithm. The input is some undirected graph G=(V,E) (in adjacency list format) with edge weights {we}.sort the edges according to their weights for each edge eE, in decreasing order of we:

if e is part of a cycle of G:

G = G - e (that is, remove e from G )

return G , Prove that this algorithm is correct.

(c) On each iteration, the algorithm must check whether there is a cycle containing a specific edge . Give a linear-time algorithm for this task, and justify its correctness.

(d) What is the overall time taken by this algorithm, in terms of |E|? Explain your answer.

Show that for any integer n that is a power of 2 , there is an instance of the set cover problem (Section 5.4) with the following properties:

  1. There are n elements in the base set.
  2. The optimal cover uses just two sets.
  3. The greedy algorithm picks at least log n sets.

Thus the approximation ratio we derived in the chapter is tight.

A binary counter of unspecified length supports two operations: increment (which increases its value by one) and reset (which sets its value back to zero). Show that, starting from an initially zero counter, any sequence of n increment and reset operations takes time O(n); that is, the amortized time per operation is O(1) .

See all solutions

Recommended explanations on Computer Science Textbooks

View all explanations

What do you think about this solution?

We value your feedback to improve our textbook solutions.

Study anywhere. Anytime. Across all devices.

Sign-up for free