It is clear that the working time for the super-compute?" does not depend on the ordering
ofjobs. Thus we can not change the time when the last job hands off to a PC. It is intuitively
clear that the last job in our schedule should have the shortest nishi
Let the contestants be numbered 1, . . . ,n, and let 5, b, 7", denote the swimming, biking,
and running times of contestant i. Here is an algorithm to produce a schedule: arrange the
contestants in order of decreasing b, + 7", and send them out in this or
We rst do this under the assumption that all edge costs are distinct. In this case, we
can solve (a) as follows. Let 6 : (U, w) be the new edge being added. We represent T using
an adjacency list, and we nd the Uw path P in T in time linear in the number
Here is a greedy algorithm for this problem. Start at the western end of the road and
begin moving east until the rst moment when theres a house h exactly four miles to the
west. We place a base station at this point (if we went any farther east without p
Say n boxes arrive in the order b1, . . . , bu. Say each box I), has a positive weight 10, and
the maximum weight each truck can carry is W. To pack the boxes into N trucks preserving
the order is to assign each box to one of the trucks 1, . . . , N so th
(a) This is false. Let G have vertices cfw_U1,U2,U3,U4, with edges between each pair of
vertices, and with the weight on the edge from U, to Uj equal to i+ j. Then every tree
has a bottleneck edge of weight at least 5, so the tree consisting of a path thr
Let the sequence S consist of 51, . . . , 5n and the sequence S consist of 51, . . . , 5%,. We
give a greedy algorithm that nds the rst event in S that is the same as 51, matches these
two events, then nds the rst event after this that is the same as 52,
(a) True. If we feed the costs 03 into Kruskals algorithm, it will sort them in the same
order, and hence put the same subset of edges in the MST.
Note: It is not enough just to say, True, because the edge costs have the same order
after they are sorted.
Suppose by way of contradiction that T and T are two distinct minimum spanning trees
of G. Since T and T have the same number of edges, but are not equal, there is some edge
6 in T but not in T. If we add 6 to T, we get a cycle C. Let 6 be the most expens
This is true. One argument is as follows: 6* is the rst edge that would be considered by
Kruskals algorithm, and so it Will be included in the minimum spanning tree.
1ex863.322.778