Warning: foreach() argument must be of type array|object, bool given in /var/www/html/web/app/themes/studypress-core-theme/template-parts/header/mobile-offcanvas.php on line 20

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

Ternary A server has customers waiting to be served. The service time required by eachcustomer is known in advance: it is ciminutes for customer i. So if, for example, the customers are served in order of increasing i , then the ithcustomer has to wait Pij=1tjminutes. We wish to minimize the total waiting time.

T=Xni=1(time spent waiting by customer ).

Give an efficient algorithm for computing the optimal order in which to process the customers.

The basic intuition behind Huffman’s algorithm, that frequent blocks should have short encodings and infrequent blocks should have long encodings, is also at work in English, where typical words like I, you, is, and, to, from, and so on are short, and rarely used words like velociraptor are longer.

However, words like fire!, help!, and run! are short not because they are frequent, but perhaps because time is precious in situations where they are used.

To make things theoretical, suppose we have a file composed of m different words, with frequencies f1,...,fm. Suppose also that for the ithword, the cost per bit of encoding is ci. Thus, if we find a prefix-free code where the ithword has a codeword of length Ii, then the total cost of the encoding will be localid="1659078764835" fi·ci·li.

Show how to modify Huffman’s algorithm to find the prefix-free encoding of minimum total cost.

Suppose you are given a weighted graph G=(V,E) with a distinguished vertex s and where all edge weights are positive and distinct. Is it possible for a tree of shortest paths from s and a minimum spanning tree in G to not share any edges? If so, give an example. If not, give a reason.

Suppose you implement the disjoint-sets data structure usingunion-by-rank but not path compression. Give a sequence ofm union and find operations onnelements that take Ω(mlogn)time.

Consider an undirected graph G=(V,E)with nonnegative edge weights role="math" localid="1658915178951" we0. Suppose that you have computed a minimum spanning tree of G, and that you have also computed shortest paths to all nodes from a particular node role="math" localid="1658915296891" sV. Now suppose each edge weight is increased by 1: the new weights are w0e=we+1.

(a) Does the minimum spanning tree change? Give an example where it changes or prove it cannot change.

(b) Do the shortest paths change? Give an example where they change or prove they cannot change.

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