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

When Kruskal invented the algorithm that finds minimumspanning trees by adding edges in order of increasing weightas long as they do not form a simple circuit, he also inventedanother algorithm sometimes called the reverse-delete algorithm. This algorithm proceeds by successively deletingedges of maximum weight from a connected graph as long asdoing so does not disconnect the graph.

Express the reverse-delete algorithm in pseudocode.

Short Answer

Expert verified

Procedure reverse-delete(\({\bf{G}}\): connected simple graph with\({\bf{n}}\)vertices)

\({\bf{T: = G}}\)

while\({\bf{T}}\)has more than\({\bf{n - 1}}\)edges.

\({\bf{e: = }}\)edge with largest weight in a simple circuit of\({\bf{T}}\)

\({\bf{T: = T - }}\left\{ {\bf{e}} \right\}\)

return\({\bf{T}}\)

Step by step solution

Achieve better grades quicker with Premium

  • Unlimited AI interaction
  • Study offline
  • Say goodbye to ads
  • Export flashcards

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

01

Definition

A graph is connected if there exists a path between every pair of vertices.

Reverse-delete algorithm:

Start from the given graph \({\bf{G}}\) with \({\bf{n}}\) vertices. Repeatedly remove the edge with the largest weight from the graph \({\bf{G}}\) as long as it doesn't disconnect \({\bf{G}}\).The algorithm stops when the resulting graph contains only \({\bf{n - 1}}\) edges (as a spanning tree of \({\bf{G}}\) containing \({\bf{n}}\) vertices has\({\bf{n - 1}}\) edges).

02

Using the reverse delete algorithm

We call the algorithm "reverse-delete" and the input is a connected simple graph \({\bf{G}}\) procedure

reverse-delete(\({\bf{G}}\) : connected simple graph with \({\bf{n}}\) vertices) We start from the given graph \({\bf{G T: = G}}\) We repeatedly remove the edge with the largest weight as long as it doesn't disconnect the graph. We end the algorithm when thegraph has only \({\bf{n - 1}}\) edges remaining. while \({\bf{T}}\) has more than \({\bf{n - 1}}\) edges. \({\bf{e: = }}\) edge with largest weight in a simplecircuit of \({\bf{T}}\;\;\;{\bf{T: = T - \{ e\} }}\) Finally, we return \({\bf{T}}\) which should contain the minimum spanning tree. return \({\bf{T}}\).

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

Draw three different B-trees of degree 3 with height 4.

Sollin's algorithm produces a minimum spanning tree from a connected weighted simple graph \({\bf{G = (V,E)}}\) by successively adding groups of edges. Suppose that the vertices in \({\bf{V}}\) are ordered. This produces an ordering of the edges where \({\bf{\{ }}{{\bf{u}}_{\bf{0}}}{\bf{,}}{{\bf{v}}_{\bf{0}}}{\bf{\} }}\) precedes \({\bf{\{ }}{{\bf{u}}_{\bf{1}}}{\bf{,}}{{\bf{v}}_{\bf{1}}}{\bf{\} }}\) if \({{\bf{u}}_{\bf{0}}}\) precedes \({{\bf{u}}_{\bf{1}}}\) or if \({{\bf{u}}_{\bf{0}}}{\bf{ = }}{{\bf{u}}_{\bf{1}}}\) and \({{\bf{v}}_{\bf{0}}}\) precedes \({{\bf{v}}_{\bf{1}}}\). The algorithm begins by simultaneously choosing the edge of least weight incident to each vertex. The first edge in the ordering is taken in the case of ties. This produces a graph with no simple circuits, that is, a forest of trees (Exercise \({\bf{24}}\) asks for a proof of this fact). Next, simultaneously choose for each tree in the forest the shortest edge between a vertex in this tree and a vertex in a different tree. Again the first edge in the ordering is chosen in the case of ties. (This produces a graph with no simple circuits containing fewer trees than were present before this step; see Exercise \({\bf{24}}\).) Continue the process of simultaneously adding edges connecting trees until \({\bf{n - 1}}\) edges have been chosen. At this stage a minimum spanning tree has been constructed.

Show that the addition of edges at each stage of Sollinโ€™s algorithm produces a forest.

Which of these graphs are trees?

In Exercises 2โ€“6 find a spanning tree for the graph shown by removing edges in simple circuits.

Find a minimum spanning tree of each of these graphs where the degree of each vertex in the spanning tree does not exceed 2.

See all solutions

Recommended explanations on Math 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