vk in order possibly visiting other vertices in

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

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: city sites (represented by vertices in V ). You’ve also written a history of Boston, which would be best described by visiting sites v0 , v1 , . . . , vk in that order. Your goal is to find the shortest path in G that visits v0 , v1 , . . . , vk in order, possibly visiting other vertices in between. (The path must have v0 , v1 , . . . , vk as a subsequence; the path is allowed to visit a vertex more than once. For example, v0 , v2 , v1 , v2 , . . . , vk is legal.) To do the computation, you’ve found an online service, Paths ’R Us, that will compute the shortest path from a given source s to a given target t in a given weighted graph, for the bargain price of $1. You see how to solve the problem by paying $k , calling Paths ’R Us with (v0 , v1 , G), (v1 , v2 , G), . . . , (vk−1 , vk , G) and piecing together the paths. Describe how to solve the problem with only $1 by calling Paths ’R Us with (s, t, G ) for a newly constructed graph G = (V , E , w ), and converting the resulting pa...
View Full Document

This document was uploaded on 03/17/2014 for the course ELECTRICAL 6.006 at MIT.

Ask a homework question - tutors are online