04.09.2013 Views

Algorithm Design

Algorithm Design

Algorithm Design

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

516<br />

Chapter 8 NP and Computational Intractability<br />

21.<br />

and a botmd B, we define the Low-Diameter Clustering Problem as fol-<br />

lows: Can the objects be partitioned into k sets, so that no two points in<br />

the same set are at a distance greater than B from each other?<br />

Prove that Low-Diameter Clustering is N-P-complete.<br />

After a few too many days immersed in the popular entrepreneurial selfhelp<br />

book Mine Your Own Business, you’ve come to the realization that<br />

you need to upgrade your office computing system. This, however, leads<br />

to some tricky problems.<br />

In configuring your new system, there are k components that must<br />

be selected: the operating system, the text editing software, the .e-mail<br />

program, and so forth; each is a separate component. For the ]th component<br />

of the system, you have a set A i of options; and a configuration of<br />

the system consists of a selection of one element from each of the sets<br />

of options A1, A2 .....<br />

Now the trouble arises because certain pairs of options from different<br />

sets may not be compatible. We say that option x~<br />

form an incompatible pair ff a single system cannot contain them both.<br />

(For example, Linux (as an option for the operating system) and I~crosoft<br />

Word (as an option for the text-editing software) form an incompatible<br />

pair.) We say that a configuration of the system is fully compatible if it<br />

Xk ~ Ak such that none of the pairs<br />

consists of elements xl ~ A1, x2 ~ A2 ....<br />

(x~, x i) is an incompatible pair.<br />

We can now define the Fully Compatible Configuration (FCC) Problem.<br />

Aninstance of FCC consists of disjoint sets of options A~, A2 ..... Ak, and a<br />

set P of incompatible pairs (x, y), where x and y are elements of different<br />

sets of options. The problem is to decide whether there exists a fully<br />

compatible configuration: a selection of an element from eachoption set<br />

so that no pair of selected elements belongs to the set P.<br />

Example. Suppose k = 3, and the sets A1, A2, A3 denote options for the<br />

operating system, the text-editing software, and the e-mail program,<br />

respectively. We have<br />

AI= {Linux, Windows NT},<br />

A2= {emacs, Word},<br />

A3= {Outlook, Eudora, rmail},<br />

with the set of incompatible pairs equal to<br />

p _-- {(Linux, Word), (Linux, Outlook), 6qord, rmail)}.<br />

22.<br />

Exercises<br />

Then the answer to the decision problem in this instance of FCC is<br />

yes--for example, the choices Linux ~ A1, emacs ~ A2, rmail ~ A 3 is a fully<br />

compatible configuration according to the definitions above.<br />

Prove that Fully Compatible Configuration is NP-complete.<br />

Suppose that someone gives you a black-box algorithm A that takes an<br />

undirected graph G = (V, E), and a number k, and behaves as follows.<br />

o If G is no.t connected, it.simply returns "G is not connected."<br />

° If G is connected and has an independent set of size at least k, it<br />

returns "yes." -~<br />

¯ If G is connected and does not have an independent set 6f size at<br />

least k, it returns "no." ~<br />

Suppose that the algorithm A runs in time polynomial in the size of G<br />

and k.<br />

Show how, using co!Is to A, you could then solve the Independent Set<br />

Problem in polynomial time: Given an arbitrary undirected graph G, and<br />

a number k, does G contain an independent set of size at least k?<br />

23. Given a set of finite binary strings S = {s 1 ..... Sk} , we say that a string<br />

~ is a concatenation over S if it is equal to s~s~2.. ¯ s~, for some indices<br />

i~ ~ {! ..... k}.<br />

A friend of yours is considering the following problem: Given two<br />

sets of finite binary strings, A -- {a 1 ..... am} and B = {b~ ..... ha}, does<br />

there exist any string u so that u is both a concatenation over A and a<br />

concatenation over B?<br />

Your friend announces, "At least the problem is in N~P, since I would<br />

just have to exhibit such a string u in order to prove the answer is yes."<br />

You point out (politely, of course) that this is a completely inadequate<br />

explanation; how do we know that the shortest such string u doesn’t<br />

have length exponential in the size of the input, in which case it would<br />

not be a polynomial-size certificate?<br />

However, it turns out that this claim can be turned into a proof of<br />

membership in X~P. Specifically, prove the following statement.<br />

If there is a string u that is a concatenation over boti~ A and B, then there<br />

is such a string whose length is bounded by a polynomial in the sum of the<br />

lengths of the strings in A U B.<br />

24. Let G = (V, E) be a bipartite graph; suppose its nodes are partitioned into<br />

sets X and Y so that each edge has one end in X and the other in y. We<br />

define an (a, b)-skeleton of G to be a set of edges E’ _c E so that at most<br />

517

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!