{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Lecture19

# Lecture19 - Algorithms in Systems Engineering IE170 Lecture...

This preview shows pages 1–5. Sign up to view the full content.

Algorithms in Systems Engineering IE170 Lecture 19 Dr. Ted Ralphs

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
IE170 Lecture 19 1 References for Today’s Lecture Required reading CLRS Chapter 22-24 References R. Sedgewick, Algorithms in C++ (Third Edition), 1998.
IE170 Lecture 19 2 Another View of Prim’s Algorithm Last time, we derived Prim’s Algorithm as a special case of graph search . The algorithm can also be viewed as a special case of another general class of algorithms called greedy algorithms . A greedy algorithm is one that makes the choice at each step that looks the best “at the moment” and doesn’t reconsider that choice later. We can view the construction of an MST as a greedy algorithm, but first we must define some terminology. Given an undirected graph G = ( V, E ) , a cut is a set S V that defines a partition of V into two nonempty subsets, S and V \ S . An edge is said to cross the cut if it connects a node in S to a node in V \ S . Our goal is to build a spanning tree by adding one edge at a time to a set T in a “greedy” fashion. Basically, we just need to somehow guarantee ourselves that at each step, the current set can be “extended” to an MST . How do we do that?

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
IE170 Lecture 19 3 Safe Edges Let’s assume that our current set of edges T already satisfies the property that T can be extended to an MST . Question : What edges can we add to T to maintain the property? Answer : Rationale : We will call such edge a safe edge if it also doesn’t create a cycle when added to T .
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 13

Lecture19 - Algorithms in Systems Engineering IE170 Lecture...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online