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.
60 CHAPTER 8. RESULTS AND DISCUSSIONfaster for <strong>trees</strong> with less than 200 leaves.A <strong>general</strong> observation based on <strong>the</strong> experiments with <strong>the</strong> three algorithms is thateven though <strong>the</strong>ir respective time complexities are only defined in terms of <strong>the</strong> inputsize n, this does not mean that <strong>the</strong> implementations are not sensitive to <strong>the</strong> structure of<strong>the</strong> input, e.g. <strong>the</strong> degree of <strong>the</strong> internal nodes.8.1 Large numbersOne thing not mentioned, but important to every <strong>quartet</strong> <strong>distance</strong> algorithm, is <strong>the</strong> needof handling large numbers. Quartet <strong>distance</strong> results can often be very large, simply because<strong>the</strong>re are such a large amount of <strong>quartet</strong>s to compare. As an example, 600 leavesresult in ( 600) 4 = 5346164850 distinct <strong>quartet</strong>s to compare, which is a number exceeding<strong>the</strong> capacity of a normal 32 bit integer. Thus, if many of those <strong>quartet</strong>s inherit a differenttopology in <strong>the</strong> two <strong>trees</strong>, <strong>the</strong>re is a risk that <strong>the</strong> result will overflow. Therefore, thisshould be taken into consideration, when implementing a <strong>quartet</strong> <strong>distance</strong> algorithm –which size of <strong>trees</strong> are to be compared and which architecture will be used.Python provides a transparent handling of large numbers, which will be enough foralgorithms like <strong>the</strong> cubic and quartic algorithms. However, when utilizing external routines,which was <strong>the</strong> case with BLAS matrix multiplication, in <strong>the</strong> sub-cubic algorithm,special care must be taken and <strong>the</strong> right data structures used.This means that pure C++ implementations, without special libraries for large numbers,are limited by <strong>the</strong> architecture but pure Python implementations are not. In anycase, external procedures may giver fur<strong>the</strong>r restrictions.