/*! This file is auto-generated */ .wp-block-button__link{color:#fff;background-color:#32373c;border-radius:9999px;box-shadow:none;text-decoration:none;padding:calc(.667em + 2px) calc(1.333em + 2px);font-size:1.125em}.wp-block-file__button{background:#32373c;color:#fff;text-decoration:none} Q6E In an undirected graph, the degr... [FREE SOLUTION] | 91Ó°ÊÓ

91Ó°ÊÓ

In an undirected graph, the degree d(u) of a vertex u is the number of neighbours u is the number of neighbors u has, or equivalently, the number of edges incident upon it. In a directed graph, we distinguish between the indegree din(u), which is the number of edges into u, and the outdegree dout(u), the number of the edges leaving u.

(a) Show that in an undirected graph, role="math" localid="1658908755010" ∑uevd(u)=2|E|

(b) Use part (a) to show that in an undirected graph, there must be an even number of vertices whose degree is odd.

(c) Does a similar statement hold for the number of vertices with odd indegree in a directed graph?

Short Answer

Expert verified

(a) It can be proved that in an undirected graph,∑uevd(u)=2|E|.

(b) Using part (a). it has been shown that in an undirected graph, there must be an even number of vertices whose degree is odd.

(c) No, a similar statement does not hold for the number of vertices with odd indegree in a directed graph.

Step by step solution

01

Explain the undirected graph and the degree

Consider the graph, that has edges without arrows that point in no direction. The degree is the number that represents the number of incoming edges of the

02

Show that in an undirected graph,∑uev d(u)=2|E|

(a)

For any edge (u,v), it contributes a degree to vertexu and vertexv at the same time. So, the edges correspond to two degrees, so the degree of the vertices is as follows.

∑uevd(u)=2|E|

Therefore, it is shown that in an undirected graph,∑uevd(u)=2|E|.

03

Show that in an undirected graph,∑uev d(u)=2|E|

(b)

The sum of the edges of the each vertex is an even number, it can be seen that the number of vertices with an odd degree must be an even number.

Consider the solution of the part(a),∑uevd(u)=2|E|,that shows that the sum of the vertices equal the even number of edges.

Therefore, Using part (a). it has been shown that in an undirected graph, there must be an even number of vertices whose degree is odd.

04

Show that in an undirected graph,∑uev d(u)=2|E|  

(c)

Consider the directed graph that has the indegrees dinand outdegrees dout. The indegree represents the number of incoming edges and the out degree represents the number of the outgoing edges from the vertex.

In the directed graph,

role="math" localid="1658912427821" ∑uevd(u)+dout=2|E|, but the parity of the sum of indegrees cannot be determined.

Therefore a similar statement does not hold for the number of vertices with odd indegree in a directed graph.

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 91Ó°ÊÓ!

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

You are given tree T=(V,E) along with a designated root node r∈V. The parent of any node V≠r, denoted p(V), is defined to be the node adjacent to v in the path from r to v . By convention, p(r)=r. For k>1, define pk(v)pk-1(pv)andp1(v)=p(v)(so pk(v)is the k th ancestor of v ). Each vertex v of the tree has an associated non-negative integer label l(v). Given a linear-time algorithm to update the labels of all the vertices T according to the following rule: lnew(v)=l(plvv).

Perform a depth-first search on the following graph; whenever there’s a choice of vertices, pick the one that is alphabetically first. Classify each edge as a tree edge or back edge, and give the pre and post number of each vertex.

A bipartite graph is a graph G=(V,E)whose vertices can be partitioned into two sets (V=V1V2andV1V2=Ï•) such that there are no edges between vertices in the same set (for instance, if , then there is no edge between and ).

(a) Give a linear-time algorithm to determine whether an undirected graph is bipartite.

(b) There are many other ways to formulate this property. For instance, an undirected graph is bipartite if and only if it can be colored with just two colors. Prove the following formulation:

an undirected graph is bipartite if and only if it contains no cycles of odd length.

(c) At most how many colors are needed to color in an undirected graph with exactly one odd length?

The reverse of a directed graph G = (V,E) is another directed graphGR=(V,ER) on the same vertex set, but with all edges reversed that is,ER={(v,u):(u,v)∈E} . Give a linear-time algorithm for computing the reverse of a graph in adjacency list format.

Perform depth-first search on each of the following graphs; whenever there’s a choice of vertices, pick the one that is alphabetically first. Classify each edge as a tree edge, forward edge, back edge, or cross edge, and give the pre and post number of each vertex.

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.