# v k in v and for each edge u v e we form the

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

This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: th into a path in G. Solution: To form the graph G , we start from the disjoint union of k copies of the given graph G, using superscripts to denote the different copies G1 , G2 , . . . , Gk . That is, for each vertex v ∈ V , we make k copies v 1 , v 2 , . . . , v k in V ; and for each edge (u, v ) ∈ E , we form the edges 12 (u1 , v 1 ), (u2 , v 2 ), . . . , (uk , v k ) in E , each of weight w(u, v ). Then we add the edges (v1 , v1 ), k−1 k 23 (v2 , v2 ), . . . , (vk−1 , vk−1 ), each of weight 0, to complete the graph G . Finally we set the start 1 k vertex s = v0 and the target vertex t = vk , and call Paths ’R Us with (s, t, G ). Intuitively, the subgraph Gi represents a situation in which the path has visited the Boston sites v0 , v1 , . . . , vi−1 , and is currently aiming to visit vi . Once the path visits vi , it can take the zeroii weight edge (vi , vi +1 ), which represents the fact that vi has been visited. (A path may choose not to follow this edge, but it must do so eventually in order to reach the next copy Gi+1 and eventually the...
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