31
1 Minimizing Movement Erik D. Demaine, MohammadTaghi Hajiagahayi, Hamid Mahini, Amin S. Sayedi-Roshkhar, Shayan Oveisgharan, Morteza Zadimoghaddam SODA 2007

1 Minimizing Movement Erik D. Demaine, MohammadTaghi Hajiagahayi, Hamid Mahini, Amin S. Sayedi-Roshkhar, Shayan Oveisgharan, Morteza Zadimoghaddam SODA

Embed Size (px)

Citation preview

Page 1: 1 Minimizing Movement Erik D. Demaine, MohammadTaghi Hajiagahayi, Hamid Mahini, Amin S. Sayedi-Roshkhar, Shayan Oveisgharan, Morteza Zadimoghaddam SODA

1

Minimizing Movement

Erik D. Demaine, MohammadTaghi Hajiagahayi, Hamid Mahini, Amin S.

Sayedi-Roshkhar, Shayan Oveisgharan, Morteza Zadimoghaddam

SODA 2007

Page 2: 1 Minimizing Movement Erik D. Demaine, MohammadTaghi Hajiagahayi, Hamid Mahini, Amin S. Sayedi-Roshkhar, Shayan Oveisgharan, Morteza Zadimoghaddam SODA

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.

Page 3: 1 Minimizing Movement Erik D. Demaine, MohammadTaghi Hajiagahayi, Hamid Mahini, Amin S. Sayedi-Roshkhar, Shayan Oveisgharan, Morteza Zadimoghaddam SODA

3

Problem Definition

Page 4: 1 Minimizing Movement Erik D. Demaine, MohammadTaghi Hajiagahayi, Hamid Mahini, Amin S. Sayedi-Roshkhar, Shayan Oveisgharan, Morteza Zadimoghaddam SODA

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.

Page 5: 1 Minimizing Movement Erik D. Demaine, MohammadTaghi Hajiagahayi, Hamid Mahini, Amin S. Sayedi-Roshkhar, Shayan Oveisgharan, Morteza Zadimoghaddam SODA

5

An Instructive Instance

• Simple to reduce from Hamiltonian Path [DHMS-ROZ ‘07].

Page 6: 1 Minimizing Movement Erik D. Demaine, MohammadTaghi Hajiagahayi, Hamid Mahini, Amin S. Sayedi-Roshkhar, Shayan Oveisgharan, Morteza Zadimoghaddam SODA

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.

Page 7: 1 Minimizing Movement Erik D. Demaine, MohammadTaghi Hajiagahayi, Hamid Mahini, Amin S. Sayedi-Roshkhar, Shayan Oveisgharan, Morteza Zadimoghaddam SODA

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:

Page 8: 1 Minimizing Movement Erik D. Demaine, MohammadTaghi Hajiagahayi, Hamid Mahini, Amin S. Sayedi-Roshkhar, Shayan Oveisgharan, Morteza Zadimoghaddam SODA

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.

Page 9: 1 Minimizing Movement Erik D. Demaine, MohammadTaghi Hajiagahayi, Hamid Mahini, Amin S. Sayedi-Roshkhar, Shayan Oveisgharan, Morteza Zadimoghaddam SODA

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.

Page 10: 1 Minimizing Movement Erik D. Demaine, MohammadTaghi Hajiagahayi, Hamid Mahini, Amin S. Sayedi-Roshkhar, Shayan Oveisgharan, Morteza Zadimoghaddam SODA

10

Proof of Lemma 1

Page 11: 1 Minimizing Movement Erik D. Demaine, MohammadTaghi Hajiagahayi, Hamid Mahini, Amin S. Sayedi-Roshkhar, Shayan Oveisgharan, Morteza Zadimoghaddam SODA

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.

Page 12: 1 Minimizing Movement Erik D. Demaine, MohammadTaghi Hajiagahayi, Hamid Mahini, Amin S. Sayedi-Roshkhar, Shayan Oveisgharan, Morteza Zadimoghaddam SODA

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.

Page 13: 1 Minimizing Movement Erik D. Demaine, MohammadTaghi Hajiagahayi, Hamid Mahini, Amin S. Sayedi-Roshkhar, Shayan Oveisgharan, Morteza Zadimoghaddam SODA

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…

Page 14: 1 Minimizing Movement Erik D. Demaine, MohammadTaghi Hajiagahayi, Hamid Mahini, Amin S. Sayedi-Roshkhar, Shayan Oveisgharan, Morteza Zadimoghaddam SODA

14

Proof of Claim

• … c is not the center.

Page 15: 1 Minimizing Movement Erik D. Demaine, MohammadTaghi Hajiagahayi, Hamid Mahini, Amin S. Sayedi-Roshkhar, Shayan Oveisgharan, Morteza Zadimoghaddam SODA

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.

Page 16: 1 Minimizing Movement Erik D. Demaine, MohammadTaghi Hajiagahayi, Hamid Mahini, Amin S. Sayedi-Roshkhar, Shayan Oveisgharan, Morteza Zadimoghaddam SODA

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.

Page 17: 1 Minimizing Movement Erik D. Demaine, MohammadTaghi Hajiagahayi, Hamid Mahini, Amin S. Sayedi-Roshkhar, Shayan Oveisgharan, Morteza Zadimoghaddam SODA

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.

Page 18: 1 Minimizing Movement Erik D. Demaine, MohammadTaghi Hajiagahayi, Hamid Mahini, Amin S. Sayedi-Roshkhar, Shayan Oveisgharan, Morteza Zadimoghaddam SODA

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

Page 19: 1 Minimizing Movement Erik D. Demaine, MohammadTaghi Hajiagahayi, Hamid Mahini, Amin S. Sayedi-Roshkhar, Shayan Oveisgharan, Morteza Zadimoghaddam SODA

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.

Page 20: 1 Minimizing Movement Erik D. Demaine, MohammadTaghi Hajiagahayi, Hamid Mahini, Amin S. Sayedi-Roshkhar, Shayan Oveisgharan, Morteza Zadimoghaddam SODA

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

Page 21: 1 Minimizing Movement Erik D. Demaine, MohammadTaghi Hajiagahayi, Hamid Mahini, Amin S. Sayedi-Roshkhar, Shayan Oveisgharan, Morteza Zadimoghaddam SODA

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.

Page 22: 1 Minimizing Movement Erik D. Demaine, MohammadTaghi Hajiagahayi, Hamid Mahini, Amin S. Sayedi-Roshkhar, Shayan Oveisgharan, Morteza Zadimoghaddam SODA

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).

Page 23: 1 Minimizing Movement Erik D. Demaine, MohammadTaghi Hajiagahayi, Hamid Mahini, Amin S. Sayedi-Roshkhar, Shayan Oveisgharan, Morteza Zadimoghaddam SODA

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.

Page 24: 1 Minimizing Movement Erik D. Demaine, MohammadTaghi Hajiagahayi, Hamid Mahini, Amin S. Sayedi-Roshkhar, Shayan Oveisgharan, Morteza Zadimoghaddam SODA

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.

Page 25: 1 Minimizing Movement Erik D. Demaine, MohammadTaghi Hajiagahayi, Hamid Mahini, Amin S. Sayedi-Roshkhar, Shayan Oveisgharan, Morteza Zadimoghaddam SODA

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.

Page 26: 1 Minimizing Movement Erik D. Demaine, MohammadTaghi Hajiagahayi, Hamid Mahini, Amin S. Sayedi-Roshkhar, Shayan Oveisgharan, Morteza Zadimoghaddam SODA

26

Proof of Lemma 2

Page 27: 1 Minimizing Movement Erik D. Demaine, MohammadTaghi Hajiagahayi, Hamid Mahini, Amin S. Sayedi-Roshkhar, Shayan Oveisgharan, Morteza Zadimoghaddam SODA

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.

Page 28: 1 Minimizing Movement Erik D. Demaine, MohammadTaghi Hajiagahayi, Hamid Mahini, Amin S. Sayedi-Roshkhar, Shayan Oveisgharan, Morteza Zadimoghaddam SODA

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.

Page 29: 1 Minimizing Movement Erik D. Demaine, MohammadTaghi Hajiagahayi, Hamid Mahini, Amin S. Sayedi-Roshkhar, Shayan Oveisgharan, Morteza Zadimoghaddam SODA

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)

Page 30: 1 Minimizing Movement Erik D. Demaine, MohammadTaghi Hajiagahayi, Hamid Mahini, Amin S. Sayedi-Roshkhar, Shayan Oveisgharan, Morteza Zadimoghaddam SODA

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.

Page 31: 1 Minimizing Movement Erik D. Demaine, MohammadTaghi Hajiagahayi, Hamid Mahini, Amin S. Sayedi-Roshkhar, Shayan Oveisgharan, Morteza Zadimoghaddam SODA

31

Other Problems

• Max, Sum, Num...• Con, Path, DirCon, Ind, Match…