Transcript
Page 1: Finding the Minimum-Weight  -path

Finding the Minimum-Weight -pathAvinatan Hassidim, Orgad Keller, Moshe Lewenstein, Liam RodittyBar-Ilan UniversityTo appear in WADS`13

Page 2: Finding the Minimum-Weight  -path

Problem

β€’ Given an edge-weighted graph , parameter and a value where , our goal is to find the minimum-weight simple-path visiting vertices

1 2

3 4

2

2

2

3

π‘˜=4

Page 3: Finding the Minimum-Weight  -path

Previous Work

β€’ Previous results only for finding a k-path (non-weighted graphs).

β€’ Combinatorial:

β€’ Alon, Yuster, Zwick (`95): β€’ Can be generalized to the weighted case (minimum-weight)

β€’ Kneis, MΓΆlle, Richter, Rossmanith (`06): β€’ Can be generalized to the weighted case (minimum-weight)

Page 4: Finding the Minimum-Weight  -path

Previous Work

β€’ Algebraic:

β€’ Koutis (`08):

β€’ Williams (`09):

β€’ BjΓΆrklund et al. (`10): for undirected graphs

β€’ Algebraic methods do not seem to extend to the weighted variant

Page 5: Finding the Minimum-Weight  -path

Open Question

β€’ Open question raised in Williams [`09]:β€’ Can the minimum-weight variant be solved in as well

β€’ We answer yes, if the weights are small integers

β€’ General variant is still open

Page 6: Finding the Minimum-Weight  -path

Our Results

β€’ Randomized algorithm for integer edge-weights running in time β€’ A pseudo-polynomial dependency on M

β€’ If the weights are reals in , a -approximation algorithm running in time

β€’ Results can be extended to -tree problem: find a copy of a given k-node tree in a given graphβ€’ Same running times respectively for exact, approximate

Page 7: Finding the Minimum-Weight  -path

Distance Matrix-Product

β€’ Distance product:

β€’ Let be a graph adjacency matrix

β€’ is the minimum-weight -walk between and .

β€’ Distance product can be simulated by matrix product for integers

3 2

5 2

𝑖𝑗

𝑑

π‘˜βˆ’1

3

Page 8: Finding the Minimum-Weight  -path

Simulation

β€’ Let be an indeterminate variableβ€’ Define the polynomial adjacency matrix :

β€’ is a polynomial on ;β€’ Its minimum-degree with non-zero coefficient is the minimum-

weight -walk from to

β€’ Problems: walks, not (simple) paths.

𝑧 3 𝑧 2

𝑧5 𝑧 2𝑖

𝑗

π‘˜

𝐴2 [𝑖 , 𝑗 ]=𝑧5+ 𝑧7

𝑧 3

Page 9: Finding the Minimum-Weight  -path

Intuition – Eliminate -walks

β€’ Koutis’ and Williams’ method:

β€’ Suppose we re-define B:β€’

β€’ where is a variable for each vertex .

β€’ Can we do the operation on some Algebraic structure where non-simple-walks cancelβ€’ i.e., where ?

Page 10: Finding the Minimum-Weight  -path

Algebra

β€’ Let be a multiplicative group and be a fieldβ€’ We define to be objects of the form: , where .

β€’ Addition is component wise:

β€’ Multiplication is convolution:

Page 11: Finding the Minimum-Weight  -path

Algebra

β€’ Define: β€’ We’ll shorthand this as

β€’ Define: β€’ We’ll shorthand this as

β€’ is a ring

Page 12: Finding the Minimum-Weight  -path

Algebra

β€’ Choose where β€’ For all ,

β€’ Choose , where multiplication is entry-wise addition modulo :β€’ E.g., β€’ So β€’ For all , if and only if

Page 13: Finding the Minimum-Weight  -path

Definition

β€’ We define a family of polynomial adjacency matrices for :

β€’ Our operations will be done on Indeterminate Variable for each vertex

A random value

Page 14: Finding the Minimum-Weight  -path

Main Polynomial

β€’ Define

β€’ is a sum on all k-walks in the graph

𝑖1 𝑖5𝐡[ 𝑖1 ,𝑖2]𝐡[𝑖2 , 𝑖3]𝐡[𝑖3 , 𝑖4 ] 𝐡[𝑖4 ,𝑖5]

𝑖2 𝑖3 𝑖4

Page 15: Finding the Minimum-Weight  -path

Main Polynomial

β€’ is a sum on all -walks in the graph

𝑖1 𝑖5𝐡[ 𝑖1 ,𝑖2]𝐡[𝑖2 , 𝑖3]𝐡[𝑖3 , 𝑖4 ] 𝐡[𝑖4 ,𝑖5]

𝑖2 𝑖3 𝑖4

Page 16: Finding the Minimum-Weight  -path

Algorithm

β€’ Pick the random values for

β€’ Pick random vectors (i.e., random vector for each vertex)

β€’ Compute

β€’ Return the lowest degree having a non-zero coefficient in (if such exists), or output β€œno -path in graph” otherwise

Page 17: Finding the Minimum-Weight  -path

Propositions

β€’ Non-simple paths vanish (=)

β€’ Simple paths where the corresponding vectors are linearly independent do not vanish

β€’ Simple paths where the corresponding vectors are linearly dependent vanish (=)β€’ Happens with low probability

β€’ Simple paths where the corresponding vectors are linearly independent survive w.h.p. when summed-up

Page 18: Finding the Minimum-Weight  -path

Minimum-Degree of

β€’ In particular, let d’ be the minimum degree of P. We’ll focus on the coefficient of , denoted as

β€’ Then does not vanish w.h.p. and therefore the lowest-degree term corresponds to the minimum-weight -path

Page 19: Finding the Minimum-Weight  -path

Running Time

β€’ Dominated by multiplying two polynomials in of degree at most .β€’ Can be done in by using multi-dimensional FFT

β€’ Running time is

Page 20: Finding the Minimum-Weight  -path

Approximation

β€’ For real weights in , we give a -approximation algorithm.

β€’ Lemma: for integer edge-weights, there is an algorithm that finds a -path of weight at most , or returns that no such path exists. β€’ Proof outline: in the previous algorithm, truncate degrees that

are when multiplying polynomials

β€’ Call this algorithm

Page 21: Finding the Minimum-Weight  -path

Idea

β€’ Let be the number of edges in a -path

β€’ Let be lower and upper bounds on .β€’ Initially set and

β€’ Iteratively, we will fine-tune L,U until the ratio .

β€’ Main idea: use adaptive scaling of the edge weights.β€’ Scaling factor is different in each iteration

Page 22: Finding the Minimum-Weight  -path

Fine-Tuning

While :β€’ Let β€’ Define (this is the scaling coefficient)β€’ Define a new graph with edge weights

β€’ β€œTry” to test if or not by running β€’ Result is not necessary correct because of floor function!

Page 23: Finding the Minimum-Weight  -path

Loss of Precision

β€’ Loss of precision is , per edge, or equiv. per k-path

β€’ If =β€œno” then

β€’ But if =β€œyes” then

𝑋𝐿 𝑋+π›Ώπ‘ˆ π‘ˆ

𝑋𝐿 𝑋+π›Ώπ‘ˆ π‘ˆ

βŸπ‘€(𝑂𝑃𝑇 )

βŸπ‘€(𝑂𝑃𝑇 )

Page 24: Finding the Minimum-Weight  -path

Fine-Tuning

β€’ Loss of accuracy is , per edge, or equiv. per k-path

β€’ If =β€œno” then β€’ Update

β€’ But if =β€œyes” then β€’ Update

𝑋𝐿 𝑋+π›Ώπ‘ˆ π‘ˆ

𝑋𝐿 𝑋+π›Ώπ‘ˆ π‘ˆπ‘ˆ

𝐿

Page 25: Finding the Minimum-Weight  -path

Algorithm

β€’ The ratio decreases (we will show convergence later)

β€’ Once :β€’ Define a new graph G’ with edge weights β€’ Return the output of β€’ (so loss of precision here is per -path)

Page 26: Finding the Minimum-Weight  -path

Running Time

β€’ Let be the values of at start of iteration β€’ It can be shown that in both cases (when , when )

β€’ So iterations until β€’ Each call to costs (since )

β€’ Final call to costs

β€’ Overall running time is

Page 27: Finding the Minimum-Weight  -path

Correctness

β€’ The invariant is maintained throughout

β€’ Let be the path returned by the algorithmβ€’ (By the call to )

β€’ Then:

Page 28: Finding the Minimum-Weight  -path

Thanks!