minimizing and computing inverse geodesic length on trees ... · thesis b presentation joshua lau...

Post on 31-Aug-2020

2 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

top related