1 / 24

Minko Markov Sofia University, Faculty of Mathematics and Informatics minkom@fmi.uni-sofia.bg

Minko Markov Sofia University, Faculty of Mathematics and Informatics minkom@fmi.uni-sofia.bg. A Linear Time Algorithm for the Longest Path Problem on 2-trees joint work with Tzvetalin Vassilev /tzvetalv@nipissingu.ca/ and Krassimir Manev /manev@fmi.uni-sofia.bg/. Structure of the lecture.

zofia
Download Presentation

Minko Markov Sofia University, Faculty of Mathematics and Informatics minkom@fmi.uni-sofia.bg

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. Minko Markov Sofia University, Faculty of Mathematics and Informatics minkom@fmi.uni-sofia.bg A Linear Time Algorithm for the Longest Path Problem on 2-treesjoint work with TzvetalinVassilev /tzvetalv@nipissingu.ca/ and KrassimirManev /manev@fmi.uni-sofia.bg/

  2. Structure of the lecture • Background • Motivation • The algorithm itself • Conclusions Minko Markov, Faculty of Mathematics and Informatics. This research is supported by Sofia University Science Fund under project "Discrete Structures"

  3. Background • Longest Path (LP) – a computational problem on undirected connected graphs, either non-weighted or weighted. • u-path: a path with one endpoint vertex u • (uv)-path: a path with endpoints u and v • (uv)-path: a path with one endpoint u and v as an internal vertex • (u,  v)-path: any path with one endpoint u, not containing v Minko Markov, Faculty of Mathematics and Informatics. This research is supported by Sofia University Science Fund under project "Discrete Structures"

  4. Definitions (cont’d) • (u  v)-paths: two vertex-disjoint paths, one with endpoint u, the other with endpoint v Minko Markov, Faculty of Mathematics and Informatics. This research is supported by Sofia University Science Fund under project "Discrete Structures"

  5. 2-Trees Minko Markov, Faculty of Mathematics and Informatics. This research is supported by Sofia University Science Fund under project "Discrete Structures"

  6. Complexity Background • LP on general graphs in NP-complete both in the unweighted and weighted version • Best poly-time approximation ratio is close to linear (assuming P ≠ NP) • Fixed Parameter Tractable Minko Markov, Faculty of Mathematics and Informatics. This research is supported by Sofia University Science Fund under project "Discrete Structures"

  7. Complexity Background • A linear time algorithm for LP on trees is known since the 1960’s • Poly-time algorithms: • Cactus graphs: • O(n2) (Uehara, Uno 2007) • O(n) (Mugurel et al, 2009, M. and Manev 2009) • Block graphs: O(m + n) (Uehara, Uno 2007) • Ptolemaic graphs: O(n5) (Takahara et al, 2008) • Interval graphs: O(n4) (Ioannidou et al, 2009) Minko Markov, Faculty of Mathematics and Informatics. This research is supported by Sofia University Science Fund under project "Discrete Structures"

  8. Complexity Background • For graphs of treewidth bound by a constant k, LP is solvable in O(2k k! n) time (Bodlaender 1988). The algorithm is only hinted rather than stated explicitly. Allegedly, huge hidden constant. And yet the result implies a linear time algorithm for cactus graph (and thus annuls the result of Uehara and Uno). Minko Markov, Faculty of Mathematics and Informatics. This research is supported by Sofia University Science Fund under project "Discrete Structures"

  9. Motivation • First was the linear time algorithm for LP in cactus graphs • What if the cactus cycles have chords? Is it trivial to modify the cacti algorithm to handle chords as well, preserving the linear time complexity? What if the chords are non-crossing (parallel)? • Outerplanar graphs have treewidth two. So let us solve LP on 2-trees in O(n). Minko Markov, Faculty of Mathematics and Informatics. This research is supported by Sofia University Science Fund under project "Discrete Structures"

  10. Rooted 2-tree • Any edge can be chosen as a root • If the root is a periphery edge then the rooted 2-tree is simple and we define the root face as well. u v G1 and G2 aresimple or complex 2-trees. They are the branches F G1 G2 Minko Markov, Faculty of Mathematics and Informatics. This research is supported by Sofia University Science Fund under project "Discrete Structures"

  11. Rooted 2-tree (cont’d) • If the root is not a periphery edge then there is a collection of simple rooted 2-trees “glued together” at the root. The 2-tree is complex. u v G1,G2, and G3 arethe folios G2 G3 G1 Minko Markov, Faculty of Mathematics and Informatics. This research is supported by Sofia University Science Fund under project "Discrete Structures"

  12. The labels • The label of a rooted 2-tree G, root (u,v), is the ordered septuple ‹λ1, λ2, λ3, λ4, λ5, λ6, λ7›, where • λ1 is the length of a longest path in G • λ2 is the length of a longest (uv)-path • λ3 is the length of a longest (uv)-path • λ4 is the length of a longest (u,  v)-path • λ5 is the length of a longest (vu)-path • λ6 is the length of a longest (v,  u)-path Minko Markov, Faculty of Mathematics and Informatics. This research is supported by Sofia University Science Fund under project "Discrete Structures"

  13. The labels (cont’d) • λ7 is the sum of the lengths of any two (u  v)-paths of maximum total length • In general, the label of the root is (u,v) is different from the label of the root (v,u). The graph is undirected but in general the length of a longest (uv)-path is not the same as the length of a longest (vu)-path, etc. Minko Markov, Faculty of Mathematics and Informatics. This research is supported by Sofia University Science Fund under project "Discrete Structures"

  14. The labels (cont’d) • The trivial 2-tree is the single edge. The label of the trivial 2-tree is ‹1,1,0, 0,0,0,0›. Minko Markov, Faculty of Mathematics and Informatics. This research is supported by Sofia University Science Fund under project "Discrete Structures"

  15. The algorithm • Choose any edge as the root. Compute its label with COMPUTE LABEL. The numerical answer is the first element of the label. It is not difficult to compute modify the algorithm so that a longest path is computed as well. • COMPUTE LABEL: if the 2-tree is a single edge, return ‹1,1,0, 0,0,0,0›. Minko Markov, Faculty of Mathematics and Informatics. This research is supported by Sofia University Science Fund under project "Discrete Structures"

  16. COMPUTE LABEL • If the root is not just an edge, it has one or more folios. Compute the label of each one of them with COMPUTE SIMPLE. Using those labels, compute the label of the whole 2-tree with COMBINE ON EDGE λ = ‹_,_,_,_,_,_,_› λ = ‹_,_,_,_,_,_,_› λ = ‹_,_,_,_,_,_,_› λ = ‹_,_,_,_,_,_,_› G2 G2 G3 G3 G1 Minko Markov, Faculty of Mathematics and Informatics. This research is supported by Sofia University Science Fund under project "Discrete Structures"

  17. COMPUTE SIMPLE • Split the root face and compute the labels of the two obtained rooted 2-trees. Using those two labels, compute the label for the whole 2-tree with COMBINE ON FACE G2 G1 u v F Minko Markov, Faculty of Mathematics and Informatics. This research is supported by Sofia University Science Fund under project "Discrete Structures"

  18. COMBINE ON EDGE • In the resulting label, each of λ2, λ4, and λ6 is the maximum of the 2nd, 4th, and 6th element, respectively, over the labels of the folia • Each of λ3, λ5,and λ7 is the maximum of two numbers: one is the maximum over the correspondent elements of the folia, the other is a sum of two elements (corresponding to concatenation of two paths) Minko Markov, Faculty of Mathematics and Informatics. This research is supported by Sofia University Science Fund under project "Discrete Structures"

  19. COMBINE ON EDGE (cont’d) • λ1 is the maximum of 11 or 12 numbers: • The max λ1 over all folia • The hitherto computed λ2, λ3, λ4, λ5, λ6 • Five sums over the folia, in case there are 2 folia only, or six sums, otherwise Minko Markov, Faculty of Mathematics and Informatics. This research is supported by Sofia University Science Fund under project "Discrete Structures"

  20. COMBINE ON FACE • λ2 is the sum of the λ2’s of the two branches • The other λi’s are obtained as maxima of certain sums of label elements of the two branches, sometimes +1 in order to take into account the addition of the root edge Minko Markov, Faculty of Mathematics and Informatics. This research is supported by Sofia University Science Fund under project "Discrete Structures"

  21. LP on partial 2-trees • Given the tree decomposition, it is trivial to deal with the cut vertices – the label of the graph “below” needs only two elements • Within biconnected components, there are missing edges. Fill in with “virtual” missing edges. For each virtual edge, the root there is in fact the two vertices. Minko Markov, Faculty of Mathematics and Informatics. This research is supported by Sofia University Science Fund under project "Discrete Structures"

  22. LP on partial 2-trees • The labels are the same (7 elements). The decisions are taken likewise, just drop expressions (from the max() functions) that rely on a path passing through the root edge when the root edge is virtual Minko Markov, Faculty of Mathematics and Informatics. This research is supported by Sofia University Science Fund under project "Discrete Structures"

  23. Conclusion • It is easy to design an O(n) algorithm for LP on 2-trees. • It seems infeasible to extend this approach to k-trees. Minko Markov, Faculty of Mathematics and Informatics. This research is supported by Sofia University Science Fund under project "Discrete Structures"

  24. THE END Minko Markov, Faculty of Mathematics and Informatics. This research is supported by Sofia University Science Fund under project "Discrete Structures"

More Related