
CS 473U: Undergraduate Algorithms, Fall 2006
Homework 6
Due at 4 p.m. on Friday, November 17, 2006 in 3229 Siebel Center
Remember to turn in separate, individually stapled solutions to each of the problems.
1. Given an undirected graph G(V , E), with three vertices u, v, w ∈V, you want to know
whether there exists a path from uto wvia v. (That is, the path from uto wmust use v
as an intermediate vertex.) Describe an efficient algorithm to solve this problem.
2. Ad-hoc Networks, made up of cheap, low-powered wireless devices, are often used on battle-
fields, in regions that have recently suffered from natural disasters, and in other situtations
where people might want to monitor conditions in hard-to-reach areas. The idea is that a
large collection of the wireless devices could be dropped into the area from an airplane (for
instance), and then they could be configured into an efficiently functioning network.
Since the devices are cheap and low-powered, they frequently fail, and we would like our
networks to be reliable. If a device detects that it is likely to fail, it should transmit the
information it has to some other device (called a backup) within range of it. The range is
limited; we assume that there is a distance dsuch that two devices can communicate if and
only if they are within distance dof each other. To improve reliability, we don’t want a device
to transmit information to a neighbor that has already failed, and so we require each device v
to have at least kbackup devices that it could potentially contact, all of which must be within
dmeters of it. We call this the backup set of v. Also, we do not want any device to be in the
backup set of too many other devices; if it were, and it failed, a large fraction of our network
would be affected.
The input to our problem is a collection of ndevices, and for each pair u, v of devices, the
distance between uand v. We are also given the distance dthat determines the range of a
device, and parameters band k. Describe an algorithm that determines if, for each device, we
can find a backup set of size k, while also requiring that no device appears in the backup set
of more than bother devices.