1 / 33

Determinant Sums (and Labeled Walks) for Undirected Hamiltonicity

Determinant Sums (and Labeled Walks) for Undirected Hamiltonicity. Andreas Björklund. Undirected Hamiltonicity. Instance : Undirected graph G=(V,E) on n vertices . Question : Is there a vertex permutation

jonny
Télécharger la présentation

Determinant Sums (and Labeled Walks) for Undirected Hamiltonicity

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Determinant Sums(and Labeled Walks) for UndirectedHamiltonicity Andreas Björklund

  2. UndirectedHamiltonicity • Instance: Undirectedgraph G=(V,E) on n vertices. • Question: Is there a vertex permutation v1,v2,…,vnsuch that vivi+1 in E for all i, including vnv1?

  3. Examples No Yes

  4. History • Introduced by Kirkman 1855. • Popularized by Hamilton 1857. • Special case of travelingsalesman problem studiedsince 1930. • Exactalgorithm for TSP in O*(2n) time in 1962 by Bellman, Held and Karp, and Gonzalez. • ProvedNP-complete in Karp’s 1972 paper. • Polynomialspace O*(2n) time algorithm by Kohn, Gottlieb, and Kohn 1977, Karp 1982, and Bax 1993.

  5. Gerhard Woeginger’s 2003 Survey • Open problem: Construct an exactalgorithm for the travellingsalesman problem with complexityO*(cn) for some c<2. In fact, it evenwould be interesting to reachsuch a time complexityO*(cn) for some c<2 for the closelyrelated, butslightlysimplerHamiltoniancycle problem.

  6. Our Results • There is a Monte Carlo algorithm that detectsifany input n-vertexundirectedgraph is Hamiltonian or not running in O*(1.657n) time. • In bipartitegraphs, O*(1.414n) time. • Small weight TSP in O*(1.657nw) time, where w is the sum of all weights.

  7. Old Idea 1: DynamicProgrammingAcross the Vertex Subsets (Bellman, Held and Karp, and Gonzalez.) • Grow the pathonevertex at a time, rememberingwhichverticeswerepreviouslyvisited (but not the order in whichtheyweretraversed).

  8. Old Idea 2: Inclusion-ExclusionCountingAcross the Vertex Subsets (Kohn, Gottlieb, and Kohn, Karp, and Bax.) • For everyvertex subset, count the number of closedwalks on n vertices in the inducedgraph. Sum up the results with alternatingsignsdetermined by the parity of the vertex subset.

  9. Too Good? Ouralgorithmhere… • Usesexponential space, (butwecan get rid of it) • Works only in undirectedgraphs, • Is randomized, • And cannotevenapproximatelycount the solutions. The inclusion-exclusionalgorithm… • Usesonlypolynomialspace, • Works also for directedgraphs, • Is deterministic, • And counts the solutions.

  10. CommonObstacle • Bothalgorithmskeeptrack of the verticesvisited by explicitlyenumerating all vertex subsets. • Wehave to figureouthow to bookkeepvisitedvertices in a cheaperway. • First idea: Restrict the input space.

  11. PreviousRestricted Input Results • O*(1.251n) time for cubicgraphs (Eppstein’07, Iwama and Nakashima’07) • O*(1.715n) time for graphs of degree at mostfour (Gebaur’08) • O*((2-e(d))n) time for graphs of boundeddegree d (B.,Husfeldt, Kaski, and Koivisto ’08) • O*(1.682n) time for claw-freegraphs (Broersma, Fomin van’tHof, and Paulusma ’09)

  12. Bipartite Graphs A Hamiltoniancycle (when it exists) visits vertices from the twocolorclasses in the bipartitionalternatively.

  13. Labeled Hamiltonicity? 1 A 1 2 BF B B 3 B A BD C 3 C B D C A F 2 BE D 5 CE AE 4 D E 5 4 E E F E 6 F 6 n’=n/2=6 vertices n=12 vertices |L|=n/2=6 edgelabels

  14. Labeled Hamiltonicity • Wehave to keeptrack of visitedverticesandusedlabels. Seems like O*(2n’2|L|)=O*(2n). Havewereallygainedanything? Yes, Wewilldescribe an O*(2|L|) time randomizedalgorithmbased on counting in characterstictwo.

  15. The Tutte Matrix 1 3 2 5 4 6 + + …

  16. Special AsymmetricVertex 1 3 2 5 4 6 + + …

  17. Labeled Cycle Covers 1 Labels L={A,B,C,D,E,F} B B 3 C + C F 2 E D F 5 D A E 4 A Wecanuseinclusion-exclusioncounting to compute the labeledcycle covers. 6

  18. Labeled Tutte Matrices 1 BF B 3 BD A B C B C D A F 2 BE 5 CE AE D E 4 E F E 6

  19. Algorithm Input: Bipartitegraph G=(U,V,E) on n vertices. • Reduce to labeledHamiltonicityinstance G’=(V,E’) and labels L=U. • Fix field F of characteristictwo of size >>n’. • Assignvalues from F to xij,l for all ij in E’ and labelsl in L, uniformly and independently at random. • Compute • IfHnonzero returnYes, else return No.

  20. Analysis • Runtime O*(2|L|) = O*(2n/2) sincecomputing a numerical determinant is a polynomial time task. • No false positives: if H is nonzerothere must be a Hamiltoniancycle. • False negatives with exponentially small probability of failure (in n): H is an n-degreemultivariatepolynomial and is zero in at most n/|F| points by the Schwartz-Zippel Lemma.

  21. General Graphs vs Bipartite Ones • Wedon’thave a natural a priori way of partitioning a graph’svertices in labels and vertices of a labeledHamiltonicityinstance. • First idea: wecanusesubsets (not just singletons) of a label set to label the edges in a labeledcycle cover. • Wewilluse a randomequipartitioning of the vertices. • Problem: Wecannotlabeledges with the empty set. • Second idea: weadd a fewlabels on everydirectedge.

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

  23. HowManyDirectEdgeLabels are Needed? • Consider a fixedHamiltoniancycle H. • Ifwechoose an equipartition of the input graphsvertices and usehalf of them as vertices in a subset labeledHamiltonicityinstance, we get n/4 directedges in expectationalong H. • Weneed in total n/2+n/4=3n/4 labels. • Can we still find a O*(2|L|) time algorithm for Subset LabelHamiltonicity?

  24. GoingExponential • Instead of onematrix per label, weimagineonematrix TX per label subset X. • Now gives uswhatwewant.

  25. Computing • Wecanuse a recursion like the Bellman-Held-Karp-Gonzalezdynammicprogramming to compute all matrices TX in O*(2n-n’) time. • Wecanuse 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.682n) time. • Wecantrade a fewlabels for a modest exponentialnumber of runs to get an O*(1.657n) time algorithm. • Wecanusewalksinstead of paths in the labels’ construction getting a polynomialspacealgorithm with the same running time. • By adjoining a new indeterminatewecanembed a min-sum semiring in the polynomial and solve for TSP.

  27. Another RelatedTechnique (Joint work with Husfeldt, Kaski, and Koivisto) • Idea: Count labeledwalksinstead of labeledcycle covers. • Wedon’tneed determinants. • Previousreductions from Hamiltonicity to Subset Labeled Hamiltonicity still in play.

  28. Labeled Walks 2 B C C B F F B,D,E A 5 1 4 3 A E D D E 6 +

  29. WhyLabel at All? 2 5 1 4 3 6 Countedonlyonce!

  30. Aha! Just don’tBacktrack 2 5 1 4 3 6 1->6->3->4->6->3->1 1->6->4->3->6->3->1

  31. Whataboutk-Path? • Given undirectedgraph G=(V,E) and positive integer k, determineifthere is a simple path of length k in G. • Just countlabeledwalks of length k’ instead of closedlabeledwalks of length n’. • Thenweonlyneed a k’/n’ fraction of the labels! • Poly(n,k)1.657k time algorithm.

  32. Open Questions • Could 1.657 really be the optimal base? • Can wefindotherk-vertexsubgraphs faster with labelingtechniques? • Can wederandomize the bipartiteHamiltonicityalgorithm? • Is characteristictwoessential?

  33. Thank you for listening!

More Related