computing the quartet distance between general trees
computing the quartet distance between general trees
computing the quartet distance between general trees
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
viiiCONTENTS5.3 Implementing leaf set algorithms . . . . . . . . . . . . . . . . . . . . . . . . . 275.3.1 Subtree leaf set sizes . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275.3.2 Shared leaf set sizes . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276 Cubic time algorithm 316.1 Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 336.1.1 Result . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 347 Sub-cubic time algorithm 377.1 The algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 377.1.1 Basic preprocessing . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397.1.2 Counting shared butterflies . . . . . . . . . . . . . . . . . . . . . . . . 407.1.3 Counting different butterflies . . . . . . . . . . . . . . . . . . . . . . 427.1.4 How to count butterflies in constant time . . . . . . . . . . . . . . . 447.1.4.1 The calculation of I ′′′ . . . . . . . . . . . . . . . . . . . . . 457.2 Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 477.2.1 Prototype . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 487.2.2 Introducing a library for matrix multiplication . . . . . . . . . . . . 497.2.3 The final version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 528 Results and discussion 598.1 Large numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 609 Conclusion 639.1 Future work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64Bibliography 65A Preprocessing for <strong>the</strong> sub-cubic algorithm 69B Obtaining and running <strong>the</strong> programs 71C Real-life application of <strong>the</strong> algorithm 73