Docsity

Graph Optimization Problems and Greedy Algorithms II - Slides | COMP 4030, Study notes of Algorithms and Programming

Partial preview of the text

Download Graph Optimization Problems and Greedy Algorithms II - Slides | COMP 4030 and more Study notes Algorithms and Programming in PDF only on Docsity!

  • COMP 4/6030: Introduction to Algorithms Graph Optimization Problems & Greedy Algorithms II March 22,

Outline {^ Optimization problems {^ Greedy algorithms (16.2) {^ Minimum Spanning Tree (ch. 23) {^ Single-source shortest path (ch. 24) {^ Aims^ z^ Design strategy: Greedy^ z^ Algorithms (correctness..)

Relaxing an edge d [ v ]: upper bound on the weight of a shortest path from

s^ to^ v

Relaxation: an operation that tightens an upper bound

Dijkstra’s algorithm

Comparing BFS,Prim,Dijkstra

Greedy {^ Use min-priority queue to find the‘lightest’ vertex outside^ S (Dijkstra);

tree being grown (Prim) { Add this vertex to the set { Adjust the weights of the remainingvertices outside the set