Algorithm Exam Help
Algorithm Exam Help
Decision Problems
For each of the following questions, circle either T (True) or F (False),
and briefly justify your answer in the box provided (a single sentence or
picture should be sufficient). Each problem is worth 4 points: 2 points for
your answer and 2 points for your justification. If you leave both answer
and justification blank, you will receive 1 point.
0 S(u,v)∈E
vertices appearing in those edges, {u, v} (which contains
specifically V = vertices from
Vr and Vg ). Run breadth-first search from s in G0 to compute
unweighted distances. Then the r
minimum weight distance in G from s to any green vertex in V 0 ∩ Vg is
wr times the unweighted
distance computed. G0 has size O(|V |), so this step takes O(|V |) time.
Step 2: Now construct weighted graph G00 = (V 00, E00) composed of
vertex s with a new directed