John lives in a city whose streets has the same length. His apartment is located at a specified node H. John need to do his errands where he visits each of k different shop in order. However, each store have more than one location in his city. More particularly, for each 1 ≤ i ≤ k there is a set $S_{i}$ of vertices at which a branch of the $i^{th}$ shop is located (you can assume that the $S_{i}$ are disjoint). Construct a new graph G' as following:
Create a new graph G' whose nodes are given by both a node of G, representing John’s current location, and a number 0 ≤ i ≤ k, giving the number of stops that John has successfully made. In particular, the vertices of G' are exactly given by (v, i) with v ∈ Node and i ∈ {0, 1,..., k}. Edges in G' are between (u, i) and (v, i) if (u, v) is an edge of G, or between (u, i) and (v, i + 1) if (u, v) is an edge of G and v ∈ $S_{i+1}$.
What does it really mean by "between (u,i) and (v,i+1) if (u,v) is an edge of G and V v ∈ $S_{i+1}$"?
Let's say we have simple graph G as below:
Here is my attempt of constructing the new graph G'.
How many new nodes do we need to make, 3 or 4 copies? I only make 3 so far since there are only 3 errands. Please let me know if my G' is correct. Thank you.