48
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

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)

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 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 Inverse Geodesic Length on TreesThesis B Presentation

Joshua LauSupervisor: A/Prof. Serge Gaspers

UNSW Sydney

October 9, 2018

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

Page 2: 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)

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

Page 3: 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)

Definitions

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

IGL(G) =∑

u,v⊆V

1d(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 1d(u,v) = 0.

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

Page 4: 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)

Definitions

Problem (MinIGL)Input: A graph G, an integer k ≤ |V | and a target IGL TQuestion: 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

Page 5: 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)

ExampleConsider the following graph G when k = 2.

IGL(G) = 9× 11 + 5× 1

2 + 5× 13 + 2× 1

4 = 1323

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

1 + 1× 12 = 31

2

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

Page 6: 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)

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

1 + 5× 12 + 5× 1

3 + 2× 14 = 132

3

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

1 + 1× 12 = 31

2

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

Page 7: 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)

Example

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

1 + 5× 12 + 5× 1

3 + 2× 14 = 132

3

Delete these k = 2 vertices to obtain G ′.

IGL(G ′) = 3× 11 + 1× 1

2 = 312

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

Page 8: 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)

Example

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

1 + 5× 12 + 5× 1

3 + 2× 14 = 132

3

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

1 + 1× 12 = 31

2

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

Page 9: 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)

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

Page 10: 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)

Algorithm

Key ResultWe can solve TreeMinIGL in subexponential time, and polynomialspace.

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 ona tree in O(n2). Useful when k is (somewhat) small.We give an algorithm that runs in time O∗

(2poly( n

k ))

. Useful when kis 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

Page 11: 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)

Algorithm

Key ResultWe can solve TreeMinIGL in subexponential time, and polynomialspace.

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 ona tree in O(n2). Useful when k is (somewhat) small.We give an algorithm that runs in time O∗

(2poly( n

k ))

. Useful when kis 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

Page 12: 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)

Algorithm

Key ResultWe can solve TreeMinIGL in subexponential time, and polynomialspace.

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 ona tree in O(n2). Useful when k is (somewhat) small.

We give an algorithm that runs in time O∗(

2poly( nk ))

. Useful when kis 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

Page 13: 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)

Algorithm

Key ResultWe can solve TreeMinIGL in subexponential time, and polynomialspace.

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 ona tree in O(n2). Useful when k is (somewhat) small.We give an algorithm that runs in time O∗

(2poly( n

k ))

. Useful when kis 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

Page 14: 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)

Algorithm

Key ResultWe can solve TreeMinIGL in subexponential time, and polynomialspace.

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 ona tree in O(n2). Useful when k is (somewhat) small.We give an algorithm that runs in time O∗

(2poly( n

k ))

. Useful when kis 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

Page 15: 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)

Exploiting large k

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

Observation: when k is large compared to n, we expect remainingcomponents (trees) to be small in an optimal solution.

TheoremIf S is an optimal subset of a TreeMinIGL instance (T , k), then everyremaining 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

Page 16: 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)

Exploiting large k

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

Observation: when k is large compared to n, we expect remainingcomponents (trees) to be small in an optimal solution.

TheoremIf S is an optimal subset of a TreeMinIGL instance (T , k), then everyremaining 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

Page 17: 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)

Exploiting large k

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

Observation: when k is large compared to n, we expect remainingcomponents (trees) to be small in an optimal solution.

TheoremIf S is an optimal subset of a TreeMinIGL instance (T , k), then everyremaining 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

Page 18: 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)

Exploiting large k

Root the tree and use DP to determine the optimal structure of remainingcomponents.

State is (subtree, budget of deletions).Recurrence: either subtree root is deleted or it is not.

If deleted, then consider children’s subtrees separately. Optimallydictate how the budget is to be shared, using DP.

Otherwise, root is in some remaining component. We determine this byfinding its structure and mapping (diagram next slide).

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

Page 19: 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)

Exploiting large kRecurrence (continued):

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

(4L

L√

L

)of these, by bounding sum

of 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 ′ todistinct vertices in T . This forces some vertices to be deleted.Recurse on the remaining subtrees, dictating how the remainingbudget should be shared, using DP once again.

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

Page 20: 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)

Exploiting large kRecurrence (continued):

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

(4L

L√

L

)of these, by bounding sum

of 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 ′ todistinct vertices in T . This forces some vertices to be deleted.Recurse on the remaining subtrees, dictating how the remainingbudget should be shared, using DP once again.

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

Page 21: 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)

Exploiting large kRecurrence (continued):

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

(4L

L√

L

)of these, by bounding sum

of Catalan numbers (Topley, 2016).

T ′1

2 3

4 5 6

T1

2 3

4 5 6

mapping

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

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

Page 22: 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)

Exploiting large kRecurrence (continued):

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

(4L

L√

L

)of these, by bounding sum

of Catalan numbers (Topley, 2016).

T ′1

2 3

4 5 6

T1

2 3

4 5 6

mapping

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

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

Page 23: 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)

Exploiting large k

For a fixed T ′, we can determine the optimal mapping in polynomialtime and space.We can enumerate all T ′ in polynomial space, so our algorithm usespolynomial space.

Our algorithm takes time O(

4L√

Ln2)

= 2O((n/k)5+log n). This is FPT forparameter 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 algorithmotherwise, 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

Page 24: 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)

Exploiting large k

For a fixed T ′, we can determine the optimal mapping in polynomialtime and space.We can enumerate all T ′ in polynomial space, so our algorithm usespolynomial space.

Our algorithm takes time O(

4L√

Ln2)

= 2O((n/k)5+log n). This is FPT forparameter 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 algorithmotherwise, 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

Page 25: 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)

A generalisation

Let f be a function mapping forests to reals, such thatf (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 verticesto delete from a tree T of n vertices, such that f (T − S) is minimised.

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

( nk)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

Page 26: 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)

A generalisation

Let f be a function mapping forests to reals, such thatf (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 verticesto delete from a tree T of n vertices, such that f (T − S) is minimised.

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

( nk)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

Page 27: 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)

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

Page 28: 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)

Distance distributions

The distance distribution of a graph is the sequence ai, where ai is thenumber of pairs of vertices distance i apart (shortest path).

Implies diameter, IGL, Wiener indexImplied by APSP

Q: Can we do better than APSP (Ω(n2)) for computing the distancedistribution on treelike graphs?

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

Page 29: 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)

Distance distributions

The distance distribution of a graph is the sequence ai, where ai is thenumber of pairs of vertices distance i apart (shortest path).

Implies diameter, IGL, Wiener indexImplied by APSP

Q: Can we do better than APSP (Ω(n2)) for computing the distancedistribution on treelike graphs?

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

Page 30: 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)

TreewidthThe 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

3tw(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

Page 31: 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)

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 inA× 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 .

xx

x2

x3

x

x2

x2

A B

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

Page 32: 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)

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 inA× 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 .

xx

x2

x3

x

x2

x2

A B

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

Page 33: 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)

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 inA× 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 .

xx

x2

x3

x

x2

x2

A B

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

Page 34: 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)

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

(PAPB)(x).

xx

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

Page 35: 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)

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

(PAPB)(x).

xx

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

Page 36: 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)

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

(PAPB)(x).

xx

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

Page 37: 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)

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

(PAPB)(x).

xx

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

Page 38: 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)

Divide-and-conquerConsider 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 .

ai

jb

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

Page 39: 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)

Divide-and-conquerConsider 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 .

ai

jb

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

Page 40: 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)

Divide-and-conquerConsider 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 .

ai

jb

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

Page 41: 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)

Divide-and-conquerConsider 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 .

ai

jb

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

Page 42: 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)

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 canbe 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

Page 43: 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)

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 canbe 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

Page 44: 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)

Implementation details

When |A ∩ B| > 2, we reduce to RedBluePolynomial in multipledimensions. This is done using (more) divide-and-conquer to reduce itto the 1-dimensional case.When recursing on G [A], weighted edges need to be added betweenthe vertices in A ∩ B to include paths passing through B, andvice-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 inA ∩ B).A 5-approximation of treewidth is used, as it is faster to find, anddoes not change the time complexity of other parts.We multiply integer polynomials efficiently using a complexFast-Fourier Transform on a word RAM, with sufficiently many bits ofprecision.

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

Page 45: 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)

Time complexity

Our algorithm finds the distance distribution of a graph with treewidth kand 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 bedone 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

Page 46: 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)

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

Page 47: 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)

Summary of results

We devised a subexponential time algorithm for the openTreeMinIGL problem. This can be extended to functions other thanIGL with similar properties.

We also gave a 2O(k)n1+ε√p time algorithm for computing the first pvalues of the distance distributions of a graph with treewidth k.

This dependence on n lies between the 2O(k)n1+ε time algorithm forfinding diameter and the O(n2k) time algorithm for APSP.

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

Page 48: 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)

Future work

Attempt to prove/disprove NP-hardness of TreeMinIGLAlso consider tractability for parameter k

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

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