Download presentation

Presentation is loading. Please wait.

Published byBryce Tansley Modified about 1 year ago

1
Andreas Björklund

2
Undirected Hamiltonicity Instance: Undirected graph G=(V,E) on n vertices. Question: Is there a vertex permutation v 1,v 2,…,v n such that v i v i+1 in E for all i, including v n v 1 ?

3
Examples Yes No

4
History Introduced by Kirkman Popularized by Hamilton Special case of traveling salesman problem studied since Exact algorithm for TSP in O*(2 n ) time in 1962 by Bellman, Held and Karp, and Gonzalez. Proved NP-complete in Karp’s 1972 paper. Polynomial space O*(2 n ) time algorithm by Kohn, Gottlieb, and Kohn 1977, Karp 1982, and Bax 1993.

5
Gerhard Woeginger’s 2003 Survey Open problem: Construct an exact algorithm for the travelling salesman problem with complexity O*(c n ) for some c<2. In fact, it even would be interesting to reach such a time complexity O*(c n ) for some c<2 for the closely related, but slightly simpler Hamiltonian cycle problem.

6
Our Results There is a Monte Carlo algorithm that detects if any input n-vertex undirected graph is Hamiltonian or not running in O*(1.657 n ) time. In bipartite graphs, O*(1.414 n ) time. Small weight TSP in O*(1.657 n w) time, where w is the sum of all weights.

7
Old Idea 1: Dynamic Programming Across the Vertex Subsets (Bellman, Held and Karp, and Gonzalez.) Grow the path one vertex at a time, remembering which vertices were previously visited (but not the order in which they were traversed).

8
Old Idea 2: Inclusion-Exclusion Counting Across the Vertex Subsets (Kohn, Gottlieb, and Kohn, Karp, and Bax.) For every vertex subset, count the number of closed walks on n vertices in the induced graph. Sum up the results with alternating signs determined by the parity of the vertex subset.

9
Too Good? The inclusion-exclusion algorithm… Uses only polynomial space, Works also for directed graphs, Is deterministic, And counts the solutions. Our algorithm here… Uses exponential space, (but we can get rid of it) Works only in undirected graphs, Is randomized, And cannot even approximately count the solutions.

10
Common Obstacle Both algorithms keep track of the vertices visited by explicitly enumerating all vertex subsets. We have to figure out how to bookkeep visited vertices in a cheaper way. First idea: Restrict the input space.

11
Previous Restricted Input Results O*(1.251 n ) time for cubic graphs (Eppstein’07, Iwama and Nakashima’07) O*(1.715 n ) time for graphs of degree at most four (Gebaur’08) O*((2-e(d)) n ) time for graphs of bounded degree d (B.,Husfeldt, Kaski, and Koivisto ’08) O*(1.682 n ) time for claw-free graphs (Broersma, Fomin van’t Hof, and Paulusma ’09)

12
Bipartite Graphs A Hamiltonian cycle (when it exists) visits vertices from the two color classes in the bipartition alternatively.

13
F Labeled Hamiltonicity? B F C A E D A B BF B BD CE D E AE E C BE A B C D E F n=12 vertices n’=n/2=6 vertices |L|=n/2=6 edge labels

14
Labeled Hamiltonicity We have to keep track of visited vertices and used labels. Seems like O*(2 n ’2 |L| )=O*(2 n ). Have we really gained anything? Yes, We will describe an O*(2 |L| ) time randomized algorithm based on counting in characterstic two.

15
The Tutte Matrix …

16
Special Asymmetric Vertex …

17
Labeled Cycle Covers We can use inclusion-exclusion counting to compute the labeled cycle covers B E A D F C E D B C A F + 1 Labels L={A,B,C,D,E,F}

18
Labeled Tutte Matrices A B BF BD CE E AE E C BE A B D F B C D E F

19
Algorithm Input: Bipartite graph G=(U,V,E) on n vertices. 1) Reduce to labeled Hamiltonicity instance G’=(V,E’) and labels L=U. 2) Fix field F of characteristic two of size >>n’. 3) Assign values from F to x ij,l for all ij in E’ and labels l in L, uniformly and independently at random. 4) Compute 5) If H nonzero return Yes, else return No.

20
Analysis Runtime O*(2 |L| ) = O*(2 n/2 ) since computing a numerical determinant is a polynomial time task. No false positives: if H is nonzero there must be a Hamiltonian cycle. False negatives with exponentially small probability of failure (in n): H is an n-degree multivariate polynomial and is zero in at most n/|F| points by the Schwartz-Zippel Lemma.

21
General Graphs vs Bipartite Ones We don’t have a natural a priori way of partitioning a graph’s vertices in labels and vertices of a labeled Hamiltonicity instance. First idea: we can use subsets (not just singletons) of a label set to label the edges in a labeled cycle cover. We will use a random equipartitioning of the vertices. Problem: We cannot label edges with the empty set. Second idea: we add a few labels on every direct edge.

22
1 4 2 Subset Labeled Hamiltonicity B C A E D {B} {C} n=10 vertices n’=n/2=5 vertices |L|=n/2+|L’|=7 edge labels L’={a,b} {AD} {b} {ADE} {DE} {b} {C} {E}{BADE} {AB} {C} {BADE} {a} {b}

23
How Many Direct Edge Labels are Needed? Consider a fixed Hamiltonian cycle H. If we choose an equipartition of the input graphs vertices and use half of them as vertices in a subset labeled Hamiltonicity instance, we get n/4 direct edges in expectation along H. We need in total n/2+n/4=3n/4 labels. Can we still find a O*(2 |L| ) time algorithm for Subset Label Hamiltonicity?

24
Going Exponential Instead of one matrix per label, we imagine one matrix T X per label subset X. Now gives us what we want.

25
Computing We can use a recursion like the Bellman-Held-Karp- Gonzalez dynammic programming to compute all matrices T X in O*(2 n-n’ ) time. We can use the fast zeta transform to compute and tabulate the inner sum for all X’s in O*(2 |L| ) time.

26
Analysis and Extensions We still have O*(2 |L| ) time algorithm, and remembering |L|=3n/4 we get O*(1.682 n ) time. We can trade a few labels for a modest exponential number of runs to get an O*(1.657 n ) time algorithm. We can use walks instead of paths in the labels’ construction getting a polynomial space algorithm with the same running time. By adjoining a new indeterminate we can embed a min-sum semiring in the polynomial and solve for TSP.

27
Another Related Technique (Joint work with Husfeldt, Kaski, and Koivisto) Idea: Count labeled walks instead of labeled cycle covers. We don’t need determinants. Previous reductions from Hamiltonicity to Subset Labeled Hamiltonicity still in play.

28
Labeled Walks F F A B A C D E B D C + E B,D,E

29
Why Label at All? Counted only once!

30
Aha! Just don’t Backtrack >6->3->4->6->3->11->6->4->3->6->3->1

31
What about k-Path? Given undirected graph G=(V,E) and positive integer k, determine if there is a simple path of length k in G. Just count labeled walks of length k’ instead of closed labeled walks of length n’. Then we only need a k’/n’ fraction of the labels! Poly(n,k)1.657 k time algorithm.

32
Open Questions Could really be the optimal base? Can we find other k-vertex subgraphs faster with labeling techniques? Can we derandomize the bipartite Hamiltonicity algorithm? Is characteristic two essential?

33
Thank you for listening!

Similar presentations

© 2016 SlidePlayer.com Inc.

All rights reserved.

Ads by Google