22.01.2015 Views

Refined Buneman Trees

Refined Buneman Trees

Refined Buneman Trees

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Algorithm 6 The algorithm that calculates the single linkage clustering tree<br />

for x<br />

Require: δ is a distance measure on X<br />

Ensure: T is root in the single linkage clustering tree for x ∈ X<br />

1: δ ′ = F ARRIST RANSF ORM(δ, x)<br />

2: Q is a quad tree overlaid δ ′<br />

3: C is a list of clusters corresponding to δ ′<br />

4: while |C| > 1 do<br />

5: (c 1 ,c 2 )=MINIMUM(Q)<br />

6: c ′ = c 1 ∪ c 2<br />

7: for c ′′ ∈ C, c ′′ ≠ c 1 ,c 2 do<br />

8: δ c ′ ′ ,c = ′′ min{δ′ c 1,c ′′,δ′ c 2,c ′′}<br />

9: end for<br />

10: C = C ∪{c ′ }\{c 1 ,c 2 }<br />

11: UPDATE(Q)<br />

12: end while<br />

13: T = C<br />

Thus, the algorithm for computing the single linkage clustering tree for x<br />

becomes the algorithm found in Algorithm 6.<br />

Analysing Algorithm 6 is straightforward: initialising δ ′ and Q takes time<br />

O(n 2 ). We iterate n times in the while loop, performing constant time search<br />

for the minimum entry in the distance matrix, linear time update of the new<br />

row/ column for C ′ with regards to the remaining clusters in the matrix, linear<br />

time removal of C 1 and C 2 , and linear time updating the quad tree data<br />

structure. All in all we have a O(n 2 ) implementation of the single linkage clustering<br />

tree algorithm. Thus, we can safely replace anchored <strong>Buneman</strong> trees<br />

with single linkage clustering trees in the main algorithm, since is has the same<br />

running time complexity. Also, we have argued that the anchored <strong>Buneman</strong><br />

tree is contained in the single linkage clustering tree. And since we are building<br />

overapproximations of the refined <strong>Buneman</strong> tree, the extra splits from the single<br />

linkage clustering tree will not affect the algorithm adversely.<br />

54

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

Saved successfully!

Ooh no, something went wrong!