COS 423 Problem Set No. 5 Due Wed. April 26

advertisement

COS 423 Problem Set No. 5 Due Wed. April 26

Spring 2006 Collaboration Allowed

1.

[Textbook, #19, P.514]

Suppose you’re acting as a consultant for the port authority of a small

Pacific Rim nation. They’re currently doing a multi-billion-dollar business per year, and their revenue is constrained almost entirely by the rate at which they can unload ships that arrive in the port.

Handling hazardous materials adds additional complexity to what is, for them, an already complicated task. Suppose a convoy of ships arrives in the morning and delivers a total of n canisters, each containing a different kind of hazardous material. Standing on the dock is a set of m trucks, each of which can hold up to k containers.

Here are two related problems, which arise from different types of constraints that might be placed on the handling of hazardous materials. For each of the two problems, give one of the following two answers:

A polynomial-time algorithm to solve it; or

A proof that is NP-complete.

(a) For each cannister, there is a specified subset of the trucks in which it may be safely carried. Is there a way to load all n cannisters into the m trucks so that no truck is overloaded, and each container goes in a truck that is allowed to carry it?

(b) In this different version of the problem, any cannister can be placed in any truck; however there are certain pairs of cannisters that cannot be placed together in the same truck. (The chemicals they contain may react explosively if brought into contact.) Is there a way to load all n cannisters into the m trucks so that no truck is overloaded, and no two cannisters are placed in the same truck when they are not supposed to be?

2.

[Textbook, #30, P.519]

One thing that’s not always apparent when thinking about traditional

“continuous math” problems is the way discrete, combinatorial issues of the kind we’re studying here can creep into what look like standard calculus questions.

Consider, for example, the traditional problem of minimizing a onevariable function like ( ) x 3 x

2

over an interval like x

[0,1].

The derivative has a zero at x

1/ 6, but this in fact is a maximum of the function, not a minimum; to get the minimum, one has to heed the standard warning to check the values on the boundary of the interval as well. (The minimum is in fact achieved on the boundary, at x

1.)

Checking the boundary isn’t such a problem when you have a function in one variable; but suppose we’re now dealing with the problem of minimizing a function in n variables ,

1 2

,..., x n over the unit cube, where each of

,

1 2

,..., x n

[0,1].

The minimum may be achieved on the interior of the cube, but it may be achieved on the boundary; and this latter prospect is rather daunting,

since the boundary consists of 2 n

“corners” (where each x is equal to either 0 or i

1) as well as various pieces of other dimensions. Calculus books tend to get suspiciously vague around here, when trying to describe how to handle multivariable minimization problems in the face of this complexity.

It turns out there’s a reason for this: Minimizing an n

 variable function over the unit cube in n dimensions is as hard as an NP-complete problem. To make this concrete, lets consider the special case of polynominals with integer coefficients over n variables x x

1 2

,..., x n

.

To review some terminology, we say a monomial is a product of a real-number coefficient c and each variable x raised to i some nonnegative power a i

; we can write this as a cx x a

2

2 ...

x a n n

.

(For example,

2

2 x x x

1 2 3

4 is a monomial.) A polynomial is then a sum of a finite set of monomials.

(For example 2

1

2 4  x x

6

2 2 x x

3 is a polynomial.)

We define the Multivariable Polynomial Minimization Problem as follows: Given a polynomial in n variables with integer coefficients, and given an integer bound B, is there a choice of real numbers x x

1 2

,..., x

 n

[0,1] that causes the polynomial to achieve a value that is ≤ B ?

Choose a problem Y from this chapter that is known to be NP-complete and show that

Y

Multivariable Polynomial Minimization. p

3.

[Textbook, #41, P.528]

Given a directed graph G , a cycle cover is a set of node-disjoint cycles so that each node of G belongs to a cycle. The Cycle Cover Problem asks whether a given directed graph has a cycle cover.

(a) Show that the Cycle Cover Problem can be solved in polynomial time.

(Hint: Use Bipartite Matching.)

(b) Suppose we require each cycle to have at most three edges. Show that determining whether a graph G has such a cycle cover is NP-complete.

4.

[Textbook, #42, P.528]

Suppose you’re consulting for a company in northern New Jersey that designs communications networks, and they come to you with the following problem.

They’re studying a specific n

 node communications network, modeled as a directed graph G

( , ).

For reasons of fault tolerance, they want to divide up

G into as many virtual “domains’ as possible. A domain in G is a set X of nodes, of size at least 2, so that for each pair of nodes ,

X there are directed paths from u to v and v to u that are contained entirely in X .

Show that the following Domain Decomposition Problem is NP-complete.

Given a directed graph G

( , ) and a number k , can be partitioned into at least k sets, each of which is a domain?

5.

[Textbook, #1, P.550]

Let’s consider a special case of Quantified 3-SAT in which the underlying

Boolean formula has no negated variable. Specifically, let

( ..., x n

) be a

Boolean formula of the form

C

1

C

2

 

C k

, where each C

1 is a disjunction of three terms. We say

 is monotone if each term in each clause consists of a nonnegated variable-that is, each term is equal to x i

, for some , rather than x i

.

We define Monotone QSAT to be the decision problem x x

1 2

...

 x n

2

 x n

1 x n x

1 x n

)?

where the formula

 is monotone.

Do one of the following two things: (a) prove that Monotome QSAT is

PSPACE-complete; or (b) give an algorithm to solve arbitrary instances of

Monotone QSAT that runs in time polynomial in n .

(Note that in (b), the goal is polynomial time , not just polynomial space.)

Download