13.07.2015 Views

computing the quartet distance between general trees

computing the quartet distance between general trees

computing the quartet distance between general trees

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

56 CHAPTER 7. SUB-CUBIC TIME ALGORITHMFur<strong>the</strong>r verifications of <strong>the</strong> quality of <strong>the</strong> algorithm In order to establish completeconfidence in <strong>the</strong> quality of <strong>the</strong> algorithm two more experiments have been carried out.The first one is an extension of <strong>the</strong> experiments already done, but with <strong>the</strong> purpose ofexamining more challenging combinations of <strong>trees</strong> to compare. This is done to fur<strong>the</strong>rensure that <strong>the</strong> algorithm really is behaving well in all imaginable scenarios which mightindicate that it is in fact sub-cubic, even though we do not have <strong>the</strong> proof of <strong>the</strong> analysisto back up such a claim.The <strong>trees</strong> having a single internal node of very high degree, namely <strong>the</strong> star tree and<strong>the</strong> wc tree, were <strong>the</strong> ones showing <strong>the</strong> steepest growth because of <strong>the</strong> matrix multiplicationof larger matrices. I will combine <strong>the</strong>se with <strong>the</strong> <strong>trees</strong> having a larger number ofinternal nodes and yielding a worse actual running time to see if <strong>the</strong> combination of <strong>the</strong>two properties will result in a longer running time than <strong>the</strong> two do separately.The result is clear. These new combinations of input are not a greater challenge to<strong>the</strong> algorithm. Figure 7.12 shows that <strong>the</strong> resulting performance is no worse than whatwe have previously witnessed; <strong>the</strong> growth in running time seems close to quadratic and<strong>the</strong> actual running time is better than <strong>the</strong> worst we have seen so far.time in seconds - t(n)1000100101Performance of <strong>the</strong> C++ implementation on different combinations of <strong>trees</strong>.star-bin, best exp= 2.03star-ran, best exp= 2.05star-wc, best exp= 2.01wc-bin, best exp= 2.04wc-ran, best exp= 2.04nn 2n 30.10.0150 100 200 500 800number of leaves - nFigure 7.12: Combining <strong>the</strong> <strong>trees</strong> with high-degree inner nodes with o<strong>the</strong>r <strong>trees</strong>.The purpose of <strong>the</strong> second experiment is to ensure that <strong>the</strong> arrangement, or order,of <strong>the</strong> input is not influencing <strong>the</strong> running time. Some algorithms perform significantlybetter on certain inputs. For example, some sorting algorithms, like quick sort and bub-

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!