1
Minimizing Movement
Erik D. Demaine, MohammadTaghi Hajiagahayi, Hamid Mahini, Amin S.
Sayedi-Roshkhar, Shayan Oveisgharan, Morteza Zadimoghaddam
SODA 2007
2
Introduction
• A news class of geometric and/or graph problems introduced and investigated in [DHMS-ROZ ‘07].
• We are going to study a polynomial time approximation algorithm for the Minimum Maximum Movement to Connectivity (MMM2C) problem.
3
Problem Definition
4
Problem Definition
ConMax
• Given a graph G(V,E) and initial configuration of m pebbles, what is the minimum maximum movement needed by any pebble to reach a final configuration such that the graph induced by the occupied nodes is connected.
5
An Instructive Instance
• Simple to reduce from Hamiltonian Path [DHMS-ROZ ‘07].
6
O((m/OPT))-Approximation Algorithm
• Theorem 1: There is an O((m/OPT))-approximation algorithm (and thus also an O(m)-approximation algorithm) for ConMax.
• Definition: Given a subset S of vertices in a graph G, the dth power induced on S, denoted by Gd[S], has a vertex set S and has an edge (u,v) between two vertices u,v S iff there is a path in G between u and v with at most d edges.
7
O((m/OPT))-Approximation Algorithm
Lemma 1:
Consider an instance of ConMax problem, consisting of a graph G and an initial configuration of m pebbles, with an optimal solution of maximum movement OPT. For any integer k between 0 and m/2, there is a subset Sk of vertices of G satisfying the following properties:
8
O((m/OPT))-Approximation Algorithm
I. Every vertex in Sk is occupied by a pebble in the initial configuration.
II. The shortest-path distance between any two distinct vertices in Sk is greater than 2k + 4OPT.
III. The (2k + 6OPT + 1)th power of G induced on Sk is connected.
IV. Every vertex v in Sk has at least 2k pebbles whose shortest-path distance to v is at most k + 2OPT.
V. For every vertex w occupied by a pebble in the initial configuration, there is a vertex u in Sk whose shortest-path distance to w is at most 3k + 8OPT + 1.
9
Proof of Lemma 1
• Compute Sk greedily.
• All we need to prove is that we can find at least 1 vertex that satisfies properties I-V.
• Let c be the center of T, a spanning tree of the optimal final configuration.
• Claim: c is within distance k of at least 2k target positions of the pebbles.
10
Proof of Lemma 1
11
Proof of Lemma 1
Then Sk :={u} satisfies:I. Every vertex in Sk is occupied by a pebble in
the initial configuration.II. The shortest-path distance between any two
distinct vertices in Sk is greater than 2k + 4OPT.
III. The (2k + 6OPT + 1)th power of G induced on Sk is connected.
IV. Every vertex v in Sk has at least 2k pebbles whose shortest-path distance to v is at most k + 2OPT.
12
Proof of Claim
Claim: c is within distance k of at least 2k target positions of the pebbles.
• Case 1: Maximum distance of any vertex of T to c is less than k thus the final positions of all m pebbles are within distance k of c.
13
Proof of Claim
Case 2: There is at least one vertex at a distance exactly k + 1 from c in the tree T.
• Induction on k, base case, k = 0, vacuous.• Inductive step: There are at least 2k – 2
vertices within a distance k – 1 of c in T.• By case 2 there is at least one vertex v at a
distance exactly k from c and at least one vertex w at a distance exactly k+1 from c.
• But if v is unique…
14
Proof of Claim
• … c is not the center.
15
Proof of Lemma 1
• We have proven that a greedily computed Sk satisfying properties I – IV has at least one vertex.
• Now we will prove that the maximal Sk satisfying properties I – IV also satisfies property V.
16
Proof of Lemma 1
I. Every vertex in Sk is occupied by a pebble in the initial configuration.
II. The shortest-path distance between any two distinct vertices in Sk is greater than 2k + 4OPT.
III. The (2k + 6OPT + 1)th power of G induced on Sk is connected.
IV. Every vertex v in Sk has at least 2k pebbles whose shortest-path distance to v is at most k + 2OPT.
V. For every vertex w occupied by a pebble in the initial configuration, there is a vertex u in Sk whose shortest-path distance to w is at most 3k + 8OPT + 1.
17
Proof of Lemma 1
• For contradiction, assume that there is a vertex w more that 3k + 8OPT + 1 distance away from its closest neighbor sSk.
18
Proof of Lemma 1
• dist(w , Sk) > 3k + 8OPT +1
• dist(vi , Sk) ≤ dist(vi+1 , Sk) + 2OPT + 1
• dist(vi , Sk) - dist(vi+1 , Sk) ≤ 2OPT + 1
implies that we can find an r such that:
• 2k + 4OPT < dist(vr , Sk) ≤ 2k + 6OPT + 1
19
Proof of Lemma 1
• Claim: vr can be used to extend Sk to get S*k
I. Every vertex in S*k is occupied by a pebble in the initial configuration.
II. The shortest-path distance between any two distinct vertices in S*k is greater than 2k + 4OPT.
III. The (2k + 6OPT + 1)th power of G induced on S*k is connected.
20
Proof of Lemma 1
IV. Every vertex v in Sk has at least 2k pebbles whose shortest-path distance to v is at most k + 2OPT.
• dist(vr , Sk) + dist(w , vr) dist(w , Sk)
• dist(w , vr) dist(w , Sk) - dist(vr , Sk)
> (3k + 8OPT + 1) – (2k + 6OPT + 1)
= k + 2OPT• dist(w’ , v’) (k + 2OPT) – 2OPT = k
21
Similarly:• dist(vr , s) dist(vr , Sk) > 2k + 4OPT• dist(v’r , s’) > 2k + 4OPT – 2OPT
> k• We can select 2k + 1 vertices on the path• Hence property IV is satisfied.
22
Lemma 2
Lemma 2:
Given an instance of ConMax problem with m pebbles and with an optimal solution of maximum movement OPT, for any integer k between 0 and m/2, there is a polynomial-time algorithm to find a motion with maximum movement at most 5k + 14OPT + 3OPT(m/k).
23
The Algorithm
i. Find a subset Sk of vertices of G with the properties of Lemma 1.
ii. Move each pebble to its nearest vertex in Sk.iii. Let H = Gd[Sk], where d = 2k + 6OPT + 1;
T = arbitrarily rooted spanning tree of H.iv. For each vertex v in Sk other than the root, move all
but one of the pebbles on v to occupy some of the vertices on the path in G corresponding to the edge between v and its parent in T.
v. Let T’ be the tree in G obtained by combining the paths corresponding to the edges of T. For every vertex of T’ that is unoccupied by a pebble, move all pebbles one step in T’ toward that vertex.
24
Proof of Lemma 2
i. Find a subset Sk of vertices of G with the properties of Lemma 1.
• This can be computed in polynomial time.
ii. Move each pebble to its nearest vertex in Sk.• By property V each pebble is moved at most 3k + 8OPT
+1 steps.• By properties II and IV each s Sk has at least 2k
pebbles that are closer to it than any other vertex s’Sk, therefore by the end of step 2, each vertex in Sk has at least 2k + 1 pebbles on it.
25
Proof of Lemma 2
iii. Let H = Gd[S], where d = 2k + 6OPT + 1;T = arbitrarily rooted spanning tree of H.
• Compute these two graphs in polynomial time.
iv. For each vertex v in Sk other than the root, move all but one of the pebbles on v to occupy some of the vertices on the path in G corresponding to the edge between v and its parent in T.
26
Proof of Lemma 2
27
Proof of Lemma 2
• By property III each pebble is moved at most 2k + 6OPT steps.
• At most 6OPT vertices of the path are left unoccupied.
28
Proof of Lemma 2
v. Let T’ be the tree in G obtained by combining the paths corresponding to the edges of T. For every vertex of T’ that is unoccupied by a pebble, move all pebbles one step in T’ toward that vertex.
• At most | Sk |(6OPT) vertices that lack a pebble in T’, therefore (v) moves each pebble at most | Sk |(6OPT) steps.
29
Proof of Lemma 2
• |Sk| ≤ m/(2k)
The total number of steps:ii. 3k + 8OPT + 1iv. 2k + 6OPTv. 3OPT(m/k)SUM = 5k + 14OPT + 3OPT(m/k)
30
Proof of Theorem 1
• First check if OPT is zero.• Otherwise apply Lemma 2 with k = (m/x) where
x is the best guess or OPT to get an O((m/OPT))-approximation algorithm.
Any algorithm to solve ConMax can be made to work on the Euclidean Plane at a small multiplicative cost of (1 + ε) in the approximation ratio.
31
Other Problems
• Max, Sum, Num...• Con, Path, DirCon, Ind, Match…