facility location problems in the read-only memory with ...igwoa/indo-german-talk.pdfeuclidean...
TRANSCRIPT
Euclidean 1-centerFacility location in tree network
Open Problems
Facility location problems in the read-only memorywith constant work-space
Subhas C. Nandy
Indian Statistical Institute, Kolkata, India
withBinay K. Bhattacharya, Minati De and Sasanka Roy
Subhas. C. Nandy Facility location using constant work-space
Euclidean 1-centerFacility location in tree network
Open Problems
IntroductionMegiddo’s Algorithm for Constrained-MECConstrained-MEC using constant spaceMegiddo’s Algorithm for MECMEC using constant space
Table of Contents
1 Euclidean 1-centerIntroductionMegiddo’s Algorithm for Constrained-MECConstrained-MEC using constant spaceMegiddo’s Algorithm for MECMEC using constant space
2 Facility location in tree networkCentroid of a TreeWeighted 1-center of a Tree
3 Open Problems
Subhas. C. Nandy Facility location using constant work-space
Euclidean 1-centerFacility location in tree network
Open Problems
IntroductionMegiddo’s Algorithm for Constrained-MECConstrained-MEC using constant spaceMegiddo’s Algorithm for MECMEC using constant space
Euclidean 1-center
Input
A set of n points P in R2
Objective
Find c∗ ∈ R2 such thatmaxx∈P
d(c∗, x) =
minc∈R2
maxx∈P
d(c , x)
Compute the center c∗ ofthe Minimum EnclosingCircle (MEC)
Subhas. C. Nandy Facility location using constant work-space
Euclidean 1-centerFacility location in tree network
Open Problems
IntroductionMegiddo’s Algorithm for Constrained-MECConstrained-MEC using constant spaceMegiddo’s Algorithm for MECMEC using constant space
Euclidean 1-center
Input
A set of n points P in R2
Objective
Find c∗ ∈ R2 such thatmaxx∈P
d(c∗, x) =
minc∈R2
maxx∈P
d(c , x)
Compute the center c∗ ofthe Minimum EnclosingCircle (MEC)
c∗
Subhas. C. Nandy Facility location using constant work-space
Euclidean 1-centerFacility location in tree network
Open Problems
IntroductionMegiddo’s Algorithm for Constrained-MECConstrained-MEC using constant spaceMegiddo’s Algorithm for MECMEC using constant space
Literature
Proposed by Sylvester, 1857
Using FVD takes O(n log n) time
O(n) time and O(n) space, Megiddo, 1983
O(n2) time O(1) space in Read-only model,by Asano, Mulzer, Rote and Wang, 2011
Open Problem
Any sub-quadratic time algorithm in read-only model usingconstant space?
Subhas. C. Nandy Facility location using constant work-space
Euclidean 1-centerFacility location in tree network
Open Problems
IntroductionMegiddo’s Algorithm for Constrained-MECConstrained-MEC using constant spaceMegiddo’s Algorithm for MECMEC using constant space
Literature
Open Problem
Any sub-quadratic time algorithm in read-only model usingconstant space?
Our Contribution a
aAppeared in FSTTCS 2012
In-place algorithm: O(n) time and O(1) extra space
Read-only Model: O(n1+ε) time and O( 1ε log n) space, where
ε is a positive constant less than 1
Subhas. C. Nandy Facility location using constant work-space
Euclidean 1-centerFacility location in tree network
Open Problems
IntroductionMegiddo’s Algorithm for Constrained-MECConstrained-MEC using constant spaceMegiddo’s Algorithm for MECMEC using constant space
Literature
Open Problem
Any sub-quadratic time algorithm in read-only model usingconstant space?
Here we present
Read-only Model: O((n + M) log4 n) time using O(1) space,where M is the time to compute median using O(1) spacea.
aKnown lower bound of M by T.M. Chan(SODA,2009): Ω(n log logS n) timeusing O(S) bits
Subhas. C. Nandy Facility location using constant work-space
Euclidean 1-centerFacility location in tree network
Open Problems
IntroductionMegiddo’s Algorithm for Constrained-MECConstrained-MEC using constant spaceMegiddo’s Algorithm for MECMEC using constant space
Read-only Model
Input: Read-only
Constraints during Execution:Limited space for storing temporary results
After Execution:Desired result will be reported
Subhas. C. Nandy Facility location using constant work-space
Euclidean 1-centerFacility location in tree network
Open Problems
IntroductionMegiddo’s Algorithm for Constrained-MECConstrained-MEC using constant spaceMegiddo’s Algorithm for MECMEC using constant space
Constant-work-space Read-only Model
Advantages
Less prone to failure
Secured
Multiple process can access same data simultaneously
Can handle big data
Subhas. C. Nandy Facility location using constant work-space
Euclidean 1-centerFacility location in tree network
Open Problems
IntroductionMegiddo’s Algorithm for Constrained-MECConstrained-MEC using constant spaceMegiddo’s Algorithm for MECMEC using constant space
Example
Sorting: An O(n2) time
Find the maximum and report
Find the 2nd maximum and report
....
Find the smallest and report
Subhas. C. Nandy Facility location using constant work-space
Euclidean 1-centerFacility location in tree network
Open Problems
IntroductionMegiddo’s Algorithm for Constrained-MECConstrained-MEC using constant spaceMegiddo’s Algorithm for MECMEC using constant space
Fundamental Algorithms
Sorting
O(n2
s + n log s) time and O(s) extra-space (by Frederickson,1987)
Time-space product lower bound: Ω(n2) (by Borodin, 1981)
Selection
O(n log3 n) time algorithm using O(1) space (by Munro andPaterson, 1978)
O(n1+ε) time and O( 1ε ) extra-space (by Munro and Raman,
1996)
Lower bound: Ω(n log logS n) time using O(S) bits (by T.M.Chan, 2009)
Subhas. C. Nandy Facility location using constant work-space
Euclidean 1-centerFacility location in tree network
Open Problems
IntroductionMegiddo’s Algorithm for Constrained-MECConstrained-MEC using constant spaceMegiddo’s Algorithm for MECMEC using constant space
Constrained MEC
Input
A set of n points P in R2
A vertical line L
Subhas. C. Nandy Facility location using constant work-space
Euclidean 1-centerFacility location in tree network
Open Problems
IntroductionMegiddo’s Algorithm for Constrained-MECConstrained-MEC using constant spaceMegiddo’s Algorithm for MECMEC using constant space
Constrained MEC
Input
A set of n points P in R2
A vertical line L
Objective
Compute the MinimumEnclosing Circle whosecenter m∗ lies on L
m∗
Subhas. C. Nandy Facility location using constant work-space
Euclidean 1-centerFacility location in tree network
Open Problems
IntroductionMegiddo’s Algorithm for Constrained-MECConstrained-MEC using constant spaceMegiddo’s Algorithm for MECMEC using constant space
Constrained MEC
Subhas. C. Nandy Facility location using constant work-space
Euclidean 1-centerFacility location in tree network
Open Problems
IntroductionMegiddo’s Algorithm for Constrained-MECConstrained-MEC using constant spaceMegiddo’s Algorithm for MECMEC using constant space
Constrained MEC
Arbitrarily pair-up the points
Subhas. C. Nandy Facility location using constant work-space
Euclidean 1-centerFacility location in tree network
Open Problems
IntroductionMegiddo’s Algorithm for Constrained-MECConstrained-MEC using constant spaceMegiddo’s Algorithm for MECMEC using constant space
Constrained MEC
Draw the perpendicular bisectors
Subhas. C. Nandy Facility location using constant work-space
Euclidean 1-centerFacility location in tree network
Open Problems
IntroductionMegiddo’s Algorithm for Constrained-MECConstrained-MEC using constant spaceMegiddo’s Algorithm for MECMEC using constant space
Constrained MEC
Observe the intersection points on the line L
Subhas. C. Nandy Facility location using constant work-space
Euclidean 1-centerFacility location in tree network
Open Problems
IntroductionMegiddo’s Algorithm for Constrained-MECConstrained-MEC using constant spaceMegiddo’s Algorithm for MECMEC using constant space
Constrained MEC
m
Find the median(m) of the intersection points
Subhas. C. Nandy Facility location using constant work-space
Euclidean 1-centerFacility location in tree network
Open Problems
IntroductionMegiddo’s Algorithm for Constrained-MECConstrained-MEC using constant spaceMegiddo’s Algorithm for MECMEC using constant space
Constrained MEC
m
Find farthest point(s) from m
Subhas. C. Nandy Facility location using constant work-space
Euclidean 1-centerFacility location in tree network
Open Problems
IntroductionMegiddo’s Algorithm for Constrained-MECConstrained-MEC using constant spaceMegiddo’s Algorithm for MECMEC using constant space
Constrained MEC
m
Farthest points are both above and below of m=⇒ m is the result
Subhas. C. Nandy Facility location using constant work-space
Euclidean 1-centerFacility location in tree network
Open Problems
IntroductionMegiddo’s Algorithm for Constrained-MECConstrained-MEC using constant spaceMegiddo’s Algorithm for MECMEC using constant space
Constrained MEC
m
All farthest points are in same side of m
Subhas. C. Nandy Facility location using constant work-space
Euclidean 1-centerFacility location in tree network
Open Problems
IntroductionMegiddo’s Algorithm for Constrained-MECConstrained-MEC using constant spaceMegiddo’s Algorithm for MECMEC using constant space
Constrained MEC
m
Prune 14 th points
Subhas. C. Nandy Facility location using constant work-space
Euclidean 1-centerFacility location in tree network
Open Problems
IntroductionMegiddo’s Algorithm for Constrained-MECConstrained-MEC using constant spaceMegiddo’s Algorithm for MECMEC using constant space
Constrained MEC
Repeat same for the rest of the points
Subhas. C. Nandy Facility location using constant work-space
Euclidean 1-centerFacility location in tree network
Open Problems
IntroductionMegiddo’s Algorithm for Constrained-MECConstrained-MEC using constant spaceMegiddo’s Algorithm for MECMEC using constant space
Constrained MEC
1 begin2 while |P| ≥ 4 do3 Arbitrarily pair up the points in P. Let
PAIR = (P[2i − 1],P[2i ]), i = 1, 2, . . . , b |P|2 c be the setof aforesaid disjoint pairs;
4 Intermediate-Computation-for-Constrained-MEC; (*It returns a point m on L and a side D *)
5 (* Pruning step *)6 forall the pair of points (P[2i ],P[2i + 1]) ∈ PAIR do7 if The bisector line Li defined by the pair
(P[2i ],P[2i + 1]) intersect to the opposite side of Dfrom m
8 then9 Discard one of P[2i ] and P[2i + 1] from P which lies
on the side of m with respect to the bisector line Li ;10
11 (* Finally, when |P| < 4 *) compute the constrained MEC inbrute force manner and decide on which side of L the center ofunconstrained MEC lies.
Subhas. C. Nandy Facility location using constant work-space
Euclidean 1-centerFacility location in tree network
Open Problems
IntroductionMegiddo’s Algorithm for Constrained-MECConstrained-MEC using constant spaceMegiddo’s Algorithm for MECMEC using constant space
Constrained MEC
How to keep track the prunedelements?
pair and the feasible region
a
b
p
q
Subhas. C. Nandy Facility location using constant work-space
Euclidean 1-centerFacility location in tree network
Open Problems
IntroductionMegiddo’s Algorithm for Constrained-MECConstrained-MEC using constant spaceMegiddo’s Algorithm for MECMEC using constant space
Dominance Relation
Definition
For a pair of points p, q ∈ P, pis said to dominate q withrespect to a feasible region U,if their perpendicular bisectorb(p, q) does not intersect thefeasible region U, and both qand U lie on the same side ofb(p, q).
a
b
p
q
Subhas. C. Nandy Facility location using constant work-space
Euclidean 1-centerFacility location in tree network
Open Problems
IntroductionMegiddo’s Algorithm for Constrained-MECConstrained-MEC using constant spaceMegiddo’s Algorithm for MECMEC using constant space
Dominance Relation
Property
p dominates q with respect toa feasible region U if and onlyif from any point x ∈ U,d(p, x) > d(q, x).
a
b
p
q
Subhas. C. Nandy Facility location using constant work-space
Euclidean 1-centerFacility location in tree network
Open Problems
IntroductionMegiddo’s Algorithm for Constrained-MECConstrained-MEC using constant spaceMegiddo’s Algorithm for MECMEC using constant space
Dominance Relation
Lemma
If p dominates q and qdominates r with respect to afeasible region U, then pdominates r with respect tothe feasible region U.
Proof.
x ∈ U, d(p, x) > d(q, x) andd(q, x) > d(r , x) =>d(p, x) > d(r , x)
a
b
p
q
Subhas. C. Nandy Facility location using constant work-space
Euclidean 1-centerFacility location in tree network
Open Problems
IntroductionMegiddo’s Algorithm for Constrained-MECConstrained-MEC using constant spaceMegiddo’s Algorithm for MECMEC using constant space
Pairing Scheme
p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 p16 p17
Input Array: P[]
b = +∞
a = −∞
The feasibleregionU = [a, b] on L
Subhas. C. Nandy Facility location using constant work-space
Euclidean 1-centerFacility location in tree network
Open Problems
IntroductionMegiddo’s Algorithm for Constrained-MECConstrained-MEC using constant spaceMegiddo’s Algorithm for MECMEC using constant space
Pairing Scheme
p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 p16 p17
Input Array: P[]
b
a = −∞
The feasibleregionU = [a, b] on L
Subhas. C. Nandy Facility location using constant work-space
Euclidean 1-centerFacility location in tree network
Open Problems
IntroductionMegiddo’s Algorithm for Constrained-MECConstrained-MEC using constant spaceMegiddo’s Algorithm for MECMEC using constant space
Pairing Scheme
p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 p16 p17
Input Array: P[]
b
a
The feasibleregionU = [a, b] on L
Subhas. C. Nandy Facility location using constant work-space
Euclidean 1-centerFacility location in tree network
Open Problems
IntroductionMegiddo’s Algorithm for Constrained-MECConstrained-MEC using constant spaceMegiddo’s Algorithm for MECMEC using constant space
Pairing Scheme
p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 p16 p17
Input Array: P[]
b
a
The feasibleregionU = [a, b] on L
Subhas. C. Nandy Facility location using constant work-space
Euclidean 1-centerFacility location in tree network
Open Problems
IntroductionMegiddo’s Algorithm for Constrained-MECConstrained-MEC using constant spaceMegiddo’s Algorithm for MECMEC using constant space
Pairing Scheme
At the beginning of k-th phase
U = [a, b]
only one element is valid (i.e dominant) from each block ofconsecutive 2k−1 elements, namelyBki = P[i .2k−1 + 1, i .2k−1 + 2, . . . , (i + 1).2k−1],
i = 1, 2, . . . , d n2k−1 e.
We refer the only valid element of Bki as valid(Bk
i )
Subhas. C. Nandy Facility location using constant work-space
Euclidean 1-centerFacility location in tree network
Open Problems
IntroductionMegiddo’s Algorithm for Constrained-MECConstrained-MEC using constant spaceMegiddo’s Algorithm for MECMEC using constant space
Pairing Scheme
At the end of k-th phase
U = [a, b] (modified)
only one element is valid (i.e dominant) from each block ofconsecutive 2k elements, namelyBk+1i = P[i .2k + 1, i .2k + 2, . . . , (i + 1).2k ], i = 1, 2, . . . , d n
2ke.
Subhas. C. Nandy Facility location using constant work-space
Euclidean 1-centerFacility location in tree network
Open Problems
IntroductionMegiddo’s Algorithm for Constrained-MECConstrained-MEC using constant spaceMegiddo’s Algorithm for MECMEC using constant space
Pairing Scheme
Formed-Pair in the k-th phase
valid(Bk2i−1) and valid(Bk
2i ) form a pair Pairki fori = 1, 2, . . . , d n
2k−1 e
Valid Pair
A pair Pairki is valid pair with respect to U = [a, b] if thecorresponding perpendicular bisector intersects [a, b] on L.
Subhas. C. Nandy Facility location using constant work-space
Euclidean 1-centerFacility location in tree network
Open Problems
IntroductionMegiddo’s Algorithm for Constrained-MECConstrained-MEC using constant spaceMegiddo’s Algorithm for MECMEC using constant space
In the k-th phase
Recognize the only valid element from a block Bki
Lemma
Let p, q ∈ Bki having perpendicular bisector b(p, q), then any one
of the following happens
If b(p, q) intersects outside [a, b] on L, then one of p, q is notvalid(Bk
i ).
If b(p, q) intersects [a, b] on L, then none of p and q arevalid(Bk
i ).
Subhas. C. Nandy Facility location using constant work-space
Euclidean 1-centerFacility location in tree network
Open Problems
IntroductionMegiddo’s Algorithm for Constrained-MECConstrained-MEC using constant spaceMegiddo’s Algorithm for MECMEC using constant space
In the k-th phase
Recognize the valid element from a block Bki
p1 p2 p3 p4 p5 p6
Candidate
TestingPair p1 p2
Subhas. C. Nandy Facility location using constant work-space
Euclidean 1-centerFacility location in tree network
Open Problems
IntroductionMegiddo’s Algorithm for Constrained-MECConstrained-MEC using constant spaceMegiddo’s Algorithm for MECMEC using constant space
In the k-th phase
Recognize the valid element from a block Bki
p1 p2 p3 p4 p5 p6
Candidate
TestingPair p1 p2
p1
Subhas. C. Nandy Facility location using constant work-space
Euclidean 1-centerFacility location in tree network
Open Problems
IntroductionMegiddo’s Algorithm for Constrained-MECConstrained-MEC using constant spaceMegiddo’s Algorithm for MECMEC using constant space
In the k-th phase
Recognize the valid element from a block Bki
p1 p2 p3 p4 p5 p6
Candidate
TestingPair p1 p3
p1
Subhas. C. Nandy Facility location using constant work-space
Euclidean 1-centerFacility location in tree network
Open Problems
IntroductionMegiddo’s Algorithm for Constrained-MECConstrained-MEC using constant spaceMegiddo’s Algorithm for MECMEC using constant space
In the k-th phase
Recognize the valid element from a block Bki
p1 p2 p3 p4 p5 p6
Candidate
TestingPair p1 p4
p1
Subhas. C. Nandy Facility location using constant work-space
Euclidean 1-centerFacility location in tree network
Open Problems
IntroductionMegiddo’s Algorithm for Constrained-MECConstrained-MEC using constant spaceMegiddo’s Algorithm for MECMEC using constant space
In the k-th phase
Recognize the valid element from a block Bki
p1 p2 p3 p4 p5 p6
Candidate
TestingPair p4 p5
p4
Subhas. C. Nandy Facility location using constant work-space
Euclidean 1-centerFacility location in tree network
Open Problems
IntroductionMegiddo’s Algorithm for Constrained-MECConstrained-MEC using constant spaceMegiddo’s Algorithm for MECMEC using constant space
In the k-th phase
Recognize the valid element from a block Bki
The valid(Bki ) can be identified in O(|Bk
i |) time using O(1)extra-space.
Lemma
We can enumerate all the valid elements of k-th phase in O(n)time using O(1) extra-space.
Subhas. C. Nandy Facility location using constant work-space
Euclidean 1-centerFacility location in tree network
Open Problems
IntroductionMegiddo’s Algorithm for Constrained-MECConstrained-MEC using constant spaceMegiddo’s Algorithm for MECMEC using constant space
In the k-th phase
In an iteration
Consider the intersection points on L of the perpendicularbisectors of the valid pairs
Find the median m among these intersection points
Decide on which side of m the m∗ lies and update U
Subhas. C. Nandy Facility location using constant work-space
Euclidean 1-centerFacility location in tree network
Open Problems
IntroductionMegiddo’s Algorithm for Constrained-MECConstrained-MEC using constant spaceMegiddo’s Algorithm for MECMEC using constant space
In the k-th phase
In an iteration
Consider the intersection points on L of the perpendicularbisectors of the valid pairs
Find the median m among these intersection points
Decide on which side of m the m∗ lies and update U
After this iteration
Number of valid pairs decreases by 14
Subhas. C. Nandy Facility location using constant work-space
Euclidean 1-centerFacility location in tree network
Open Problems
IntroductionMegiddo’s Algorithm for Constrained-MECConstrained-MEC using constant spaceMegiddo’s Algorithm for MECMEC using constant space
In the k-th phase
In an iteration
Consider the intersection points on L of the perpendicularbisectors of the valid pairs
Find the median m among these intersection points
Decide on which side of m the m∗ lies and update U
After at most log n iterations, none of Pairki are valid pairs, wherei = 1, 2, . . . , d n
2k−1 e
Subhas. C. Nandy Facility location using constant work-space
Euclidean 1-centerFacility location in tree network
Open Problems
IntroductionMegiddo’s Algorithm for Constrained-MECConstrained-MEC using constant spaceMegiddo’s Algorithm for MECMEC using constant space
Time and Space Complexity of the Constrained MEC
Lemma
The Constrained MEC can be computed in O((n + M) log2 n) timeusing O(1) extra-space, where M is the time needed to computethe median of n elements in read-only memory when O(1) space isprovided.
Subhas. C. Nandy Facility location using constant work-space
Euclidean 1-centerFacility location in tree network
Open Problems
IntroductionMegiddo’s Algorithm for Constrained-MECConstrained-MEC using constant spaceMegiddo’s Algorithm for MECMEC using constant space
Megiddo’s Algorithm for MEC
Subhas. C. Nandy Facility location using constant work-space
Euclidean 1-centerFacility location in tree network
Open Problems
IntroductionMegiddo’s Algorithm for Constrained-MECConstrained-MEC using constant spaceMegiddo’s Algorithm for MECMEC using constant space
Megiddo’s Algorithm for MEC
Arbitrarily pair up the points
Subhas. C. Nandy Facility location using constant work-space
Euclidean 1-centerFacility location in tree network
Open Problems
IntroductionMegiddo’s Algorithm for Constrained-MECConstrained-MEC using constant spaceMegiddo’s Algorithm for MECMEC using constant space
Megiddo’s Algorithm for MEC
Consider their perpendicular bisectors and find the median slope Sm
Subhas. C. Nandy Facility location using constant work-space
Euclidean 1-centerFacility location in tree network
Open Problems
IntroductionMegiddo’s Algorithm for Constrained-MECConstrained-MEC using constant spaceMegiddo’s Algorithm for MECMEC using constant space
Megiddo’s Algorithm for MEC
Pair up the bisector Li , Lj such that slope(Li ) < Sm < slope(Lj)
Subhas. C. Nandy Facility location using constant work-space
Euclidean 1-centerFacility location in tree network
Open Problems
IntroductionMegiddo’s Algorithm for Constrained-MECConstrained-MEC using constant spaceMegiddo’s Algorithm for MECMEC using constant space
Megiddo’s Algorithm for MEC
Consider the intersection points of the paired bisectors (tuple)
Subhas. C. Nandy Facility location using constant work-space
Euclidean 1-centerFacility location in tree network
Open Problems
IntroductionMegiddo’s Algorithm for Constrained-MECConstrained-MEC using constant spaceMegiddo’s Algorithm for MECMEC using constant space
Megiddo’s Algorithm for MEC
Find their median x-coordinate and evoke Decide-on-a-Line
Subhas. C. Nandy Facility location using constant work-space
Euclidean 1-centerFacility location in tree network
Open Problems
IntroductionMegiddo’s Algorithm for Constrained-MECConstrained-MEC using constant spaceMegiddo’s Algorithm for MECMEC using constant space
Megiddo’s Algorithm for MEC
Find median y -coordinate and evoke Decide-on-a-Line
Subhas. C. Nandy Facility location using constant work-space
Euclidean 1-centerFacility location in tree network
Open Problems
IntroductionMegiddo’s Algorithm for Constrained-MECConstrained-MEC using constant spaceMegiddo’s Algorithm for MECMEC using constant space
Megiddo’s Algorithm for MEC
Prune n16 elements
Subhas. C. Nandy Facility location using constant work-space
Euclidean 1-centerFacility location in tree network
Open Problems
IntroductionMegiddo’s Algorithm for Constrained-MECConstrained-MEC using constant spaceMegiddo’s Algorithm for MECMEC using constant space
Megiddo’s Algorithm for MEC
Algorithm 1: MEC(P)
Input: An array P[1, . . . , n] containing a set P of n points in R2.Output: The center π∗ of the minimum enclosing circle of the
points in P.1 begin2 while |P| ≥ 16 do3 Arbitrarily pair up the points in P. Let
PAIR = (P[2i − 1],P[2i ]), i = 1, 2, . . . , b |P|2 c be the setof aforesaid disjoint pairs;
4 Intermediate-Computation-for-MEC; (It returns aquadrant Quad defined by two orthogonal lines LH & LV )
5 (* Pruning step *)6 forall the pair of points (P[2i ],P[2i + 1]) ∈ PAIR do7 if The bisector line Li defined by the pair
(P[2i ],P[2i + 1]) does not intersect the quadrant Quad8 then9 Discard one of P[2i ] and P[2i + 1] from P which
lies on the side of the quadrant Quad with respectto the bisector line Li ;
10
11 (* Finally, when |P| < 16 *) compute by brute force manner.
Subhas. C. Nandy Facility location using constant work-space
Euclidean 1-centerFacility location in tree network
Open Problems
IntroductionMegiddo’s Algorithm for Constrained-MECConstrained-MEC using constant spaceMegiddo’s Algorithm for MECMEC using constant space
Decide-on-a-Line using constant space
m∗
Find the Constrained-MEC center m∗
Subhas. C. Nandy Facility location using constant work-space
Euclidean 1-centerFacility location in tree network
Open Problems
IntroductionMegiddo’s Algorithm for Constrained-MECConstrained-MEC using constant spaceMegiddo’s Algorithm for MECMEC using constant space
Decide-on-a-Line using constant space
m∗ c∗
Find all the farthest points F
Subhas. C. Nandy Facility location using constant work-space
Euclidean 1-centerFacility location in tree network
Open Problems
IntroductionMegiddo’s Algorithm for Constrained-MECConstrained-MEC using constant spaceMegiddo’s Algorithm for MECMEC using constant space
Decide-on-a-Line using constant space
m∗
t1
t2
b1
b2
Convex hull of F contains m∗
Subhas. C. Nandy Facility location using constant work-space
Euclidean 1-centerFacility location in tree network
Open Problems
IntroductionMegiddo’s Algorithm for Constrained-MECConstrained-MEC using constant spaceMegiddo’s Algorithm for MECMEC using constant space
Decide-on-a-Line using constant space
m∗
t1
t2
b1
b2
Convex hull of F does not contain m∗
Subhas. C. Nandy Facility location using constant work-space
Euclidean 1-centerFacility location in tree network
Open Problems
IntroductionMegiddo’s Algorithm for Constrained-MECConstrained-MEC using constant spaceMegiddo’s Algorithm for MECMEC using constant space
Decide-on-a-Line using constant space
Lemma
Decide-on-a-Line(L) can be computed in O((n + M) log2 n) timeusing O(1) extra-space, where M is the time needed to computethe median of n elements given in a read-only memory using O(1)extra-space.
Subhas. C. Nandy Facility location using constant work-space
Euclidean 1-centerFacility location in tree network
Open Problems
IntroductionMegiddo’s Algorithm for Constrained-MECConstrained-MEC using constant spaceMegiddo’s Algorithm for MECMEC using constant space
MEC using constant space
How to keep track of the pruned elements?
Intersection of Feasible Region USubhas. C. Nandy Facility location using constant work-space
Euclidean 1-centerFacility location in tree network
Open Problems
IntroductionMegiddo’s Algorithm for Constrained-MECConstrained-MEC using constant spaceMegiddo’s Algorithm for MECMEC using constant space
MEC using constant space
How to keep track of the pruned elements?
Intersection of Feasible Region USubhas. C. Nandy Facility location using constant work-space
Euclidean 1-centerFacility location in tree network
Open Problems
IntroductionMegiddo’s Algorithm for Constrained-MECConstrained-MEC using constant spaceMegiddo’s Algorithm for MECMEC using constant space
MEC using constant space
How to keep track of the pruned elements?
Intersection of Feasible Region USubhas. C. Nandy Facility location using constant work-space
Euclidean 1-centerFacility location in tree network
Open Problems
IntroductionMegiddo’s Algorithm for Constrained-MECConstrained-MEC using constant spaceMegiddo’s Algorithm for MECMEC using constant space
Intersection of Feasible Region U of constant complexity
After each iteration we will keep a feasible triangle
Subhas. C. Nandy Facility location using constant work-space
Euclidean 1-centerFacility location in tree network
Open Problems
IntroductionMegiddo’s Algorithm for Constrained-MECConstrained-MEC using constant spaceMegiddo’s Algorithm for MECMEC using constant space
Intersection of Feasible Region U of constant complexity
After each iteration we will keep a feasible triangle
Subhas. C. Nandy Facility location using constant work-space
Euclidean 1-centerFacility location in tree network
Open Problems
IntroductionMegiddo’s Algorithm for Constrained-MECConstrained-MEC using constant spaceMegiddo’s Algorithm for MECMEC using constant space
Intersection of Feasible Region U of constant complexity
After each iteration we will keep a feasible triangle
Subhas. C. Nandy Facility location using constant work-space
Euclidean 1-centerFacility location in tree network
Open Problems
IntroductionMegiddo’s Algorithm for Constrained-MECConstrained-MEC using constant spaceMegiddo’s Algorithm for MECMEC using constant space
Intersection of Feasible Region U of constant complexity
After each iteration we will keep a feasible triangle
Subhas. C. Nandy Facility location using constant work-space
Euclidean 1-centerFacility location in tree network
Open Problems
IntroductionMegiddo’s Algorithm for Constrained-MECConstrained-MEC using constant spaceMegiddo’s Algorithm for MECMEC using constant space
Intersection of Feasible Region U of constant complexity
After each iteration we will keep a feasible triangle
Subhas. C. Nandy Facility location using constant work-space
Euclidean 1-centerFacility location in tree network
Open Problems
IntroductionMegiddo’s Algorithm for Constrained-MECConstrained-MEC using constant spaceMegiddo’s Algorithm for MECMEC using constant space
Intersection of Feasible Region U of constant complexity
After each iteration we will keep a feasible triangle
Subhas. C. Nandy Facility location using constant work-space
Euclidean 1-centerFacility location in tree network
Open Problems
IntroductionMegiddo’s Algorithm for Constrained-MECConstrained-MEC using constant spaceMegiddo’s Algorithm for MECMEC using constant space
Time and Space Complexity
Single iteration
Evokes at most four Constrained MEC
Theorem
The Euclidean 1-center of a set of points in R2 given in aread-only array can be found in O((n + M) log4 n) time using O(1)extra-space, where M is the time needed to compute the median ofn elements in read-only memory when O(1) space is provided.
Subhas. C. Nandy Facility location using constant work-space
Euclidean 1-centerFacility location in tree network
Open Problems
IntroductionMegiddo’s Algorithm for Constrained-MECConstrained-MEC using constant spaceMegiddo’s Algorithm for MECMEC using constant space
Similar prune-and-search algorithm
Linear programming in R3
minx1,x2,x3
d1x1 + d2x2 + d3x3
subject to: a′ix1 + b′ix2 + c ′i x3 ≥ βi , i ∈ I = 1, 2, . . . n.
can be computed in O((n + M) log4 n) time using O(1)extra-space, where M is the time needed to compute the median ofn elements in read-only memory when O(1) space is provided.
Subhas. C. Nandy Facility location using constant work-space
Euclidean 1-centerFacility location in tree network
Open Problems
Centroid of a TreeWeighted 1-center of a Tree
Table of Contents
1 Euclidean 1-centerIntroductionMegiddo’s Algorithm for Constrained-MECConstrained-MEC using constant spaceMegiddo’s Algorithm for MECMEC using constant space
2 Facility location in tree networkCentroid of a TreeWeighted 1-center of a Tree
3 Open Problems
Subhas. C. Nandy Facility location using constant work-space
Euclidean 1-centerFacility location in tree network
Open Problems
Centroid of a TreeWeighted 1-center of a Tree
Centroid of a Tree
Centroid of a tree
A vertex v of the tree T such that the size of the largest subtreeof v is minimum among all vertices of T .
Available Results
Can be computed in O(n) time using O(n) space.
In read-only environment, it is easy to compute in O(n2) timeusing O(1) extra space.
Our Result
A linear time algorithm using O(1) extra space in read-onlyenvironment.
Subhas. C. Nandy Facility location using constant work-space
Euclidean 1-centerFacility location in tree network
Open Problems
Centroid of a TreeWeighted 1-center of a Tree
Centroid of a Tree
Data Structure
The tree T is stored as a DCEL in read-only memory, such that foreach vertex v the following operations can be performed in O(1)time.
Parent(v)
FirstChild(v)
NextChild(u, v) - Child of u which is next to v
We useTm(t): the subtree of the node t rooted at one of its neighbors m.
Subhas. C. Nandy Facility location using constant work-space
Euclidean 1-centerFacility location in tree network
Open Problems
Centroid of a TreeWeighted 1-center of a Tree
Centroid of a Tree
Algorithm
1. Start from an arbitraryvertex t ∈ V
2. Compute a neighbor m oft having maximumnumber of nodes in thesubtree Tm(t).
3. If |Tm(t)| ≤ bn2c, thenreport t as the centroid.Otherwise, the centroidlies in Tm(t).
t′t
This subtree is denoted as ∆
This subtree is denoted as Tm(t)
This subtree is denoted as Tt′(t)
m
Subhas. C. Nandy Facility location using constant work-space
Euclidean 1-centerFacility location in tree network
Open Problems
Centroid of a TreeWeighted 1-center of a Tree
Centroid of a Tree
We now concentrate of Step 2 of the algorithm.
Invariant
Maintain three variables t, t ′
and Size satisfying
Initially t = root, t ′ = ∅and Size = 0
If t ′ 6= ∅ then t and t ′ areadjacent vertices andSize = |Tt′(t)|.
t′t
This subtree is denoted as ∆
This subtree is denoted as Tm(t)
This subtree is denoted as Tt′(t)
m
Note: During the search t ′ is the parent of t
Subhas. C. Nandy Facility location using constant work-space
Euclidean 1-centerFacility location in tree network
Open Problems
Centroid of a TreeWeighted 1-center of a Tree
Centroid of a Tree
Compute m such that |Tm(t)| = maxv∈N(t)
|Tv (t)| as follows:
Initially, t ′ is the predecessor of t, Size = |Tt′(t)|, andSIZE = MaxSize = |Tt(t ′)| computed in the earlier step.
Use two pointers φ1 and φ2 to count the size of two subtreesof T in a parallel manner.
Use the proceduresParent(u), FirstChild(u) and NextChild(u, v)to compute the size of the subtrees pointed by φ1 and φ2.
Subhas. C. Nandy Facility location using constant work-space
Euclidean 1-centerFacility location in tree network
Open Problems
Centroid of a TreeWeighted 1-center of a Tree
Centroid of a Tree
When the counting of a pointer in one subtree is finished, itstarts with an unprocessed subtree immediately.
Each time, when the counting of a subtree by one of thepointers is finished, the count is added in a counter TOTAL.
When the task of one of the pointers is finished, and it doesnot find any unprocessed subtree of T , then the process stopswithout completing the task of the other pointer in which itwas working.
Its count is available by computing SIZE − TOTAL.
During this processthe node m ∈ N(t) having maximum |Tm(t)|, andMaxSize = |Tm(t)| is maintained.
Subhas. C. Nandy Facility location using constant work-space
Euclidean 1-centerFacility location in tree network
Open Problems
Centroid of a TreeWeighted 1-center of a Tree
Centroid of a Tree
If MaxSize ≤ bn2c, report m as centroid.
Else recurse with t ′ = t, t = m, Size = n −MaxSize andSIZE = MaxSize.
The recursion continues in the subtrees rooted at m. One of itsneighbors is t, whose elements are already visited in the previousiteration, and the count is Tm(t)
Subhas. C. Nandy Facility location using constant work-space
Euclidean 1-centerFacility location in tree network
Open Problems
Centroid of a TreeWeighted 1-center of a Tree
Centroid of a Tree
Result
In each iteration, at most half of the elements of T are visitedby each of φ1 and φ2.
In an iteration, either answer is reported;or the process starts with the unfinished subtree, which is oflargest size among the subtrees of t.
The total time complexity of an iteration is 2× Size.
Since in each iteration, a unfinished subtree is processed,the charge goes to the subtrees which are completelyprocessed.
Thus, the total time complexity becomes O(n).
Subhas. C. Nandy Facility location using constant work-space
Euclidean 1-centerFacility location in tree network
Open Problems
Centroid of a TreeWeighted 1-center of a Tree
Weighted 1-center of a Tree
Weighted 1-center of a tree
Given a tree T having each vertex attached with positive weights,a point π on an edge e∗ of T is said to be the weighted 1-center if
∆w (π) = minp∈T
∆w (p)
where ∆w (p) = maxv∈V
w(v)× d(p, v), and
d(p, v) is the distance of the vertex v from the point p along theedges of T .
Subhas. C. Nandy Facility location using constant work-space
Euclidean 1-centerFacility location in tree network
Open Problems
Centroid of a TreeWeighted 1-center of a Tree
Weighted 1-center of a Tree
Overview of the Algorithm
Identify an edge e∗ on which the 1-center lies
Next, compute the point π (1-center) on e∗.
An important result
- If u is a fixed vertex in T , and
- v ′ be a vertex in T satisfyingw(v ′)d(v ′, u) = max
v∈Vw(v)d(v , u) that lies in Tt(u), then
- the 1-center of T lies in Tt(u+).
Here Tt(u+) is the subtree of T containing Tt(u) ∪ u ∪ (u, t)
Subhas. C. Nandy Facility location using constant work-space
Euclidean 1-centerFacility location in tree network
Open Problems
Centroid of a TreeWeighted 1-center of a Tree
Finding e∗
1. Initialize T ′ = T .
2. Repeat the following steps until T ′ is an edge.
Compute the centroid in T ′. Let it be u.Identify the vertex v ′ traversing all the subtrees of u in thetree T completely.Suppose v ′ ∈ Tt(u). Set T ′ = T ′
t (u+).
Subhas. C. Nandy Facility location using constant work-space
Euclidean 1-centerFacility location in tree network
Open Problems
Centroid of a TreeWeighted 1-center of a Tree
Finding e∗
Since, in each iteration, half of the vertices are prunned, to setT ′, the number of iteration is O(log n).
In order to compute v ′, the entire tree T is scanned. Thus,the time complexity of each iteration is O(n).
Result
The overall time complexity of identifying e∗ is O(n log n).The space complexity is O(1).
An important property
At most two internal vertices of T become the leaves of T ′.This enables us to encode T ′ using only four variables.
Subhas. C. Nandy Facility location using constant work-space
Euclidean 1-centerFacility location in tree network
Open Problems
Centroid of a TreeWeighted 1-center of a Tree
Computing the 1-center on the edge e∗ = [u∗, v ∗]
Query(m) — for a query point m ∈ e∗
Test whether π = m or π ∈ [u∗,m] or π ∈ [m, v∗].
Process
For a point x ∈ [a, b], definef1(x, v) = w(v)× (d(u∗, v) + d(x, u∗)) for all v ∈ Tu∗ (v∗),f2(x, v) = w(v)× (d(v∗, v) + d(x, v∗)) for all v ∈ Tv∗ (u∗).
u∗
v∗
v(∈ Tv(u))
x
v(∈ Tu(v))
Find f1(k1,m) = maxv∈Tu∗ (v∗)
f1(m, v), and f2(k2,m) = maxv∈Tv∗ (u∗)
f1(m, v)
If f1(k1,m) = f2(k2,m), then π = mElse if f1(k1,m) > f2(k2,m) then π ∈ [a,m], else π ∈ [m, b].
Time complexity of Query(m): O(n)
Subhas. C. Nandy Facility location using constant work-space
Euclidean 1-centerFacility location in tree network
Open Problems
Centroid of a TreeWeighted 1-center of a Tree
Computing m
Dominance
For a pair of vertices p, q ∈ Tu∗(v∗), p dominates q if f1(p, x) andf1(q, x) do not intersect in [a, b], and f1(q, x) < f1(p, x).
Subhas. C. Nandy Facility location using constant work-space
Euclidean 1-centerFacility location in tree network
Open Problems
Centroid of a TreeWeighted 1-center of a Tree
Computing m
Process
Pair up vertices of V1 = Tu∗(v∗).
If one of them dominates the other, then prune the dominatedone.Otherwise compute the point of intersection x ∈ [a, b] off1(p, x) and f1(q, x).
Similarly, pair up vertices of V2 = Tv∗(u∗),and compute the point of intersetion of f1(p, x) and f1(q, x)for the undominated pairs (p, q) ∈ V2.
Compute the median m of these intersection points inread-only memory.
Subhas. C. Nandy Facility location using constant work-space
Euclidean 1-centerFacility location in tree network
Open Problems
Centroid of a TreeWeighted 1-center of a Tree
Complexity
Result
Time complexity : O((n + M) log2 n), andSpace: O(1), wherewhere M is the time needed for computing the median of nelements in read-only environment using O(1) space.
Subhas. C. Nandy Facility location using constant work-space
Euclidean 1-centerFacility location in tree network
Open Problems
Table of Contents
1 Euclidean 1-centerIntroductionMegiddo’s Algorithm for Constrained-MECConstrained-MEC using constant spaceMegiddo’s Algorithm for MECMEC using constant space
2 Facility location in tree networkCentroid of a TreeWeighted 1-center of a Tree
3 Open Problems
Subhas. C. Nandy Facility location using constant work-space
Euclidean 1-centerFacility location in tree network
Open Problems
Open Problem
Farthest Pair of Points
Given a set P of n points in R2, find the farthest pair of points insub-quadratic time in the constant-work-space read-only model.
Maximum Empty Circle
Given a set P of n points in R2, find the the maximum emptycircle (whose center is inside the convex hull of P) in sub-quadratictime in the constant-work-space read-only model.
Subhas. C. Nandy Facility location using constant work-space
Euclidean 1-centerFacility location in tree network
Open Problems
Thank You!
Subhas. C. Nandy Facility location using constant work-space