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

Question: An Eulerian tourin an undirected graph is a cycle that is allowed to pass through each vertex multiple times, but must use each edge exactly once.

This simple concept was used by Euler in to solve the famous Konigsberg bridge problem, which launched the field of graph theory. The city of Konigsberg (now called Kaliningrad, in western Russia) is the meeting point of two rivers with a small island in the middle. There are seven bridges across the rivers, and a popular recreational question of the time was to determine whether it is possible to perform a tour in which each bridge is crossed exactly once. Euler formulated the relevant information as a graph with four nodes (denoting land masses) and seven edges (denoting bridges), as shown here.

Notice an unusual feature of this problem: multiple edges between certain pairs of nodes.

(a) Show that an undirected graph has an Eulerian tour if and only if all its vertices have even degree. Conclude that there is no Eulerian tour of the Konigsberg bridges.

(b) An Eulerian pathis a path which uses each edge exactly once. Can you give a similar if-and-only-if characterization of which undirected graphs have Eulerian paths?

(c) Can you give an analog of part (a) for directedgraphs?

Short Answer

Expert verified

Answer

  1. An undirected graph has a Eulerian tour if and only if all its vertices have an even degree. It is proved that there is no Eulerian tour in the Konigsberg bridges.
  2. Yes, An undirected graph with an even number of edges between every vertex has a Eurelian path.
  3. Yes. A directed graph has a Eulerian tour if two conditions are met.

Step by step solution

01

Eulerian Tour  

In an undirected graph, a Eurelian tour is a path in which all vertices are visited more than once and all edges are visited only one time.

Consider the following graph:

The Euler tour of the graph is 1,2,4,3,1

02

Proof of (a)

(a)

For an undirected graph to have a Eurelian tour, all the vertices should have an even degree. The statement can be proved as follows:

A path in a graph that contains its vertices and edges is called a walk. Generally, a graph G has verticesv0V ande0E edges . Consider the following graph:

The graph contains a Euler tour 1, 2, 3, 4, 5, 1. The degree of vertices is 2 each. Also, consider a walk from node 1 to node 5. The walk enters the vertex 1 and traverses all other vertices and edges. So, both edges of all vertices are traversed. Hence, degree of all vertices is and the graph contains a Euler tour. Similarly, every graph with Euler tour will have even degree. Hence, a graph has even degree if it contains a Eulerian tour.

Consider the given Konigsberg bridge. If there is a Eurelian tour in the bridge then every vertex has an even degree. Let a be Northern Bank, b be Big Island, c be Southern Bank and d be Small Island. The degree of each vertex is computed:

degreea=3degreeb=5degreec=3degreed=3

It is seen that no vertex has an even degree.

Hence, it is concluded that there is no Eurelian tour of the Konigsberg bridges.

03

Condition for an undirected graph to have a Eurelian path

(b)

Consider the following graphs:

  • An undirected graph with four vertices and one edge between every vertex.

Every vertex of the graph has degree which is an odd number. Therefore, it does not have a Eurelian path.

  • An undirected graph with four vertices and two edges between every vertex

Every vertex in the graph has degree which is an even number. Therefore, it has a Eurelian path.

Hence, an undirected graph with an even number of edges between every vertex has a Eurelian path.

04

Analog for directed graph

(c)

A directed graph has a Eurelian tour if it satisfies following conditions:

  • Maximum one vertex has outdegree one more than the indegreeand maximum one vertex has indegree one more than the outdegree. All the other vertices have the same outdegree and indegree.
  • Vertices with degree greater than or equal to one belong to only one connected component of the respective undirected graph.

Consider the graph:

Vertex 3 has indegree 2 and outdegree 1. Vertex 1 has indegree 1 and outdegree 2. All other vertices have indegree and outdegree equal to 1. The graph has a Euler tour 1, 2, 3, 4, 1, 3.

Therefore, a directed graph also has Eurelian tour.

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

Alice wants to throw a party and is deciding whom to call. She has n people to choose from, and she has made up a list of which pairs of these people know each other. She wants to pick as many people as possible, subject to two constraints: at the party, each person should have at least five other people whom they know and five other people whom they don’t know. Give an efficient algorithm that takes as input the list of n people and the list of pairs who know each other and outputs the best choice of party invitees. Give the running time in terms of n

How long does the recursive multiplication algorithm (page 25) take to multiply an n -bit number by an m -bit number? Justify your answer.

Show that any array of integers x[1n] can be sorted in O (n + M) time, where

role="math" localid="1659938331794" M=maxxi-minxiii

For small M, this is linear time: why doesn’t the Ω(nlogn) lower bound apply in this case?

The tramp steamer problem. You are the owner of a steamship that can apply between a group of port cities V . You make money at each port: a visit to city i earns you a profit of pi dollars. Meanwhile, the transportation cost from port i to port j is cij>0 .You want to find a cyclic route in which the ratio of profit to cost is maximized.

To this end, consider a directed graph G=(V,E) whose nodes are ports, and which has edges between each pair of ports. For any cycle C in this graph, the profit-to-cost ratio is

role="math" localid="1658920675878" r(c)=i,jicPiji,jicCij

Let r' be the maximum ratio achievable by a simple cycle. One way to determine r' is by binary search: by first guessing some ratio r , and then testing whether it is too large or too small. Consider any positive r>0 . Give each edge (i,j) a weight of wij=rcij-pj .

  1. Show that if there is a cycle of negative weight, then .
  2. Show that if all cycles in the graph have strictly positive weight, then r<r*.
  3. Give an efficient algorithm that takes as input a desired accuracy >0 and returns a simple cycle c for which r(C)3r*- Justify the correctness of your algorithm and analyze its running time in terms of |V|, and R=max(i,j)iE(PJCIJ) .

The kSPANNING TREE problem is the following.Input: An undirected graph G=(V,E) Output: A spanning tree of G in which each node has degree k, if such a tree exists.Show that for any k2:

  1. k SPANNING TREE is a search problem.
  2. k SPANNING TREE is NP-complete. (Hint: Start with k=2 and consider the relation between this problem and RUDRATA PATH.)
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