{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

hbs8 - s v path • pred v is the predecessor of v in the...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
CS473ug Head Banging Session #8 10/24/06 - 10/26/06 1. Alien Abduction Mulder and Scully have computed, for every road in the United States, the exact probability that someone driving on that road won’t be abducted by aliens. Agent Mulder needs to drive from Langley, Virginia to Area 51, Nevada. What route should he take so that he has the least chance of being abducted? More formally, you are given a directed graph G = ( V, E ), where every edge e has an independent safety probability p ( e ). The safety of a path is the product of the safety probabilities of its edges. Design and analyze an algorithm to determine the safest path from a given start vertex s to a given target vertex t . 2. The Only SSSP Algorithm In the lecture notes, Jeff mentions that all SSSP algorithms are special cases of the following generic SSSP algorithm. Each vertex v in the graph stores two values, which describe a tentative shortest path from s to v . dist( v ) is the length of the tentative shortest
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: s ; v path. • pred( v ) is the predecessor of v in the shortest s ; v path. We call an edge tense if dist( u ) + w ( u → v ) < dist( v ). Our generic algorithm repeatedly finds a tense edge in the graph and relaxes it: Relax( u → v ): dist( v ) ← dist( u ) + w ( u → v ) pred( v ) ← u If there are no tense edges, our algorithm is finished, and we have our desired shortest path tree. The correctness of the relaxation algorithm follows directly from three simple claims. The first of these is below. Prove it. • When the algorithm halts, if dist( v ) 6 = ∞ , then dist( v ) is the total weight of the predecessor chain ending at v : s → ··· → ( pred ( pred ( v )) → pred ( v ) → v. 3. Can’t find a Cut-edge A cut-edge is an edge which when deleted disconnects the graph. Prove or disprove the following. Every 3-regular graph has no cut-edge. (A common approach is induction.) 1...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online