Partitioning Graphs of Supply and Demand

Similar documents
Problem Set 9 Solutions

College of Computer & Information Science Fall 2009 Northeastern University 20 October 2009

Calculation of time complexity (3%)

NP-Completeness : Proofs

Maximizing the number of nonnegative subsets

Computing Correlated Equilibria in Multi-Player Games

Complete subgraphs in multipartite graphs

Assortment Optimization under MNL

The Minimum Universal Cost Flow in an Infeasible Flow Network

5 The Rational Canonical Form

Finding Dense Subgraphs in G(n, 1/2)

Lecture Notes on Linear Regression

Module 9. Lecture 6. Duality in Assignment Problems

princeton univ. F 17 cos 521: Advanced Algorithm Design Lecture 7: LP Duality Lecturer: Matt Weinberg

MATH 5707 HOMEWORK 4 SOLUTIONS 2. 2 i 2p i E(X i ) + E(Xi 2 ) ä i=1. i=1

First day August 1, Problems and Solutions

n α j x j = 0 j=1 has a nontrivial solution. Here A is the n k matrix whose jth column is the vector for all t j=0

HMMT February 2016 February 20, 2016

The Study of Teaching-learning-based Optimization Algorithm

Volume 18 Figure 1. Notation 1. Notation 2. Observation 1. Remark 1. Remark 2. Remark 3. Remark 4. Remark 5. Remark 6. Theorem A [2]. Theorem B [2].

find (x): given element x, return the canonical element of the set containing x;

The Order Relation and Trace Inequalities for. Hermitian Operators

Stanford University CS359G: Graph Partitioning and Expanders Handout 4 Luca Trevisan January 13, 2011

Chapter 5. Solution of System of Linear Equations. Module No. 6. Solution of Inconsistent and Ill Conditioned Systems

On the Multicriteria Integer Network Flow Problem

Single-Facility Scheduling over Long Time Horizons by Logic-based Benders Decomposition

O-line Temporary Tasks Assignment. Abstract. In this paper we consider the temporary tasks assignment

Notes on Frequency Estimation in Data Streams

U.C. Berkeley CS294: Spectral Methods and Expanders Handout 8 Luca Trevisan February 17, 2016

18.1 Introduction and Recap

Learning Theory: Lecture Notes

Kernel Methods and SVMs Extension

The L(2, 1)-Labeling on -Product of Graphs

Solutions to exam in SF1811 Optimization, Jan 14, 2015

U.C. Berkeley CS294: Beyond Worst-Case Analysis Luca Trevisan September 5, 2017

Introduction to Algorithms

Edge Isoperimetric Inequalities

Stanford University CS254: Computational Complexity Notes 7 Luca Trevisan January 29, Notes for Lecture 7

Lecture 20: Lift and Project, SDP Duality. Today we will study the Lift and Project method. Then we will prove the SDP duality theorem.

New Turnpike Theorems for the Unbounded Knapsack Problem

An Interactive Optimisation Tool for Allocation Problems

Lecture 4: November 17, Part 1 Single Buffer Management

Structure and Drive Paul A. Jensen Copyright July 20, 2003

A 2D Bounded Linear Program (H,c) 2D Linear Programming

Appendix B. Criterion of Riemann-Stieltjes Integrability

Linear Regression Analysis: Terminology and Notation

VARIATION OF CONSTANT SUM CONSTRAINT FOR INTEGER MODEL WITH NON UNIFORM VARIABLES

Dynamic Programming. Preview. Dynamic Programming. Dynamic Programming. Dynamic Programming (Example: Fibonacci Sequence)

ECE559VV Project Report

Durban Watson for Testing the Lack-of-Fit of Polynomial Regression Models without Replications

Errors for Linear Systems

APPENDIX A Some Linear Algebra

Simultaneous Optimization of Berth Allocation, Quay Crane Assignment and Quay Crane Scheduling Problems in Container Terminals

NUMERICAL DIFFERENTIATION

2E Pattern Recognition Solutions to Introduction to Pattern Recognition, Chapter 2: Bayesian pattern classification

Resource Allocation with a Budget Constraint for Computing Independent Tasks in the Cloud

Foundations of Arithmetic

Lecture 10 Support Vector Machines II

More metrics on cartesian products

Using T.O.M to Estimate Parameter of distributions that have not Single Exponential Family

Power law and dimension of the maximum value for belief distribution with the max Deng entropy

Lectures - Week 4 Matrix norms, Conditioning, Vector Spaces, Linear Independence, Spanning sets and Basis, Null space and Range of a Matrix

Exercise Solutions to Real Analysis

Lecture 3 January 31, 2017

The optimal delay of the second test is therefore approximately 210 hours earlier than =2.

Generalized Linear Methods

Additional Codes using Finite Difference Method. 1 HJB Equation for Consumption-Saving Problem Without Uncertainty

where a is any ideal of R. Lemma 5.4. Let R be a ring. Then X = Spec R is a topological space Moreover the open sets

Chapter Newton s Method

COS 521: Advanced Algorithms Game Theory and Linear Programming

arxiv: v1 [math.co] 1 Mar 2014

Minimum Activation Cost Edge-Disjoint Paths in Graphs with Bounded Tree-Width

COMPARISON OF SOME RELIABILITY CHARACTERISTICS BETWEEN REDUNDANT SYSTEMS REQUIRING SUPPORTING UNITS FOR THEIR OPERATIONS

A SURVEY OF PROPERTIES OF FINITE HORIZON DIFFERENTIAL GAMES UNDER ISAACS CONDITION. Contents

On the Repeating Group Finding Problem

Introduction to Algorithms

EEE 241: Linear Systems

Lecture Randomized Load Balancing strategies and their analysis. Probability concepts include, counting, the union bound, and Chernoff bounds.

Lecture 12: Discrete Laplacian

= z 20 z n. (k 20) + 4 z k = 4

The lower and upper bounds on Perron root of nonnegative irreducible matrices

Hidden Markov Models

A New Algorithm for Finding a Fuzzy Optimal. Solution for Fuzzy Transportation Problems

Distance Three Labelings of Trees

Clustering Affine Subspaces: Algorithms and Hardness

Single-machine scheduling with trade-off between number of tardy jobs and compression cost

Interactive Bi-Level Multi-Objective Integer. Non-linear Programming Problem

MMA and GCMMA two methods for nonlinear optimization

Transfer Functions. Convenient representation of a linear, dynamic model. A transfer function (TF) relates one input and one output: ( ) system

Speeding up Computation of Scalar Multiplication in Elliptic Curve Cryptosystem

Valuated Binary Tree: A New Approach in Study of Integers

Real-Time Systems. Multiprocessor scheduling. Multiprocessor scheduling. Multiprocessor scheduling

How to Cope with NP-Completeness

EEL 6266 Power System Operation and Control. Chapter 3 Economic Dispatch Using Dynamic Programming

Min Cut, Fast Cut, Polynomial Identities

Linearity. If kx is applied to the element, the output must be ky. kx ky. 2. additivity property. x 1 y 1, x 2 y 2

Case A. P k = Ni ( 2L i k 1 ) + (# big cells) 10d 2 P k.

Lecture 2: Gram-Schmidt Vectors and the LLL Algorithm

Common loop optimizations. Example to improve locality. Why Dependence Analysis. Data Dependence in Loops. Goal is to find best schedule:

Amusing Properties of Odd Numbers Derived From Valuated Binary Tree

Transcription:

Parttonng Graphs of Supply and Demand Takehro Ito Graduate School of Informaton Scences, Tohoku Unersty, Aoba-yama 6-6-05, Senda, 980-8579, Japan. take@nshzek.ece.tohoku.ac.p Abstract. Suppose that each ertex of a graph G s ether a supply ertex or a demand ertex and s assgned a poste real number, called the supply or the demand. Each demand ertex can recee power from at most one supply ertex through edges n G. One thus wshes to partton G nto connected components so that each component C ether has no supply ertex or has exactly one supply ertex whose supply s at least the sum of demands n C, and wshes to maxmze the fulfllment, that s, the sum of demands n all components wth supply ertces. Ths maxmzaton problem s known to be NP-hard een for trees hang exactly one supply ertex and strongly NP-hard for general graphs. In ths paper, we focus on the approxmablty of the problem. We frst show that the problem s MAXSNP-hard and hence there s no polynomaltme approxmaton scheme (PTAS) for general graphs unless P = NP. We then present a fully polynomal-tme approxmaton scheme (FPTAS) for trees. The FPTAS can be extended for seres-parallel graphs and partal k-trees, that s, graphs wth bounded treewdth, f there s exactly one supply ertex n the graph. Ths s a ont work wth E. Demane, T. Nshzek and X. Zhou. Keywords: approxmaton algorthm, demand, FPTAS, maxmum partton problem, MAXSNP-hard, supply, trees. 1 Introducton Let G = (V, E) be a graph wth ertex set V and edge set E. The set V s parttoned nto two sets V s and V d. Each ertex u V s s called a supply ertex and s assgned a poste real number sup(u), called a supply of u, whle each ertex V d s called a demand ertex and s assgned a poste real number dem(), called a demand of. Each demand ertex can recee power from at most one supply ertex through edges n G. One thus wshes to partton G nto connected components by deletng edges from G so that each component M. Kaykobad and M. S. Rahman (Eds.): WALCOM 2007, pp. 162 179, 2007.

Parttonng Graphs of Supply and Demand 163 C has exactly one supply ertex whose supply s at least the sum of demands of all demand ertces n C. Howeer, such a partton does not always exst. So we wsh to partton G nto connected components so that each component C ether has no supply ertex or has exactly one supply ertex whose supply s at least the sum of demands of all demand ertces n C, and wsh to maxmze the fulfllment, that s, the sum of demands of the demand ertces n all components wth supply ertces. We call ths problem the maxmum partton problem [5]. The maxmum partton problem has some applcatons to the power supply problem for power delery networks [1, 5, 7]. Fgure 1(a) llustrates a soluton of the maxmum partton problem for a graph, whose fulfllment s (2 + 7) + (8 + 7) + (3 + 6) + (4 + 8) = 45. In Fg. 1(a) each supply ertex s drawn as a rectangle and each demand ertex as a crcle, the supply or demand s wrtten nsde, the deleted edges are drawn by thck dotted lnes, and each connected component wth a supply ertex s shaded. Gen a set A of ntegers and an upper bound (nteger) b, the maxmum subset sum problem [2,3] asks to fnd a subset C of A such that the sum of ntegers n C s no greater than the bound b and s maxmum among all such subsets C. The maxmum subset sum problem can be reduced n lnear tme to the maxmum partton problem for a partcular tree, called a star, wth exactly one supply ertex at the center, as llustrated n Fg. 1(c) [5]. Snce the maxmum subset sum problem s NP-hard, the maxmum partton problem s also NP-hard een for stars. Thus t s ery unlkely that the maxmum partton problem can be exactly soled n polynomal tme een for trees. Snce there s a fully polynomaltme approxmaton scheme (FPTAS) for the maxmum subset sum problem [3], one may expect that there s an FPTAS for the maxmum partton problem. In ths paper, we study the approxmablty of the maxmum partton problem. We frst show that the maxmum partton problem s MAXSNP-hard, and hence there s no polynomal-tme approxmaton scheme (PTAS) for the problem on general graphs unless P = NP. We then present an FPTAS for trees. The FPTAS for trees can be extended to seres-parallel graphs and partal k-trees, that s, graphs wth bounded treewdth, f there s exactly one supply ertex n a graph [4]. Fgure 1(b) depcts a partton of a tree T found by our FPTAS. supply ertex demand ertex 13 2 7 5 8 5 10 3 2 15 7 6 4 8 12 3 2 3 5 25 w 3 2 2 C 2 7 3 4 4 3 2 7 3 2 b = 25 w 5 2 3 3 4 4 2 C (a) (b) (c) Fg.1. (a) Partton of a graph G wth maxmum fulfllment, (b) partton of a tree T, and (c) a star S wth a supply ertex at the center.

164 Takehro Ito One mght thnk that t would be straghtforward to extend the FPTAS for the maxmum subset sum problem n [3] to an FPTAS for the maxmum partton problem on trees. Howeer, ths s not the case snce we must take a graph structure nto account. For example, the ertex of demand 2 drawn by a thck crcle n Fg. 1(b) cannot be suppled power een though the supply ertex w has margnal power 25 (2 + 3 + 2 + 2 + 3 + 7 + 4) = 2, whle the ertex n Fg. 1(c) can be suppled power from the supply ertex w n the star hang the same supply and demands as n Fg. 1(b). Indeed, we not only extend the scalng and roundng technque but also employ many new deas to dere our FPTAS. Ths s a ont work wth E. Demane, T. Nshzek and X. Zhou [4, 5]. The rest of the paper s organzed as follows. In Secton 2 we show that the maxmum partton problem s MAXSNP-hard. In Secton 3 we present a pseudo-polynomal-tme algorthm for trees. In Secton 4 we present an FPTAS based on the algorthm n Secton 3. 2 MAXSNP-hardness The man result of ths secton s the followng theorem. Theorem 1. The maxmum partton problem s MAXSNP-hard for bpartte graphs. Proof. As n [8,9], we use the concept of L-reducton whch s a specal knd of reducton that preseres approxmablty. Suppose that both A and B are maxmzaton problems. Then we say that A can be L-reduced to B f there exst two polynomal-tme algorthms Q and R and two poste constants α and β whch satsfy the followng two condtons (1) and (2) for each nstance I A of A: (1) the algorthm Q returns an nstance I B = Q(I A ) of B such that OPT B (I B ) α OPT A (I A ), where OPT A (I A ) and OPT B (I B ) denote the maxmum soluton alues of I A and I B, respectely; and (2) for each feasble soluton of I B wth alue c B, the algorthm R returns a feasble soluton of I A wth alue c A such that OPT A (I A ) c A β (OPT B (I B ) c B ). Note that, by condton (2) of the L-reducton, R must return the optmal soluton of I A for the optmal soluton of I B. We show that a MAXSNP-hard problem, called 3-occurrence MAX3SAT [8, 9], can be L-reduced to the maxmum partton problem for bpartte graphs. Howeer, due to the page lmtaton, we only show n ths extended abstract that condton (1) of the L-reducton holds. We now show that condton (1) of the L-reducton holds for α = 26. An nstance Φ of 3-occurrence MAX3SAT conssts of a collecton of m clauses C 1, C 2,, C m on n arables x 1, x 2,, x n such that each clause has exactly three lterals and each arable appears at most three tmes n the clauses. The 3-occurrence MAX3SAT problem s to fnd a truth assgnment for the arables whch satsfes the maxmum number of clauses. Then t suffces to show that,

Parttonng Graphs of Supply and Demand 165 G x1 G x2 G x3 7 x 1 4 4 x 1 7 x 2 4 4 x 2 7 x 3 4 4 x 3 7 x 4 4 x 1 1 1 C 1 C 2 C 3 (a) G x (b) G Φ Fg.2. (a) Varable gadget G x, and (b) the bpartte graph G Φ correspondng to an nstance Φ wth three clauses C 1 = (x 1 x 2 x 3), C 2 = ( x 1 x 2 x 3) and C 3 = ( x 1 x 2 x 3). from each nstance Φ of 3-occurrence MAX3SAT, one can construct n polynomal tme a bpartte graph G Φ as an nstance of the maxmum partton problem such that OPT MPP (G Φ ) 26 OPT SAT (Φ), (1) where OPT MPP (G Φ ) s the maxmum soluton alue of the maxmum partton problem for G Φ and OPT SAT (Φ) s the maxmum soluton alue of 3-occurrence MAX3SAT for Φ. We frst make a arable gadget G x for each arable x, 1 n; G x s a bnary tree wth three ertces as llustrated n Fg. 2(a); the root s a supply ertex of supply 7, and two leaes x and x are demand ertces of demands 4. The graph G Φ s constructed as follows. For each arable x, 1 n, put the arable gadget G x to the graph, and for each clause C, 1 m, put a demand ertex C of demand 1 to the graph. Fnally, for each clause C, 1 m, on a demand ertex x (or x ) n G x wth the demand ertex C f and only f the lteral x (or x ) s n C, as llustrated n Fg. 2(b). Clearly, G Φ can be constructed n polynomal tme, and s a bpartte graph. It should be noted that, snce each arable x, 1 n, appears at most three tmes n the clauses, the supply ertex n G x has enough power to supply all demand ertces C whose correspondng clauses hae x or x. Then one can erfy Eq. (1), whose proof s omtted from ths extended abstract. Q.E.D. 3 Pseudo-polynomal-tme algorthm for trees The maxmum partton problem s NP-hard een for trees. Howeer, n ths secton, we ge a pseudo-polynomal-tme algorthm to sole the maxmum partton problem for trees. The man result of ths secton s the followng theorem. Theorem 2. The maxmum partton problem can be soled for a tree T = (V, E) n tme O(F 2 n) f the demands and supples are ntegers, where n = V and F = mn{ V d dem(), V s sup()}.

166 Takehro Ito In the remander of ths secton we ge an algorthm to sole the maxmum partton problem for trees n tme O(F 2 n) as a proof of Theorem 2. In Subsecton 3.1 we defne some terms and present deas of our algorthm. We then present our algorthm n Subsecton 3.2. We fnally show, n Subsecton 3.3, that our algorthm takes tme O(F 2 n). 3.1 Terms and deas We partton a graph G nto connected components by deletng edges from G so that (a) each component contans at most one supply ertex; and (b) f a component C contans a supply ertex, then the supply s no less than the sum of demands of all demand ertces n C. Such a partton s called a partton of G. Thus a partton P of G corresponds to a famly of sets of ertces n G. The fulfllment f(p) of a partton P s the sum of demands of all demand ertces n components wth supply ertces. The maxmum partton problem s to fnd a partton of G wth the maxmum fulfllment. The maxmum fulfllment f(g) of a graph G s the maxmum fulfllment f(p) among all parttons P of G. Clearly f(g) F. For the graph G n Fg. 1(a) the partton P has the maxmum fulfllment, and hence f(g) = f(p) = 45. One may assume wthout loss of generalty that T s a rooted tree. Let r be the root of T. For each ertex of T, we denote by T the subtree of T whch s rooted at and s nduced by all descendants of n T. We denote by R the set of all real numbers. Let R + = {x R x 0}. Our dea s to consder three types of parttons of the rooted subtree T of T. The frst s called a -out partton, whch can deler an amount of margnal power outsde T through. The second s called a -n partton, whch needs an amount of defcent power to be delered nsde T through. The thrd s called an solated partton, n whch the set contanng s a sngleton. For these parttons, we ntroduce three functons g out : (T, R) R + { }, g n : (T, R) R + {+ } and g 0 : (T, R) {0, + }, where T denotes the set of all trees. For T T and x R, the alue g out (T ; x) represents the maxmum margnal power of a -out partton P of T such that f(p) x, g n (T ; x) represents the mnmum defcent power of a -n partton P of T such that f(p) x, and g 0 (T ; x) = 0 f T has an solated partton P such that f(p) x, otherwse, g 0 (T ; x) = +. Our dea s to compute g out, g n and g 0 from the leaes of T to the root r of T by means of dynamc programmng. T e 1 e 2 e e l 1 2 l T1 T2 T T l Fg.3. Tree T.

Parttonng Graphs of Supply and Demand 167 Let be a ertex of T, let 1, 2,, l be the chldren of ordered arbtrarly, and let e, 1 l, be the edge onng and, as llustrated n Fg. 3. T, 1 l, s the subtree of T whch s rooted at and s nduced by all descendants of n T. We denote by T the subtree of T whch conssts of the ertex, the edges e 1, e 2,, e and the subtrees T 1, T 2,, T. In Fg. 3, T s ndcated by a dotted lne. Clearly T = T l. For the sake of notatonal conenence, we denote by T 0 the subtree of a sngle ertex. Let P be a partton of a rooted subtree T of T, and let C(P) be the set of all ertces n the connected component contanng the root of T n P, as llustrated n Fgs. 4(a), 5(a) and 6(a). For each real number R +, we now formally defne -out, -n and solated parttons as follows. (a) A partton P of T s called a -out partton f C(P) contans a supply ertex w and sup(w) + u C(P) {w} dem(u). (See Fg. 4(a).) A -out partton of T corresponds to a partton of the whole tree T n whch all demand ertces n C(P) are suppled power from a supply ertex n T ; an amount of power can be delered outsde T through, and hence the margn of P s. If a rtual demand ertex d wth dem( d ) = s oned to the root of T as llustrated n Fg. 4(b), then d and all demand ertces n C(P) can be suppled power from w n the resultng tree T +. A -out partton P of T nduces a partton P + of T + such that f(p + ) = f(p)+, where the connected component contanng n P + contans the ertces n C(P) { d } and each of the other components n P + s the same as the counterpart n P, as llustrated n Fg. 4. (b) A partton P of T s called a -n partton f C(P) contans no supply ertex and u C(P) dem(u). (See Fg. 5(a).) Thus, f P s a -n partton, then s a demand ertex and dem(). A -n partton of T corresponds to a partton of T n whch all (demand) ertces n C(P) ncludng are suppled power from a supply ertex outsde T ; an amount of power must be delered nsde T through, and hence the defcency of P s. If a rtual supply ertex s wth sup( s ) = s oned to the root of T as llustrated n Fg. 5(b), then all (demand) ertces n C(P) can be suppled power from s n the resultng C(P) wth supply w d w w (a) P (b) P + Fg.4. (a) Tree T and (b) tree T +.

168 Takehro Ito tree T. For a -n partton P of T, let f (P) = f(p) + u C(P) dem(u). Clearly, a -n partton P of T nduces a partton P of T such that f(p ) = f (P). C(P) wthout supply s (a) P (b) P * Fg.5. (a) Tree T and (b) tree T. (c) A partton P of T s called an solated partton f C(P) conssts of a sngle demand ertex. (See Fg. 6(a).) An solated partton P of T corresponds to a partton P of T n whch s not suppled power from any supply ertex n T. Such a partton P of T does not always nduce an solated partton P of T. Howeer, subddng the component of P contanng nto sngletons, one can transform P to a partton P of T such that f(p ) = f(p ) and P nduces an solated partton P of T, as llustrated n Fgs. 6(b) and (c). a sngleton C(P) no supply (a) P (b) P' (c) P'' Fg.6. (a) Tree T, and (b), (c) tree T. We are now ready to ge a formal defnton of the three functons g out, g n and g 0. We frst defne g out : (T, R) R + { } for a tree T T and a real number x R, as follows: g out (T ; x) = max{ R + T has a -out partton P such that f(p) x }. (2) Thus, g out (T ; x) s the maxmum amount of margnal power of a -out partton P such that f(p) x. If T has no -out partton P wth f(p) x for any number R +, then let g out (T ; x) =. We then smlarly defne

Parttonng Graphs of Supply and Demand 169 g n : (T, R) R + {+ } for a tree T T and a real number x R, as follows: g n (T ; x) = mn{ R + T has a -n partton P such that f (P) x}.(3) Thus, g n (T ; x) s the mnmum amount of defcent power of a -n partton P such that f (P) x. If T has no -n partton P wth f (P) x for any number R +, then let g n (T ; x) = +. We fnally defne g 0 : (T, R) {0, + } for a tree T T and a real number x R, as follows: { 0 f T has an solated partton P such that f(p) x; g 0 (T ; x) = + otherwse. (4) The functon g out takes a alue n R + { }, g n takes a alue n R + {+ }, and g 0 takes a alue 0 or +. Clearly, g out s non-ncreasng, and both g n and g 0 are non-decreasng. For any negate real number x < 0, g out (T ; x) = g out (T ; 0), g n (T ; x) = g n (T ; 0), and g 0 (T ; x) = g 0 (T ; 0). Our algorthm computes g out (T ; x), g n (T ; x) and g 0 (T ; x) for each ertex of T from the leaes to the root r of T by means of dynamc programmng. 3.2 algorthm We frst show how to compute the maxmum fulfllment f(t) of a gen tree T from g out (T; x), g n (T; x) and g 0 (T; x). [How to compute f(t)] Let f out (T ) be the maxmum fulfllment f(p) taken oer all -out parttons P of T wth R +. Thus f out (T ) = max{x R + g out (T ; x) }. (5) If g out (T ; x) = for any number x R, then let f out (T ) =. On the other hand, let f 0 (T ) be the maxmum fulfllment f(p) taken oer all solated parttons P of T. Thus f 0 (T ) = max{x R + g 0 (T ; x) + }. (6) If g 0 (T ; x) = + for any number x R, that s, s a supply ertex, then let f 0 (T ) =. One can easly obsere that f(t ) = max{f out (T ), f 0 (T )}, and hence f(t) = f(t r ) = max{f out (T r ), f 0 (T r )} for the root r of T. Note that a partton of T = T r wth the maxmum fulfllment f(t) s ether an solated partton or a -out partton for some number R +.

170 Takehro Ito We then explan how to compute g out (T ; x), g n (T ; x) and g 0 (T ; x) for each ertex of T. [How to compute g out (T ; x), g n (T ; x) and g 0 (T ; x)] We frst compute g out (T 0; x), g n(t 0; x) and g 0(T 0 ; x) for each ertex of T as follows. Snce T 0 conssts of a sngle ertex, T = T 0 f s a leaf. If s a demand ertex, then for any number x R and g out (T 0 ; x) =, (7) { g n (T 0 dem() f x dem(); ; x) = (8) + otherwse, g 0 (T 0 ; x) = { 0 f x 0; + otherwse. (9) If s a supply ertex, then for any number x R { g out (T 0 sup() f x 0; ; x) = otherwse, and (10) g n (T 0 ; x) = +, (11) g 0 (T 0 ; x) = +. (12) We next compute g out (T; x), g n (T; x) and g 0 (T; x), 1 l, for each nternal ertex of T from the counterparts of T 1 and T, where l s the number of the chldren of. (See Fg. 3.) Remember that T = T, l and note that T 1 s obtaned from T and T by onng and as llustrated n Fg. 7 where T 1 s ndcated by a thn dotted lne. We frst explan how to compute g out (T; x). Let P be a -out partton of T such that f(p) x and = g out (T; x). Then there are the followng four Cases (a) (d): Case (a): s suppled power from a ertex n T 1 ; Case (b): s not suppled power; Case (c): s suppled power from a ertex n T, and ether s a supply ertex or s suppled power from a ertex n T 1 ; and Case (d): s suppled power from a ertex n T.

Parttonng Graphs of Supply and Demand 171 Fgures 7(a) (d) llustrate the power flows n T for the four cases, where an arrow represents the drecton of power supply, and a thck dotted lne represents a deleted edge. For x R and y R, we defne gout(t a ; x, y), gout(t b ; x, y), gout c (T ; x, y) and gd out (T ; x, y) for Cases (a), (b), (c) and (d), respectely. Intutely, x and y are the fulfllments of T and T 1, respectely. T -1 k 1-1 T k- T -1 1-1 T 0 T -1 1-1 T k T -1 k 1-1 T +k T 1 T -1 T T 1 T -1 T T 1 T -1 T T 1 T -1 T (a) (b) Fg.7. Power flow n a -out partton of T. (c) (d) Case (a): s suppled power from a ertex n T 1. In ths case, for some number k R + wth k, the -out partton P of T and a (k )-n partton P 2 of T such that f(p) = f(p 1 ) + f (P 2 ). (See Fg. 7(a). The component of P contanng conssts of the ertces n C(P 1 ) C(P 2 ), and each of the other components of P corresponds to a component of P 1 or P 2.) Snce f(p) = f(p 1 )+ f (P 2 ) x, we hae f(p 1 ) y and f (P 2 ) x y for some number y R. can be obtaned by mergng a k-out partton P 1 of T 1 Snce P 1 s a k-out partton of T 1 wth f(p 1 ) y, one may assume by Eq. (2) that k = g out (T 1 ; y). Smlarly one may assume that k = g n (T ; x y). Snce g out (T; x) = = k (k ), we defne g a out(t ; x, y) = g out (T 1 ; y) g n (T ; x y) (13) for Case (a). Case (b): s not suppled power. In ths case, P can be obtaned by mergng a -out partton P 1 of T 1 and an solated partton P 2 of T such that f(p 1 ) y and f(p 2 ) x y for some number y R. (See Fg. 7(b). The famly of sets of ertces correspondng to P s a unon of two famles correspondng to P 1 and P 2.) Then = 0, and hence let g b out(t ; x, y) = g out (T 1 ; y) g 0 (T ; x y). (14) Case (c): s suppled power from a ertex n T, and ether s a supply ertex or s suppled power from a ertex n T 1. In ths case, for some number k R +, P can be obtaned by mergng a -out partton P 1 of T 1 and a k-out partton P 2 of T such that f(p 1 ) y and f(p 2 ) x y for some numbers k R + and y R. (See Fg. 7(c). The famly

172 Takehro Ito of sets of ertces correspondng to P s a unon of two famles correspondng to P 1 and P 2.) Then let { gout(t c ; gout (T x, y) = 1 ; y) f g out (T ; x y) ; f g out (T ; x y) =. (15) Case (d): s suppled power from a ertex n T. In ths case, ether s a supply ertex or both and are suppled power from the same supply ertex n T. For some number k R +, P can be obtaned by mergng a k-n partton P 1 of T 1 and a ( + k)-out partton P 2 of T such that f (P 1 ) y and f(p 2 ) x y for some numbers k R + and y R. (See Fg. 7(d). The component of P contanng conssts of the ertces n C(P 1 ) C(P 2 ), and each of the other components of P corresponds to a component of P 1 or P 2.) Then = ( + k) k, and hence let g d out(t ; x, y) = g out (T ; x y) g n (T 1 ; y). (16) From gout a, gb out, gc out and gd out aboe one can compute g out(t ; x) as follows: g out (T ; x) = max{ga out (T ; x, y), gb out (T ; x, y), gc out (T ; x, y), gd out (T ; x, y) y (17) R}. T -1 k 1-1 T -k T 1 T -1 T T -1 1-1 T 0 T 1 T -1 T T -1 1-1 T T 1 T -1 T k (a) Fg.8. Power flow n a -n partton of T. (b) (c) We next explan how to compute g n (T; x). Let P be a -n partton such that f (P) x and = g n (T ; x) +. Then there are the followng three Cases (a), (b) and (c): Case (a): C(P); Case (b): / C(P), and s not suppled power; and Case (c): / C(P), and s suppled power from a ertex n T. Fgures 8(a) (c) llustrate the power flows n T for the three cases. We defne gn a (T ; x, y), gb n (T ; x, y) and gc n (T ; x, y) for Cases (a), (b) and (c), respectely, as follows. Case (a): C(P). In ths case, the -n partton P can be obtaned by mergng a k-n partton P 1 of T 1 and a ( k)-n partton P 2 of T such that f (P 1 ) y and

Parttonng Graphs of Supply and Demand 173 f (P 2 ) x y for some numbers k R + and y R. (See Fg. 8(a).) Then = k + ( k), and hence let g a n (T ; x, y) = g n(t 1 ; y) + g n (T ; x y). (18) Case (b): / C(P), and s not suppled power. In ths case, P can be obtaned by mergng a -n partton P 1 of T 1 and an solated partton P 2 of T such that f (P 1 ) y and f(p 2 ) x y for some number y R. (See Fg. 8(b).) Then = + 0, and hence let g b n (T ; x, y) = g n(t 1 ; y) + g 0 (T ; x y). (19) Case (c): / C(P), and s suppled power from a ertex n T. In ths case, P can be obtaned by mergng a -n partton P 1 of T 1 and a k-out partton P 2 of T such that f (P 1 ) y and f(p 2 ) x y for some numbers k R + and y R. (See Fg. 8(c).) Then let g c n(t ; x, y) = { gn (T 1 ; y) f g out (T ; x y) ; + f g out (T ; x y) =. (20) From gn a, gb n and gc n aboe one can compute g n(t ; x) as follows: g n (T ; x) = mn{g a n(t ; x, y), g b n(t ; x, y), g c n(t ; x, y) y R}. (21) 0-1 T E E E 1-1 E E E T 0 T 1 T -1 T (a) T -1 0 E E E 1-1 E E E T k T 1 T -1 T (b) Fg.9. Power flow n an solated partton of T. We fnally explan how to compute g 0 (T ; x). Let P be an solated partton such that f(p) x. There are the followng two Cases (a) and (b), and we defne g0 a(t ; x, y) and gb 0 (T ; x, y) for Cases (a) and (b), respectely. Case (a): s a demand ertex and s not suppled power. In ths case, the solated partton P can be obtaned by mergng an solated partton P 1 of T 1 and an solated partton P 2 of T such that f(p 1 ) y and f(p 2 ) x y for some number y R. (See Fg. 9(a).) Then let g a 0 (T ; x, y) = g 0(T 1 ; y) + g 0 (T ; x y). (22)

174 Takehro Ito Case (b): ether s a supply ertex or s suppled power (from a ertex n T ). In ths case P can be obtaned by mergng an solated partton P 1 of T 1 and a k-out partton P 2 of T such that f(p 1 ) y and f(p 2 ) x y for some numbers k R + and y R. (See Fg. 9(b).) Then let g b 0(T ; x, y) = { g0 (T 1 ; y) f g out (T ; x y) ; + f g out (T ; x y) =. (23) From g a 0 and g b 0 aboe one can compute g 0 (T ; x) as follows: g 0 (T ; x) = mn{g a 0(T ; x, y), g b 0(T ; x, y) y R}. (24) 3.3 Proof of Theorem 2 We now show that our algorthm takes tme O(F 2 n) as a proof of Theorem 2. Snce all the supples and demands n T are ntegers, f(p) and f (P) are ntegers for any partton P of T. We denote by Z the set of all ntegers. Let Z + = {x Z x 0} and Z + F = {x Z 0 x F }. Defne a functon ĝ out : (T, Z) Z + { } for a tree T T and an nteger x Z smlarly as g out : (T, R) R + { } n Eq. (2): ĝ out (T ; x) = max{ Z + T has a -out partton P such that f(p) x }. Defne functons ĝ n : (T, Z) Z + {+ } and ĝ 0 : (T, Z) {0, + } smlarly as g n and g 0 n Eqs. (3) and (4). Defne ntegral alues ˆf out (T ) and ˆf 0 (T ) smlarly as f out (T ) and f 0 (T ) n Eqs. (5) and (6): and ˆf out (T ) = max{x Z + ĝ out (T ; x) }; (25) ˆf 0 (T ) = max{x Z + ĝ 0 (T ; x) + }. (26) Then ˆf out (T ) = f out (T ) and ˆf 0 (T ) = f 0 (T ), and hence f(t ) = max{ ˆf out (T ), ˆf 0 (T )}. (27) We shall thus compute alues ĝ out (T ; x), ĝ n (T ; x) and ĝ 0 (T ; x) for all ntegers x Z. Howeer, one can easly obsere that t suffces to compute them only for ntegers x Z + F. One can compute alues ĝ out (T 0; x), ĝ n(t 0; x) and ĝ 0(T 0 ; x) for a ertex of T and all ntegers x Z + F n tme O(F) by the counterparts of Eqs. (7) (12). If 1, then one can recursely compute alues ĝ out (T ; x), ĝ n(t ; x) and ĝ 0 (T ; x) for an nternal ertex of T and all ntegers x Z+ F n tme O( Z F 2 ) = O(F 2 ) by the counterparts of Eqs. (13) (24). Snce T = T, l one can compute ˆf out (T ), ˆf0 (T ) and f(t ) by Eqs. (25) (27) n tme O(F). Snce

Parttonng Graphs of Supply and Demand 175 T = T r for the root r of T, the number of ertces n T s n and the number of edges s n 1, one can compute f(t) = f(t r ) n tme O(F 2 n). Ths completes a proof of Theorem 2. Q.E.D. Note that f the supples and demands are not always ntegers then f(p) and f (P) are not always ntegers and one cannot compute f(t) n tme O(F 2 n). 4 FPTAS for trees Assume n ths secton that the supples and demands of all ertces n a tree T are poste real numbers whch are not always ntegers. The man result of ths secton s the followng theorem. Theorem 3. There s a fully polynomal-tme approxmaton scheme for the maxmum partton problem on trees. In the remander of ths secton, as a proof of Theorem 3, we ge an algorthm to fnd a partton P of a tree T wth f(p) (1 ε)f(t) n tme polynomal n n and 1/ε for any real number ε, 0 < ε < 1. Thus our approxmate maxmum fulfllment f(t) of T s f(p), and hence the error s bounded by εf(t), that s, f(t) f(t) = f(t) f(p) εf(t). (28) We frst outlne our algorthm and the analyss. We extend the ordnary scalng and roundng technque for the knapsack and maxmum subset sum problems [2, 3,6] and apply t to the maxmum partton problem. For some scalng factor t, we consder the set {, 2t, t, 0, t, 2t, } as the range of functons g out, g n and g 0, and fnd the approxmate soluton f(t) by usng the pseudo-polynomal-tme algorthm n Secton 3. As we wll show later n Lemma 2(c), we hae f(t) f(t) < 2nt. (29) Intutely, Eq. (29) holds because the merge operaton s executed no more than 2n tmes and each merge operaton adds at most t to the error f(t) f(t). Let m d be the maxmum demand, that s, m d = max{dem() V d }. Takng t = εm d /(2n) and clamng f(t) m d, we hae Eq. (28). We now ge the detals of our algorthm and the proof of ts correctness. For a poste real number t, let R t = {, 2t, t, 0, t, 2t, } and R t+ F = {x R t 0 x F }. The functons g out, g n and g 0 hae range R. In ths secton we defne new functons ḡ out, ḡ n and ḡ 0 whch hae a sampled range R t and approxmate g out, g n and g 0, respectely. It should be noted that ḡ out, ḡ n and ḡ 0 do not always take the same alue as g out, g n and g 0, respectely, een for x R t. More precsely, we

176 Takehro Ito () recursely defne and compute ḡ out (T ; x), ḡ n (T ; x) and ḡ 0 (T ; x) for x R t by the counterparts of Eqs. (7) (24); () defne and compute alues f out (T ) and f 0 (T ) by the counterparts of Eqs. (5) and (6), that s, and f out (T ) = max{x R t+ F f 0 (T ) = max{x R t+ F () defne and compute ḡ out(t ; x) } ḡ 0(T ; x) + }; f(t ) = max{ f out (T ), f 0 (T )}; and () defne and compute f(t) = f(t r ) where r s the root of T. We wll show later n Lemma 2(c) that f(t) s an approxmate alue of f(t) satsfyng Eq. (29). It should be noted that the supples and demands are neer scaled and rounded when we compute the functons ḡ out, ḡ n and ḡ 0 as aboe, and hence these functons take real alues whch are not necessarly n R t F, although f out, f 0 and f take alues n R t+ F. The functons ḡ out, ḡ n and ḡ 0 approxmate the orgnal functons g out, g n and g 0 as n the followng lemma, whose proof s omtted due to the page lmtaton. Note that ḡ out (T ; x) = ḡ out (T ; 0), ḡ n (T ; x) = ḡ n (T ; 0) and ḡ 0 (T ; x) = ḡ 0 (T ; 0) for any negate number x R t. Lemma 1. Let s(t ) be the sze of T, that s, the number of ertces and edges n T. Then the followng (a), (b) and (c) hold: (a) () ḡ out (T; x) g out (T; x) for any number x R t ; () ḡ out (T ; x) s non-ncreasng; and () for any number x R, there s an nteger α such that and 0 α s(t ) 1 ḡ out (T ; x/t t αt) g out (T ; x), (b) () ḡ n (T ; x) g n(t ; x) for any number x Rt ; () ḡ n (T ; x) s non-decreasng; and () for any number x R, there s an nteger β such that 0 β s(t ) and and ḡ n (T ; x/t t βt) g n (T ; x),

Parttonng Graphs of Supply and Demand 177 (c) () ḡ 0 (T ; x) g 0(T ; x) for any number x Rt ; () ḡ 0 (T ; x) s non-decreasng; and () for any number x R, there s an nteger γ such that 0 γ s(t ) and ḡ 0 (T ; x/t t γt) g 0(T ; x). We then hae the followng lemma, whose proof s omtted from ths extended abstract. Lemma 2. The followng (a), (b) and (c) hold: (a) f out (T ) s(t )t f out (T ); (b) f 0 (T ) s(t )t f 0 (T ); and (c) f(t) 2nt < f(t) f(t). We are now ready to proe Theorem 3. Proof of Theorem 3. Let be a demand ertex wth the maxmum demand dem() = m d = max{dem() V d } n T. Then one may assume that T has a path Q gong from to some supply ertex u such that () Q passes through only demand ertces except ertex u, and () sup(u) s no less than the sum of demands on Q, because, otherwse, cannot be suppled power from any supply ertex and hence t suffces to sole the problem for each tree n a forest obtaned from T by deletng. Thus one may assume that f(t) m d. (30) Let t = εm d 2n. (31) Then by Lemma 2(c) and Eqs. (30) and (31) we hae and hence (1 ε)f(t) < f(t) f(t). f(t) < f(t) + 2n εm d 2n f(t) + εf(t),

178 Takehro Ito One can obsere that the algorthm takes tme ( R ) ( ) t+ O 2 n 5 n = O, F ε 2 because R t+ F = F/t +1, F nm d and hence by Eq. (31) we hae F/t 2n 2 /ε. Q.E.D. 5 Conclusons In ths paper, we studed the approxmablty of the maxmum partton problem. We frst showed that the maxmum partton problem s MAXSNP-hard. We then gae an FPTAS for trees. It s easy to modfy the FPTAS so that t actually fnds a partton of a tree. The FPTAS for trees can be extended to that for seres-parallel graphs and partal k-trees f there s exactly one supply ertex n a graph [4]. In the ordnary knapsack problem, each tem s assgned a sze and alue, and one wshes to choose a subset of tems that maxmzes the sum of alues of tems such that ther total sze does not exceed the sze of a bag [3, 6]. Consder a slghtly modfed erson of the maxmum partton problem on graphs n whch each demand ertex s assgned not only a demand but also a alue, and one wshes to fnd a partton whch maxmzes the sum of alues of all demand ertces n components wth supply ertces. Ths problem s ndeed a generalzaton of the ordnary knapsack problem, and can be soled for trees usng technques smlar to those for the maxmum partton problem. Note that the standard approxmaton methods for the knapsack problem n [3, 6] cannot be appled to the modfed maxmum partton problem. References 1. N. G. Boulaxs and M. P. Papadopoulos, Optmal feeder routng n dstrbuton system plannng usng dynamc programmng technque and GIS facltes, IEEE Trans. on Power Delery, Vol. 17, pp. 242 247, 2002. 2. M. R. Garey and D. S. Johnson, Computers and Intractablty: A Gude to the Theory of NP-Completeness, Freeman, San Francsco, CA, 1979. 3. O. H. Ibarra and C. E. Km, Fast approxmaton algorthms for the knapsack and sum of subset problems, J. Asso. Comput. Mach., Vol. 22, pp. 463 468, 1975. 4. T. Ito, E. D. Demane, X. Zhou and T. Nshzek, Approxmablty of parttonng graphs wth supply and demand, n Proc. of the 17th Annual Internatonal Symposum on Algorthms and Computaton (ISAAC2006), Lecture Notes n Computer Scence, Vol. 4288, pp. 121 130, 2006. 5. T. Ito, X. Zhou and T. Nshzek, Parttonng trees of supply and demand, Internatonal J. of Foundatons of Computer Scence, Vol. 16, pp. 803 827, 2005. 6. P. N. Klen and N. E. Young, Approxmaton algorthms for NP-hard optmzaton problems, Chap. 34 n (Ed. M. J. Atallah) Algorthms and Theory of Computaton Handbook, CRC Press, Boca Raton, Florda, 1999.

Parttonng Graphs of Supply and Demand 179 7. A. B. Morton and I. M. Y. Mareels, An effcent brute-force soluton to the network reconfguraton problem, IEEE Trans. on Power Delery, Vol. 15, pp. 996 1000, 2000. 8. C. H. Papadmtrou, Computatonal Complexty, Addson-Wesley, 1994. 9. C. H. Papadmtrou and M. Yannakaks, Optmzaton, approxmaton, and complexty classes, J. Computer and System Scences, Vol. 43, pp. 425 440, 1991.