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.

518<br />

Chapter 8 NP and Computational Intractability<br />

25.<br />

26.<br />

a nodes in X are incident to an edge in E’, and at least b nodes in Y are<br />

incident to an edge in E’.<br />

Show that, given a bipartite graph G and numbers a and b, it is NPcomplete<br />

to decide whether G has an (a, b)-skeleton.<br />

[max(g~..... ge)](x) = max(g~(x) ..... &(x)).<br />

ge) via<br />

Consider the following problem. You are given rt piecewise linear,<br />

fn defined over the interval [0, t] for some<br />

integer t. You are also given an integer B. You want to decide: Do there<br />

f~k so that<br />

f0t [max(/h ..... /~k)](x) dx > B?<br />

Prove that this problem is NP-complete.<br />

You and a friend have been trekldng through various far-off parts of<br />

the world and have accumulated a big pile of souvenirs. At the time you<br />

weren’t really thinking about which of these you were planning to keep<br />

and which your friend was going to keep, but now the time has come to<br />

divide everything up.<br />

Here’s a way you could go about doing this. Suppose there are n<br />

n, and object i has an agreed-upon value xi. (We<br />

could think of this, for example, as a monetary resale value; the case in<br />

which you and your friend don’t agree on the value is something we won’t<br />

pursue here.) One reasonable way to divide things would be to look for a<br />

partition of the objects into two sets, so that the total value of the objects<br />

in each set is the same.<br />

This suggests solving the following Number Partitioning Problem.<br />

xn; you want to decide whether<br />

the numbers can be partitioned into two sets S~ and $2 with the same<br />

sun2:<br />

Show that Number partitioning is NP-complete.<br />

and numbers k and B. You want to know whether it is possible to partition<br />

xn,<br />

28.<br />

29.<br />

30.<br />

Exercises<br />

the numbers {xi} into k sets S 1 ..... Sk so that the squared sums of the sets<br />

add up to at most B:<br />

~ x~ _

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

Saved successfully!

Ooh no, something went wrong!