51
Collection Depots Facility Location Problems in Trees R. Benkoczi, B. Bhattacharya, A. Tamir 陳陳陳‧陳陳陳‧陳陳陳‧陳陳陳 Jun 12, 2007

Collection Depots Facility Location Problems in Trees R. Benkoczi, B. Bhattacharya, A. Tamir

Embed Size (px)

DESCRIPTION

Collection Depots Facility Location Problems in Trees R. Benkoczi, B. Bhattacharya, A. Tamir. 陳冠伶 ‧ 王湘叡 ‧ 李佳霖 ‧ 張經略 Jun 12, 2007. Outline. By 陳冠伶. INTRODUCTION. C lient (demand service). Settings. F acility (service center). C ollection D epots. Cost of Service Trip. F. P 2. D. - PowerPoint PPT Presentation

Citation preview

Page 1: Collection Depots Facility Location Problems in Trees R. Benkoczi, B. Bhattacharya,  A. Tamir

Collection Depots Facility LocationProblems in Trees

R. Benkoczi, B. Bhattacharya, A. Tamir

  陳冠伶‧王湘叡‧李佳霖‧張經略

Jun 12, 2007

Page 2: Collection Depots Facility Location Problems in Trees R. Benkoczi, B. Bhattacharya,  A. Tamir

Outline

Page 3: Collection Depots Facility Location Problems in Trees R. Benkoczi, B. Bhattacharya,  A. Tamir

INTRODUCTIONBy 陳冠伶

Page 4: Collection Depots Facility Location Problems in Trees R. Benkoczi, B. Bhattacharya,  A. Tamir

Settings

Collection DepotsCollection Depots

Facility (service center)Facility (service center)

Client (demand service)

Client (demand service)

Page 5: Collection Depots Facility Location Problems in Trees R. Benkoczi, B. Bhattacharya,  A. Tamir

Cost of Service Trip

F

C

D

P1

P1

P2

P2

2(P1+P2)‧w(c)

Service CostService Cost

Page 6: Collection Depots Facility Location Problems in Trees R. Benkoczi, B. Bhattacharya,  A. Tamir

Application (1)

Express Transportation

Express Transportation

Page 7: Collection Depots Facility Location Problems in Trees R. Benkoczi, B. Bhattacharya,  A. Tamir

Application (2)

Garbage collectionGarbage collection

Page 8: Collection Depots Facility Location Problems in Trees R. Benkoczi, B. Bhattacharya,  A. Tamir

Problem

• IN: given a tree and• points of clients• points of collection depots• an integer k

• OUT• Optimal placements of k facilities• that minimizes some global function of the service

cost for all clients.

Page 9: Collection Depots Facility Location Problems in Trees R. Benkoczi, B. Bhattacharya,  A. Tamir

Objective – Minimax

• Minimize the service cost of the most expensive client

F

C

DD

C

DD

DD

DD

CC

C

DD

Page 10: Collection Depots Facility Location Problems in Trees R. Benkoczi, B. Bhattacharya,  A. Tamir

1-center

Minimize the maximum distance to the facility

Minimax – center problems

Page 11: Collection Depots Facility Location Problems in Trees R. Benkoczi, B. Bhattacharya,  A. Tamir

k-center

Minimize the maximum distance to the closest facility

Minimax – center problems

Page 12: Collection Depots Facility Location Problems in Trees R. Benkoczi, B. Bhattacharya,  A. Tamir

Objective – Minisum

• Minimize the total service cost

F

C

DD

C

DD

DD

DD

CC

C

DD

Page 13: Collection Depots Facility Location Problems in Trees R. Benkoczi, B. Bhattacharya,  A. Tamir

Minisum – median problems

1-median

Minimize the average distance to the facility

Page 14: Collection Depots Facility Location Problems in Trees R. Benkoczi, B. Bhattacharya,  A. Tamir

Minisum – median problems

k-median

Minimize the average distance to the closest facility

Page 15: Collection Depots Facility Location Problems in Trees R. Benkoczi, B. Bhattacharya,  A. Tamir

Classifications

Page 16: Collection Depots Facility Location Problems in Trees R. Benkoczi, B. Bhattacharya,  A. Tamir

Summary of Results

• Unrestricted 1-center problem• O(n)

• Unrestricted median problems• 1-median: O(nlogn)• k-median: O(kn3)

• Restricted k-median problem• NP-complete• Facility setup costs are not identical

Page 17: Collection Depots Facility Location Problems in Trees R. Benkoczi, B. Bhattacharya,  A. Tamir

1-CENTER PROBLEMBY 王湘叡

Page 18: Collection Depots Facility Location Problems in Trees R. Benkoczi, B. Bhattacharya,  A. Tamir

Prune and Search

• Every iteration, eliminate a fraction of impossible instances.

• Binary Search• T(n)=T(n/2)+1• T(n)=O(lg n)

• How about ( ) ((1 ) ) , 0 1T n T c n n c

2 1( ) (1 ) (1 )T n n c n c n n

c

Page 19: Collection Depots Facility Location Problems in Trees R. Benkoczi, B. Bhattacharya,  A. Tamir

Observation

• c(f)=max min r(f, vi)

• Service cost is non-decreasing when the facility goes away from the client.

Page 20: Collection Depots Facility Location Problems in Trees R. Benkoczi, B. Bhattacharya,  A. Tamir

Where could the facility be?

• A linear time algorithm could determine!

T1

T2

Ti Tk

Page 21: Collection Depots Facility Location Problems in Trees R. Benkoczi, B. Bhattacharya,  A. Tamir

Initial tree

clientclient

depotdepot

Page 22: Collection Depots Facility Location Problems in Trees R. Benkoczi, B. Bhattacharya,  A. Tamir

Divide T(i) into S1 and S2

• Find the centroid and partition the tree into two parts

centroidcentroid

S1 > 1/3 |T(i)| S2 > 1/3 |T(i)|

Page 23: Collection Depots Facility Location Problems in Trees R. Benkoczi, B. Bhattacharya,  A. Tamir

Find the Xmax

• Find the client Xmax with the largest service cost from the centroid.

S1 S2

XmaxXmax f

fopt must be in S1fopt must be in S1

Page 24: Collection Depots Facility Location Problems in Trees R. Benkoczi, B. Bhattacharya,  A. Tamir

Special case

• Centroid is the optimal

Xmax X’max

Should be optimalShould be optimal

Page 25: Collection Depots Facility Location Problems in Trees R. Benkoczi, B. Bhattacharya,  A. Tamir

Partition the clients

• Compute all depot distance

• Find the median δmed

• Separate all clients into two sets, K+ (red) and K- (blue)

S2 δmed δmed

Page 26: Collection Depots Facility Location Problems in Trees R. Benkoczi, B. Bhattacharya,  A. Tamir

• Consider f’ in S1, that depot distance δ(f’)< δmed

δ(f’)< δmed δ(f’)< δmed

S1

f’f’

Page 27: Collection Depots Facility Location Problems in Trees R. Benkoczi, B. Bhattacharya,  A. Tamir

Partition S1 by δmed

• Find all f’, they form trees T1, T2, …,Tn

• There are two cases, fopt is in T∪ i or not

T1

T2

T3

f

Page 28: Collection Depots Facility Location Problems in Trees R. Benkoczi, B. Bhattacharya,  A. Tamir

fopt is in T∪ i

• If fopt in red, consider K+, δ(fopt)<δmed<δ(K+)

• For a facility F’ in S1 and a client in S2, δ(fopt, u) is in S1

foptf’

δ(f’, u)δ(f’, u)δ(f’, u)δ(f’, u)

Page 29: Collection Depots Facility Location Problems in Trees R. Benkoczi, B. Bhattacharya,  A. Tamir

fopt is in not T∪ i

• If fopt is not in red, consider K-,

δ(K-)<δmed <δ(fopt)

• For a facility F’ in S and a client in S2, δ(fopt, u) is in S2

• Similar to previous case• Only fopt in T∪ i is

considered. fopt

f’δ(fopt, u)δ(fopt, u)

Page 30: Collection Depots Facility Location Problems in Trees R. Benkoczi, B. Bhattacharya,  A. Tamir

• Arbitrarily paired clients in K+

• For each pair (u, v), Compute tuv s.t. w(v)(tuv+d(c,v))=w(u).(tuv+d(c,u))

• Compare tmed and

d(fopt, c)+d((fopt,c),p(fopt, c))

foptfopt

δ(f’, u)δ(f’, u)

Details on fopt is in T∪ i

Page 31: Collection Depots Facility Location Problems in Trees R. Benkoczi, B. Bhattacharya,  A. Tamir

foptfopt

δ(f’, u)δ(f’, u)

d(fopt, c)+d((fopt,c),p(fopt, c)) < tmed

• consider tmed<tuv

• d(fopt, c)+d((fopt,c),p(fopt, c))<tmed<tuv

Page 32: Collection Depots Facility Location Problems in Trees R. Benkoczi, B. Bhattacharya,  A. Tamir

foptfopt

δ(f’, u)δ(f’, u)

d(fopt, c)+d((fopt,c),p(fopt, c)) > tmed

• consider tmed>tuv

• d(fopt, c)+d((fopt,c),p(fopt, c))>tmed>tuv

• ¼ K+ can be removed

Page 33: Collection Depots Facility Location Problems in Trees R. Benkoczi, B. Bhattacharya,  A. Tamir

1-MEDIAN PROBLEMBY 李佳霖

Page 34: Collection Depots Facility Location Problems in Trees R. Benkoczi, B. Bhattacharya,  A. Tamir

The 1-median Problem• Find a placement for facility to minimize the cost

of all tours.• i.e. minimize the sum of weighted distances of the

facility to client, then to optimal depot, and return to facility.

• For the path of a facility to a client, the closest depot can be found efficiently.

• Brute Force: Ο(n2)• Using Spine decomposition and pre-sorting: Ο(nlogn)

Page 35: Collection Depots Facility Location Problems in Trees R. Benkoczi, B. Bhattacharya,  A. Tamir

The Spine Decomposition

r0

33 5

23

Page 36: Collection Depots Facility Location Problems in Trees R. Benkoczi, B. Bhattacharya,  A. Tamir

Construct Search Tree

r0r0

Page 37: Collection Depots Facility Location Problems in Trees R. Benkoczi, B. Bhattacharya,  A. Tamir

Search Tree of SD

r0

Page 38: Collection Depots Facility Location Problems in Trees R. Benkoczi, B. Bhattacharya,  A. Tamir

Super-path of Search Tree

r0

f

Page 39: Collection Depots Facility Location Problems in Trees R. Benkoczi, B. Bhattacharya,  A. Tamir

Cost of Subtree

c2

dnewdnew

cjcj

| | | |

1 1 1

2 [ ( ) ( , ) ( ) ( , ) ( ) ( ) ( , ( , ))]v vT Tj

i i v i new i i ii i i j

w c d v c w T d f v w c d w c d d p v c

f

v

c3c4

c1

d d2

d4

d3

d1

Page 40: Collection Depots Facility Location Problems in Trees R. Benkoczi, B. Bhattacharya,  A. Tamir

Complexity• Construction for the SD has time complexity Ο(n) and space complexity Ο(n)

• Costs of the subtrees can be evaluated in constant time once j is determined.• If we use binary search with dnew, we spend Ο(logn)

time for every subtree. So Ο(log2n).• Use the sequential search in sorted order. So Ο(logn).

• The 1-median collection depots problem in tree can be sloved in Ο(nlogn) time and Ο(n) space.

Page 41: Collection Depots Facility Location Problems in Trees R. Benkoczi, B. Bhattacharya,  A. Tamir

UNRESTRICTEDK-MEDIAN PROBLEM

BY 張經略

Page 42: Collection Depots Facility Location Problems in Trees R. Benkoczi, B. Bhattacharya,  A. Tamir

The objective

• To minimize the sum of facility opening costs plus service costs for servicing the clients.

Page 43: Collection Depots Facility Location Problems in Trees R. Benkoczi, B. Bhattacharya,  A. Tamir

The “自給自足” property (1/4)• We fixed an arbitrary optimal solution and

explore its structure.

Page 44: Collection Depots Facility Location Problems in Trees R. Benkoczi, B. Bhattacharya,  A. Tamir

The “自給自足” property (2/4)• Consider an arbitrary vertex v.

• xv: minimize the trip cost of serving v

• yv:be a closest facility to v.

client C

v

xv

Assumed (for contradiction) servicing facility for client C

yv

Tleft Tright

Page 45: Collection Depots Facility Location Problems in Trees R. Benkoczi, B. Bhattacharya,  A. Tamir

The “自給自足” property (3/4)

client C

v

xv

Assumed (for contradiction) servicing facility for client C

yv

Tleft

Tright

Page 46: Collection Depots Facility Location Problems in Trees R. Benkoczi, B. Bhattacharya,  A. Tamir

The “自給自足” property (4/4)• The blue part of the following graph is proven

by symmetry.

v

xv

yv

Tleft

Tright

Page 47: Collection Depots Facility Location Problems in Trees R. Benkoczi, B. Bhattacharya,  A. Tamir

The intuition… (1/2)

• The total cost can be partitioned into four categories: the red, yellow, blue cost and v.

v

xv

yv

Tleft

Tright

Page 48: Collection Depots Facility Location Problems in Trees R. Benkoczi, B. Bhattacharya,  A. Tamir

The intuition… (2/2)

• The optimal solution has to be a combination of optimal substructures• You have to be “optimal” in the red (to minimize

the red cost) and the yellow (to minimize the yellow cost).

• This almost leads to Dynamic Programming already!

Page 49: Collection Depots Facility Location Problems in Trees R. Benkoczi, B. Bhattacharya,  A. Tamir

The technical things

• Due to some complications, the final Dynamic Programming is much more complicated…

• But the proof requires no special technique beyond the “自給自足”  property.

• The challenge is to devise the “right” recurrences to carry out the aforementioned intuitive approach.

Page 50: Collection Depots Facility Location Problems in Trees R. Benkoczi, B. Bhattacharya,  A. Tamir

Simple intuition, complicated recurrences… take a look

Page 51: Collection Depots Facility Location Problems in Trees R. Benkoczi, B. Bhattacharya,  A. Tamir

Time complexity

• Easily verified to be polynomial.