Finding the Minimum-Weight -pathAvinatan Hassidim, Orgad Keller, Moshe Lewenstein, Liam RodittyBar-Ilan UniversityTo appear in WADS`13
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
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)
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
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
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
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
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
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 ?
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:
Algebra
β’ Define: β’ Weβll shorthand this as
β’ Define: β’ Weβll shorthand this as
β’ is a ring
Algebra
β’ Choose where β’ For all ,
β’ Choose , where multiplication is entry-wise addition modulo :β’ E.g., β’ So β’ For all , if and only if
Definition
β’ We define a family of polynomial adjacency matrices for :
β’ Our operations will be done on Indeterminate Variable for each vertex
A random value
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
Main Polynomial
β’ is a sum on all -walks in the graph
π1 π5π΅[ π1 ,π2]π΅[π2 , π3]π΅[π3 , π4 ] π΅[π4 ,π5]
π2 π3 π4
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
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
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
Running Time
β’ Dominated by multiplying two polynomials in of degree at most .β’ Can be done in by using multi-dimensional FFT
β’ Running time is
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
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
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!
Loss of Precision
β’ Loss of precision is , per edge, or equiv. per k-path
β’ If =βnoβ then
β’ But if =βyesβ then
ππΏ π+πΏπ π
ππΏ π+πΏπ π
βπ€(πππ )
βπ€(πππ )
Fine-Tuning
β’ Loss of accuracy is , per edge, or equiv. per k-path
β’ If =βnoβ then β’ Update
β’ But if =βyesβ then β’ Update
ππΏ π+πΏπ π
ππΏ π+πΏπ ππ
πΏ
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)
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
Correctness
β’ The invariant is maintained throughout
β’ Let be the path returned by the algorithmβ’ (By the call to )
β’ Then:
Thanks!