200 likes | 324 Views
Drawing (Complete) Binary Tanglegrams. Hardness, Approximation, Fixed-Parameter Tractability. Kevin Buchin Maike Buchin Jaroslaw Byrka Martin Nöllenburg Yoshio Okamoto Rodrigo I. Silveira Alexander Wolff. Utrecht U, NL TU Eindhoven, NL Karlsruhe U, DE Tokio Inst. Tech., JP.
E N D
Drawing (Complete) Binary Tanglegrams Hardness, Approximation, Fixed-Parameter Tractability Kevin Buchin Maike Buchin Jaroslaw Byrka Martin Nöllenburg Yoshio Okamoto Rodrigo I. Silveira Alexander Wolff Utrecht U, NL TU Eindhoven, NL Karlsruhe U, DE Tokio Inst. Tech., JP
Tanglegram: • 2 trees • leaves matched 1-to-1 Drawing (Complete) Binary Tanglegrams
Application example • Phylogenetic trees Pocket gopher drawings from The Animal Diversity Web (http://animaldiversity.org) Drawing (Complete) Binary Tanglegrams grandis castanops bursarius neglectus
Comparing pairs of trees • Comparing trees • Visually • Applications • Software visualization • Hierarchical clustering • Phylogenetic trees Drawing (Complete) Binary Tanglegrams
Input: 2 trees: S, T With leaves in 1-to-1 correspondence Output: plane drawings of S and T Minimizing # inter-tree crossings Problem statement:TL (Tanglegram Layout) S T 6 inter-tree crossings 4 inter-tree crossings 5 inter-tree crossings 3 inter-tree crossings Drawing (Complete) Binary Tanglegrams
Related work • 2-sided crossing minimization problem • Introduced by Sugiyama et al. • Several differences • Arbitrary degree • Any ordering allowed Drawing (Complete) Binary Tanglegrams
Previous work • Holten and Van Wijk (’08) • Visual Comparisonof Hierarchically Organized Data Drawing (Complete) Binary Tanglegrams
Previous work (cont’d) • Dwyer and Schreiber (’04) • 2.5D drawings of stacked trees • One sided (binary) version, O(n2 log n) time. • Fernau, Kaufmann and Poths (’05) • TL is NP-hard • 1 (binary) tree fixed: O(n log2 n) time. • FPT algorithm O*(ck), for c≈1024 Drawing (Complete) Binary Tanglegrams
Our results • We study 2 versions of TL • We show: • binary TL is NP-hard to approximate within any constant * • complete binary TL is NP-hard • complete binary TL has 2-APX algorithm • complete binary TL has O(4kn2)-time FPT algorithm binary TL • complete binary TL * under widely accepted conjectures Drawing (Complete) Binary Tanglegrams
2-approximation algorithm • Simple recursive approach • Try each of 4 combinations, and recurse Drawing (Complete) Binary Tanglegrams Drawing Complete Binary Tanglegrams
Initial algorithm ? • Algorithm: • Try each of the 4 combinations • Count crossings • Return the best one • Can’t count all crossings! ? Drawing (Complete) Binary Tanglegrams Drawing Complete Binary Tanglegrams
Types of crossings • Lower-level • Created by recursive calls • Nothing to do about them • Current-level • Can be avoided at this level • What about… ? Drawing (Complete) Binary Tanglegrams Drawing Complete Binary Tanglegrams
Need to remember more Problematic situation: • Sometimes we can… Good situation Drawing (Complete) Binary Tanglegrams Drawing Complete Binary Tanglegrams
Use labels • To preserve this knowledge Initial layout Drawing (Complete) Binary Tanglegrams Drawing Complete Binary Tanglegrams
Use labels • Using labels, we can count more crossings Problematic situation only if labels are equal (indeterminate crossing) Drawing (Complete) Binary Tanglegrams Drawing Complete Binary Tanglegrams
Algorithm • For each way of arranging the subtrees • Assign labels to some leaves • Solve recursively • gives # lower-level crossings • Compute # current-level crossings • Return best of 4 combinations • Running time: T(n)8T(n/2) + O(n)=O(n3) Drawing (Complete) Binary Tanglegrams Drawing Complete Binary Tanglegrams
Approximation factor • Mistakes from indeterminate crossings • We cannot count them • How many can we have? • We show that #IND copt • Therefore calg 2 copt # indeterminate crossings # crossings in optimal drawing # crossings in algorithm drawing Drawing (Complete) Binary Tanglegrams Drawing Complete Binary Tanglegrams
Approximation factor (2) • Obs: Indeterminate crossings used to be “good” • Upperbound #INDby # of these crossing • Use that trees are complete • We know exactly how many edges each subtree has Drawing (Complete) Binary Tanglegrams Drawing Complete Binary Tanglegrams
Conclusions • Studied binary TL / completebinary TL • binary TL has no constant factor apx. • completebinary TL remains NP-hard • completebinary TL has simple FPT algorithm • 2-approximation algorithm for completebinary TL • In practice, useful for non-complete trees too Drawing (Complete) Binary Tanglegrams