Minimizing and Computing Inverse Geodesic Length on Trees Thesis B - - PowerPoint PPT Presentation

minimizing and computing inverse geodesic length on trees
SMART_READER_LITE
LIVE PREVIEW

Minimizing and Computing Inverse Geodesic Length on Trees Thesis B - - PowerPoint PPT Presentation

Minimizing and Computing Inverse Geodesic Length on Trees Thesis B Presentation Joshua Lau Supervisor: A/Prof. Serge Gaspers UNSW Sydney October 9, 2018 Joshua Lau (UNSW Sydney) Minimizing and Computing IGL on Trees October 9, 2018 1 / 24


slide-1
SLIDE 1

Minimizing and Computing Inverse Geodesic Length on Trees

Thesis B Presentation Joshua Lau Supervisor: A/Prof. Serge Gaspers UNSW Sydney October 9, 2018

Joshua Lau (UNSW Sydney) Minimizing and Computing IGL on Trees October 9, 2018 1 / 24

slide-2
SLIDE 2

Outline

1

Introduction

2

Minimizing IGL on Trees

3

Computing IGL on Treelike Graphs

4

Concluding Remarks

Joshua Lau (UNSW Sydney) Minimizing and Computing IGL on Trees October 9, 2018 2 / 24

slide-3
SLIDE 3

Definitions

Definition (Inverse Geodesic Length)

Let G = (V , E) be an undirected graph, with edges of unit length. We define the Inverse Geodesic Length of G as IGL(G) =

  • {u,v}⊆V

1 d(u, v) where d(u, v) is the length of a shortest path from u to v. Note: If u and v are disconnected then d(u, v) = ∞ so we take

1 d(u,v) = 0.

Joshua Lau (UNSW Sydney) Minimizing and Computing IGL on Trees October 9, 2018 3 / 24

slide-4
SLIDE 4

Definitions

Problem (MinIGL)

Input: A graph G, an integer k ≤ |V | and a target IGL T Question: Does there exist X ⊆ V such that |X| ≤ k and IGL(G−X) ≤ T? When our budget k is 0, the problem is equivalent to computing the IGL. When our target T is 0, the problem is equivalent to Vertex Cover. TreeMinIGL is MinIGL where G is a tree.

Joshua Lau (UNSW Sydney) Minimizing and Computing IGL on Trees October 9, 2018 4 / 24

slide-5
SLIDE 5

Example

Consider the following graph G when k = 2.

Joshua Lau (UNSW Sydney) Minimizing and Computing IGL on Trees October 9, 2018 5 / 24

slide-6
SLIDE 6

Example

Consider the following graph G when k = 2. IGL(G) = 9 × 1

1 + 5 × 1 2 + 5 × 1 3 + 2 × 1 4 = 132 3

Joshua Lau (UNSW Sydney) Minimizing and Computing IGL on Trees October 9, 2018 5 / 24

slide-7
SLIDE 7

Example

Delete these k = 2 vertices to obtain G′.

Joshua Lau (UNSW Sydney) Minimizing and Computing IGL on Trees October 9, 2018 5 / 24

slide-8
SLIDE 8

Example

Delete these k = 2 vertices to obtain G′. IGL(G′) = 3 × 1

1 + 1 × 1 2 = 31 2

Joshua Lau (UNSW Sydney) Minimizing and Computing IGL on Trees October 9, 2018 5 / 24

slide-9
SLIDE 9

Outline

1

Introduction

2

Minimizing IGL on Trees

3

Computing IGL on Treelike Graphs

4

Concluding Remarks

Joshua Lau (UNSW Sydney) Minimizing and Computing IGL on Trees October 9, 2018 6 / 24

slide-10
SLIDE 10

Algorithm

Key Result

We can solve TreeMinIGL in subexponential time, and polynomial space.

Joshua Lau (UNSW Sydney) Minimizing and Computing IGL on Trees October 9, 2018 7 / 24

slide-11
SLIDE 11

Algorithm

Key Result

We can solve TreeMinIGL in subexponential time, and polynomial space. Idea: combine two different algorithms, each using polynomial space.

Joshua Lau (UNSW Sydney) Minimizing and Computing IGL on Trees October 9, 2018 7 / 24

slide-12
SLIDE 12

Algorithm

Key Result

We can solve TreeMinIGL in subexponential time, and polynomial space. Idea: combine two different algorithms, each using polynomial space. Naive O(nk+2) = 2O(k log n) time:

n

k

= O(nk) subsets and APSP on

a tree in O(n2). Useful when k is (somewhat) small.

Joshua Lau (UNSW Sydney) Minimizing and Computing IGL on Trees October 9, 2018 7 / 24

slide-13
SLIDE 13

Algorithm

Key Result

We can solve TreeMinIGL in subexponential time, and polynomial space. Idea: combine two different algorithms, each using polynomial space. Naive O(nk+2) = 2O(k log n) time:

n

k

= O(nk) subsets and APSP on

a tree in O(n2). Useful when k is (somewhat) small. We give an algorithm that runs in time O∗ 2poly( n

k )

. Useful when k is relatively large compared to n. This is FPT for parameter n

k .

Joshua Lau (UNSW Sydney) Minimizing and Computing IGL on Trees October 9, 2018 7 / 24

slide-14
SLIDE 14

Algorithm

Key Result

We can solve TreeMinIGL in subexponential time, and polynomial space. Idea: combine two different algorithms, each using polynomial space. Naive O(nk+2) = 2O(k log n) time:

n

k

= O(nk) subsets and APSP on

a tree in O(n2). Useful when k is (somewhat) small. We give an algorithm that runs in time O∗ 2poly( n

k )

. Useful when k is relatively large compared to n. This is FPT for parameter n

k .

Combining these gives a subexponential (2o(n)) time solution.

Joshua Lau (UNSW Sydney) Minimizing and Computing IGL on Trees October 9, 2018 7 / 24

slide-15
SLIDE 15

Exploiting large k

Define an optimal subset of an instance to be a set of vertices which minimizes the IGL.

Joshua Lau (UNSW Sydney) Minimizing and Computing IGL on Trees October 9, 2018 8 / 24

slide-16
SLIDE 16

Exploiting large k

Define an optimal subset of an instance to be a set of vertices which minimizes the IGL. Observation: when k is large compared to n, we expect remaining components (trees) to be small in an optimal solution.

Joshua Lau (UNSW Sydney) Minimizing and Computing IGL on Trees October 9, 2018 8 / 24

slide-17
SLIDE 17

Exploiting large k

Define an optimal subset of an instance to be a set of vertices which minimizes the IGL. Observation: when k is large compared to n, we expect remaining components (trees) to be small in an optimal solution.

Theorem

If S is an optimal subset of a TreeMinIGL instance (T, k), then every remaining component has at most L(n, k) = O

(n/k)5 vertices.

Proof.

Omitted from presentation (see thesis report).

Joshua Lau (UNSW Sydney) Minimizing and Computing IGL on Trees October 9, 2018 8 / 24

slide-18
SLIDE 18

Exploiting large k

Root the tree and use DP to determine the optimal structure of remaining components. State is (subtree, budget of deletions). Recurrence: either subtree root is deleted or it is not.

If deleted, then consider children’s subtrees separately. Optimally dictate how the budget is to be shared, using DP. Otherwise, root is in some remaining component. We determine this by finding its structure and mapping (diagram next slide).

Joshua Lau (UNSW Sydney) Minimizing and Computing IGL on Trees October 9, 2018 9 / 24

slide-19
SLIDE 19

Exploiting large k

Recurrence (continued): T

Joshua Lau (UNSW Sydney) Minimizing and Computing IGL on Trees October 9, 2018 10 / 24

slide-20
SLIDE 20

Exploiting large k

Recurrence (continued): Try every structure: an ordered tree T ′ with no more than L = L(n, k) vertices. There are O

  • 4L

L √ L

  • f these, by bounding sum
  • f Catalan numbers (Topley, 2016).

T ′ 1 2 3 4 5 6 T

Joshua Lau (UNSW Sydney) Minimizing and Computing IGL on Trees October 9, 2018 10 / 24

slide-21
SLIDE 21

Exploiting large k

Recurrence (continued): Try every structure: an ordered tree T ′ with no more than L = L(n, k) vertices. There are O

  • 4L

L √ L

  • f these, by bounding sum
  • f Catalan numbers (Topley, 2016).

T ′ 1 2 3 4 5 6 T 1 2 3 4 5 6

mapping

For each, find optimal mapping: assignment of vertices in T ′ to distinct vertices in T. This forces some vertices to be deleted. Recurse on the remaining subtrees, dictating how the remaining budget should be shared, using DP once again.

Joshua Lau (UNSW Sydney) Minimizing and Computing IGL on Trees October 9, 2018 10 / 24

slide-22
SLIDE 22

Exploiting large k

Recurrence (continued): Try every structure: an ordered tree T ′ with no more than L = L(n, k) vertices. There are O

  • 4L

L √ L

  • f these, by bounding sum
  • f Catalan numbers (Topley, 2016).

T ′ 1 2 3 4 5 6 T 1 2 3 4 5 6

mapping

For each, find optimal mapping: assignment of vertices in T ′ to distinct vertices in T. This forces some vertices to be deleted. Recurse on the remaining subtrees, dictating how the remaining budget should be shared, using DP once again.

Joshua Lau (UNSW Sydney) Minimizing and Computing IGL on Trees October 9, 2018 10 / 24

slide-23
SLIDE 23

Exploiting large k

For a fixed T ′, we can determine the optimal mapping in polynomial time and space. We can enumerate all T ′ in polynomial space, so our algorithm uses polynomial space. Our algorithm takes time O

  • 4L

√ Ln2

= 2O((n/k)5+log n). This is FPT for parameter n

k .

Joshua Lau (UNSW Sydney) Minimizing and Computing IGL on Trees October 9, 2018 11 / 24

slide-24
SLIDE 24

Exploiting large k

For a fixed T ′, we can determine the optimal mapping in polynomial time and space. We can enumerate all T ′ in polynomial space, so our algorithm uses polynomial space. Our algorithm takes time O

  • 4L

√ Ln2

= 2O((n/k)5+log n). This is FPT for parameter n

k .

Recall the brute-force algorithm takes time 2O(k log n). Choosing brute-force whenever k ≤ n5/6 log−1/6 n, and our DP algorithm

  • therwise, gives a solution in time 2O((n log n)5/6) = 2o(n).

Joshua Lau (UNSW Sydney) Minimizing and Computing IGL on Trees October 9, 2018 11 / 24

slide-25
SLIDE 25

A generalisation

Let f be a function mapping forests to reals, such that f (F1 ⊕ F2) = f (F1) + f (F2) for any vertex-disjoint forests F1, F2. Consider the Min-f on Trees problem of choosing a set S of k vertices to delete from a tree T of n vertices, such that f (T − S) is minimised.

Joshua Lau (UNSW Sydney) Minimizing and Computing IGL on Trees October 9, 2018 12 / 24

slide-26
SLIDE 26

A generalisation

Let f be a function mapping forests to reals, such that f (F1 ⊕ F2) = f (F1) + f (F2) for any vertex-disjoint forests F1, F2. Consider the Min-f on Trees problem of choosing a set S of k vertices to delete from a tree T of n vertices, such that f (T − S) is minimised.

Theorem

If there is a constant p > 0, such that for any instance, there is an optimal subset inducing remaining components with no more than

n

k

p vertices,

then we can solve Min-f on Trees in time 2O((n log n)p/(p+1)) = 2o(n), which is subexponential.

Joshua Lau (UNSW Sydney) Minimizing and Computing IGL on Trees October 9, 2018 12 / 24

slide-27
SLIDE 27

Outline

1

Introduction

2

Minimizing IGL on Trees

3

Computing IGL on Treelike Graphs

4

Concluding Remarks

Joshua Lau (UNSW Sydney) Minimizing and Computing IGL on Trees October 9, 2018 13 / 24

slide-28
SLIDE 28

Distance distributions

The distance distribution of a graph is the sequence {ai}, where ai is the number of pairs of vertices distance i apart (shortest path). Implies diameter, IGL, Wiener index Implied by APSP

Joshua Lau (UNSW Sydney) Minimizing and Computing IGL on Trees October 9, 2018 14 / 24

slide-29
SLIDE 29

Distance distributions

The distance distribution of a graph is the sequence {ai}, where ai is the number of pairs of vertices distance i apart (shortest path). Implies diameter, IGL, Wiener index Implied by APSP Q: Can we do better than APSP (Ω(n2)) for computing the distance distribution on treelike graphs?

Joshua Lau (UNSW Sydney) Minimizing and Computing IGL on Trees October 9, 2018 14 / 24

slide-30
SLIDE 30

Treewidth

The treewidth k = tw(G) of a graph is a measure of treelike-ness. A B There are sets of vertices A and B such that: A ∪ B = V (G) Roughly, |A|, |B| ≤ 2n

3

tw(G[A]), tw(G[B]) ≤ tw(G) |A ∩ B| ≤ k + 1. If G is a tree, k = 1, and we can always have |A ∩ B| = 1. Note: every path from A to B passes through A ∩ B.

Joshua Lau (UNSW Sydney) Minimizing and Computing IGL on Trees October 9, 2018 15 / 24

slide-31
SLIDE 31

Divide-and-conquer

Idea: Use divide-and-conquer to find contribution from pairs in A × A, B × B. Remains to find the contribution of shortest paths between pairs in A × B.

Joshua Lau (UNSW Sydney) Minimizing and Computing IGL on Trees October 9, 2018 16 / 24

slide-32
SLIDE 32

Divide-and-conquer

Idea: Use divide-and-conquer to find contribution from pairs in A × A, B × B. Remains to find the contribution of shortest paths between pairs in A × B. Suppose G is a tree. Then A ∩ B is a single vertex s.

Joshua Lau (UNSW Sydney) Minimizing and Computing IGL on Trees October 9, 2018 16 / 24

slide-33
SLIDE 33

Divide-and-conquer

Idea: Use divide-and-conquer to find contribution from pairs in A × A, B × B. Remains to find the contribution of shortest paths between pairs in A × B. Suppose G is a tree. Then A ∩ B is a single vertex s.

1 Find SSSP from each vertex in A ∩ B = {s}. 2 Assign the term xd(s,v) to each vertex v.

x x x2 x3 x x2 x2 A B

Joshua Lau (UNSW Sydney) Minimizing and Computing IGL on Trees October 9, 2018 16 / 24

slide-34
SLIDE 34

Divide-and-conquer

3 Let PA(x) and PB(x) be the sums. 4 Contribution of A × B found by polynomial multiplication:

(PAPB)(x).

Joshua Lau (UNSW Sydney) Minimizing and Computing IGL on Trees October 9, 2018 17 / 24

slide-35
SLIDE 35

Divide-and-conquer

3 Let PA(x) and PB(x) be the sums. 4 Contribution of A × B found by polynomial multiplication:

(PAPB)(x). x x x2 x3 x x2 x2 A B

Joshua Lau (UNSW Sydney) Minimizing and Computing IGL on Trees October 9, 2018 17 / 24

slide-36
SLIDE 36

Divide-and-conquer

3 Let PA(x) and PB(x) be the sums. 4 Contribution of A × B found by polynomial multiplication:

(PAPB)(x). x x x2 x3 x x2 x2 A B PA(x) = 2x + x2 + x3 PB(x) = x + 2x2

Joshua Lau (UNSW Sydney) Minimizing and Computing IGL on Trees October 9, 2018 17 / 24

slide-37
SLIDE 37

Divide-and-conquer

3 Let PA(x) and PB(x) be the sums. 4 Contribution of A × B found by polynomial multiplication:

(PAPB)(x). x x x2 x3 x x2 x2 A B PA(x) = 2x + x2 + x3 PB(x) = x + 2x2 (PAPB)(x) = 2x2 + 5x3 + 3x4 + 2x5 so A × B contributes 2, 5, 3, 2 pairs, distance 2, 3, 4, 5 apart, respectively.

Joshua Lau (UNSW Sydney) Minimizing and Computing IGL on Trees October 9, 2018 17 / 24

slide-38
SLIDE 38

Divide-and-conquer

Consider the case when A ∩ B = {i, j}. We want to find the contribution among shortest paths between pairs (a, b) ∈ A × B passing through i, then repeat for j. a i j b A B

Joshua Lau (UNSW Sydney) Minimizing and Computing IGL on Trees October 9, 2018 18 / 24

slide-39
SLIDE 39

Divide-and-conquer

Consider the case when A ∩ B = {i, j}. We want to find the contribution among shortest paths between pairs (a, b) ∈ A × B passing through i, then repeat for j. a i j b A B We require d(a, i) + d(i, b) ≤ d(a, j) + d(j, b)

Joshua Lau (UNSW Sydney) Minimizing and Computing IGL on Trees October 9, 2018 18 / 24

slide-40
SLIDE 40

Divide-and-conquer

Consider the case when A ∩ B = {i, j}. We want to find the contribution among shortest paths between pairs (a, b) ∈ A × B passing through i, then repeat for j. a i j b A B We require d(a, i) + d(i, b) ≤ d(a, j) + d(j, b) ⇐ ⇒ d(a, i) − d(a, j) ≤ d(j, b) − d(i, b)

Joshua Lau (UNSW Sydney) Minimizing and Computing IGL on Trees October 9, 2018 18 / 24

slide-41
SLIDE 41

Divide-and-conquer

Consider the case when A ∩ B = {i, j}. We want to find the contribution among shortest paths between pairs (a, b) ∈ A × B passing through i, then repeat for j. a i j b A B We require d(a, i) + d(i, b) ≤ d(a, j) + d(j, b) ⇐ ⇒ d(a, i) − d(a, j) ≤ d(j, b) − d(i, b) ⇐ ⇒ fij(a) ≤ −fij(b)

Joshua Lau (UNSW Sydney) Minimizing and Computing IGL on Trees October 9, 2018 18 / 24

slide-42
SLIDE 42

Reduction to RedBluePolynomial in 1 dimension

RedBluePolynomial in 1 dimension.

1 Create a red point at coordinate fij(a) for each a ∈ A, with value

xd(a,i).

2 Create a blue point at coordinate −fij(b) for each b ∈ B, with value

xd(i,b).

3 Problem: Compute

fij(a)≤−fij(b) xd(a,i)xd(i,b).

Joshua Lau (UNSW Sydney) Minimizing and Computing IGL on Trees October 9, 2018 19 / 24

slide-43
SLIDE 43

Reduction to RedBluePolynomial in 1 dimension

RedBluePolynomial in 1 dimension.

1 Create a red point at coordinate fij(a) for each a ∈ A, with value

xd(a,i).

2 Create a blue point at coordinate −fij(b) for each b ∈ B, with value

xd(i,b).

3 Problem: Compute

fij(a)≤−fij(b) xd(a,i)xd(i,b).

× Using square-root decomposition, and polynomial multiplication, this can be done in time O(n√m log n), where n is the number of points, and m is the size of the range of values.

Joshua Lau (UNSW Sydney) Minimizing and Computing IGL on Trees October 9, 2018 19 / 24

slide-44
SLIDE 44

Implementation details

When |A ∩ B| > 2, we reduce to RedBluePolynomial in multiple

  • dimensions. This is done using (more) divide-and-conquer to reduce it

to the 1-dimensional case. When recursing on G[A], weighted edges need to be added between the vertices in A ∩ B to include paths passing through B, and vice-versa. Inclusion-exclusion is used to resolve double-counting. Care must be taken when dealing with equal coordinates / values (e.g. equal-length shortest paths passing through different vertices in A ∩ B). A 5-approximation of treewidth is used, as it is faster to find, and does not change the time complexity of other parts. We multiply integer polynomials efficiently using a complex Fast-Fourier Transform on a word RAM, with sufficiently many bits of precision.

Joshua Lau (UNSW Sydney) Minimizing and Computing IGL on Trees October 9, 2018 20 / 24

slide-45
SLIDE 45

Time complexity

Our algorithm finds the distance distribution of a graph with treewidth k and edges of unit weight in time 2O(k)n3/2+ε, for any ε > 0. If we only desire the first p values of the distance distribution, this can be done in time 2O(k)n1+ε√p, even on weighted graphs.

Joshua Lau (UNSW Sydney) Minimizing and Computing IGL on Trees October 9, 2018 21 / 24

slide-46
SLIDE 46

Outline

1

Introduction

2

Minimizing IGL on Trees

3

Computing IGL on Treelike Graphs

4

Concluding Remarks

Joshua Lau (UNSW Sydney) Minimizing and Computing IGL on Trees October 9, 2018 22 / 24

slide-47
SLIDE 47

Summary of results

We devised a subexponential time algorithm for the open TreeMinIGL problem. This can be extended to functions other than IGL with similar properties. We also gave a 2O(k)n1+ε√p time algorithm for computing the first p values of the distance distributions of a graph with treewidth k. This dependence on n lies between the 2O(k)n1+ε time algorithm for finding diameter and the O(n2k) time algorithm for APSP.

Joshua Lau (UNSW Sydney) Minimizing and Computing IGL on Trees October 9, 2018 23 / 24

slide-48
SLIDE 48

Future work

Attempt to prove/disprove NP-hardness of TreeMinIGL

Also consider tractability for parameter k

Extend subexponential algorithm for TreeMinIGL to graphs with bounded treewidth (albeit it is unlikely that it is FPT for parameter treewidth, since it is W [1]-hard). Compare hardness of computing distance distributions against computing IGL.

Joshua Lau (UNSW Sydney) Minimizing and Computing IGL on Trees October 9, 2018 24 / 24