Notes:

Problem : Consider the clean bicycle routing problem: finding a route from a starting point to a destination that minimizes total distance over dirt roads, breaking ties by total distance. For example, a route of 50 total miles with no dirt roads would be favored over a 2 mile route with 1 mile on dirt roads.

Formally, the problem is: given a starting vertex and a destination vertex in a directed graph in which each edge is labelled with the total distance and the distance on dirt roads (where $d_{tot} \ge d_{dirt} \ge 0$ for each edge), find a "best" route from the start to the destination, where path $P$ is better than path $P'$ if either

$P$ is "best" if there is no $P'$ that is better than $P$.

Problem : Devise an efficient algorithm for determining the location of food deserts. The input is

The output should be a list of the intersections that are food deserts. Compute the asymptotic running time of your algorithm, explaining your computation. Include in your explanation your choice of representation for the graph and other ADTs used in your solution. You need not prove that your algorithm is correct.

food:7,10; pops:20,25,15,40,10,40,10,20,20,20; edges:(1,2)=3 (1,4)=2, (1,4)=3, (2,3)=4, (2,6)=2, (3,8)=7, (4,5)=4, (4,7)=4, (5,8)=6 (5,9)=3, (6,8)=2, (7,9)=3, (8,10)=4, (9,10)=5
VertexClosest
Food
Dist.Pop.Cumulative
Pop.
7 7 0 10 10
10 10 0 20 30
9 7 3 20 50
4 7 4 40 90
8 10 4 20 110
5 7 6 10 120
1 7 6 20 140
6 10 6 40 180
2 10 8 25 205
3 10 11 15 220

The small number in each vertex is its index; the large number is its population. The table shows vertices sorted by distance to closest food source, with cumulative population. $S$ is $[7, 10]$. When $b = 130$, the output would be $[2, 3]$ or $[3, 2]$ since the closest 130 people live within 6 or closer of an intersection in $S$ and the people who live at $2$ and $3$ are strictly farther than that (8 and 11 respectively). Note that the people at vertex 6 are at the same distance as those at vertices 1 and 5, so they are not in a food desert – the "strictly farther" condition disambiguates cases like this where reordering vertices that are all at the threshold distance (5, 1, and 6 in this example) would result in different sets containing the closest $b$.

Problem : Prove that if there is no unique minimum spanning tree for a weighted, undirected graph (with not necessarily distinct weights) then for any minimum spanning tree $T$ there is another minimum spanning tree $T'$ that differs from $T$ in only one edge (so, when $T$ and $T'$ are considered as sets of edges, $\mid T \setminus T'\mid = \mid T' \setminus T\mid = 1$).

Problem : Give an efficient algorithm to determine if a given minimum spanning tree is unique. The inputs to your algorithm are

You may assume that you can determine the edge of maximum weight (and its weight) on the simple path between any two vertices using edges in $T$ in $O(\log n)$ time. Compute the overall asymptotic running time of your algorithm in terms of $n$ (the number of vertices) and $m$ (the number of edges) and explain your result. You need not prove that your algorithm is correct.