**5**6 7 8

Rate article:

- Consistency of the Neighbor-Net Algorithm

In this section we prove the consistency of Neighbor-Net:

**Theorem 4.1 **If *d*: *X *× *X *→ _{≥0 }is a circular distance function, then the output of the Neighbor-Net algorithm is a circular split weight function *ω*: Ϭ(*X*) → _{≥0 }with the property that *d *= *d*_{ω}.

The key part of the Neighbor-Net algorithm is the procedure FINDORDERING. We will show that, for a circular distance function *d *= *d*_{ω }on *X*, the call FINDORDERING({{*x*}|*x *∈ *X*}, *d*) will produce an ordering Θ of *X *that is compatible with *d*. The non-negative least squares procedure finds the distance function in {*d*_{}|: Ϭ(*X*) → _{≥0}, Ϭ_{}⊆ Ϭ_{Θ}} that is closest to *d*. As this set of distance functions includes *d*_{ω}, the least squares procedure returns exactly *d *= *d*_{ω}, proving the theorem.

We focus, then, on the proof that FINDORDERING behaves as required:

**Theorem 4.2 **Let *d*: *Y *× *Y *→ _{≥0 }be a distance function that is induced by a circular split weight function *ω*: Ϭ(*Y*) → _{≥0}. In addition, let be a collection of mutually disjoint clusters with the property that *Y *= , and assume there exists an ordering of *Y *that is compatible with *ω *and with . Then FINDORDERING(, *d*) will compute an ordering that is compatible with the collection of clusters and with the split weight function *ω*.

We present the proof of this result in the remainder of this section. Suppose that the algorithm FINDORDERING is called with input and *d *and that there exists an ordering that is compatible with and *d*. Let . We prove Theorem 4.2 by induction, first on |*Y*|, the cardinality of *Y*, and then on ||, the number of clusters in .

The *base case *of the induction is |*Y*| ≤ 3. In this case the set of splits Ϭ_{Θ }equals Ϭ(*Y*) for every ordering of *Y*. In particular, any ordering of *Y *that is compatible with is also compatible with *ω*.

We now assume that |*Y*| > 3 and make the following *induction hypothesis*:

If there exists an ordering compatible with distance function *d*' and ordered clusters , where either || Y|, or || = |*Y*| and || |, then FINDORDERING(, *d*') will return an ordering compatible with and *d*'.

There are two cases to consider. In the first case, contains some cluster *C *with |*C*| ≥ 3. In the second case, contains only clusters *C *with |*C*| ≤ 2.

4.1 Case 1: The reduction case

Suppose that there is *C *∈ with |*C*| ≥ 3. This is the *reduction case *in the description of the algorithm. The procedure FINDORDERING constructs a new set of clusters (in line 11) and a new distance function *d*' (in line 12). We first show that, if there is an ordering compatible with and *d*, then there is also an ordering compatible with and *d*'.

**Proposition 4.3 **If and *d*' are constructed according to lines 7–12 of the procedure FINDORDERING then there exists an ordering compatible with and *d*'.

*Proof*: Suppose that = *y*_{1}, ..., *y*_{n }is an ordering of *Y *that is compatible with and *d*, where, without loss of generality, we have Θ_{C }= *y*_{1}, ..., *y*_{k}. Let = *u*, *v*, *y*_{4}, ..., *y*_{n }= *z*_{1}, ..., *z*_{n-1}, which is an ordering of *Y*' = . We claim that the ordering is compatible with the collection and with the distance function *d*'.

Since is compatible with it is straight-forward to check that is compatible with . Hence, we only need to show that is compatible with *d*'. We will use a 4-point condition that was first studied in a different context by Kalmanson [15] and has been shown to characterize circular distances in [12]. To be more precise, it suffices to show that, for every four elements , *i*_{1 }i_{2 }i_{3 }i_{4},

*Case 1*: |{} ∩ {*u*, *v*}| = 0. The above inequalities follow immediately since *d *is circular, and *d *and *d*' as well as and coincide on *Y*'\{*u*, *v*}.

*Case 2*: |{} ∩ {*u*, *v*}| = 1. Consider the situation = *u*. Then

The other inequalities can be derived in a completely analogous way.

*Case 3*: |{} ∩ {*u*, *v*}| = 2. Then we have = *u *and = *v *and

The other inequality can be shown to hold in a similar way. ■

The procedure FINDORDERING calls itself recursively with and *d*' as input. An ordering of *Y*', the union of , is returned. By Proposition 4.3 and the induction hypothesis, this ordering Θ' is compatible with and *d*'. It is used to construct an ordering Θ on *Y*, in line 14, which becomes the output of the procedure.

**Proposition 4.4 **The ordering Θ is compatible with collection and with the distance function *d*.

*Proof*: Since is compatible with Θ' it is straight-forward to check that is compatible with Θ. Hence we only need to show that Θ is compatible with *d*.

Let orderings = *y*_{1}, ..., *y*_{n }of *Y *and = *z*_{1}, ..., *z*_{n-1 }of *Y*' be as in the proof of Proposition 4.3 and let *ω *be the split weight function such that *d *= *d*_{ω}. Then is compatible with all splits *S *such that *ω*(*S*) > 0. Now consider some split *S *= {*A*, *B*} such that *ω*(*S*) > 0 and assume that *y*_{n }∈ *B*. Then there exists *i*, *j *∈ {1, ..., *n *- 1}, *i *≤ *j*, such that *A *= {*y*_{i}, ..., *y*_{j}}. Note also that, since the distance function *d*' is compatible with ordering = *z*_{1}, ..., *z*_{n-1 }of *Y*' and, hence, is circular, there exists a unique circular split weight function *ω*': Ϭ(*Y*') → _{≥0 }with the property that *d*' = *d*_{ω'}. We divide the remaining argument into five cases.

*Case 1*: *j *≤ 3. Then, clearly, *S *is compatible with Θ.

*Case 2*: *j *≥ 4 and *i *= 1. Define *A*' = {*z*_{1}, ..., *z*_{j-1}} and the split *S*' = {*A*', *Y*'\*A*'} of *Y*'. Then we can express *ω*'(*S*') in terms of *d*' as follows (cf. [12]):

Thus, *ω*'(*S*') > 0. Hence, the split *S*' is compatible with the ordering Θ' of *Y*'. But then the split *S *is compatible with the ordering Θ of *Y*.

*Case 3*: *j *≥ 4 and 2 ≤ *i *≤ 3. We only consider the situation when *i *= 2; the situation *i *= 3 is completely analogous. Define *A*' = {*z*_{2}, ..., *z*_{j-1}} and the split *S*' = {*A*', *Y*'\*A*'} of *Y*'. With a similar calculation as made for Case 2 we obtain *ω*'(*S*') ≥ (*α *+ *β*)*ω*(*S*). Hence, *ω*'(*S*') > 0 and, thus, *S*' is compatible with Θ'. But then *S *is compatible with Θ.

*Case 4*: *j *≥ 4 and *i *= 4. This case is similar to Case 2. Define *A*' = {*z*_{4}, ..., *z*_{j-1}} and *S*' = {*A*', *Y*'\*A*'}. We obtain *ω*'(*S*') ≥ *ω*(*S*). Hence, as for Case 2, *ω*'(*S*') > 0 and, thus, *S *is compatible with Θ.

*Case 5*: *j *≥ *i *≥ 5. Define the split *S*' = {*A*, *Y*'\*A*}. Then we have *ω*'(*S*') = *ω*'(*S*') > 0. Hence, *S*' is compatible with Θ' and, thus, *S *is compatible with Θ. ■

4.2 Case 2: The selection case

Now suppose that there are no clusters *C *∈ with |*C*| ≥ 3. This is the *selection case *in the description of the algorithm.

In line 17 the algorithm selects two clusters that minimize (3):

where

Note that is a distance function defined on the set of clusters . We will first show that is circular. We do this in two steps: Proposition 4.5 and Proposition 4.6.

**Proposition 4.5 **Let *d*: *M *× *M *→ _{≥0 }be a circular distance function and Θ = *x*_{1}, ..., *x*_{n }be an ordering of *M *that is compatible with *d*. Let *M*' = (*M*\{*x*_{1}, *x*_{2}}) ∪ {*y*} where *y *is a new element not contained in *M*. Define a distance function *d*': *M*' × *M*' → _{≥0 }as follows:

where *λ *is a real number with the property that 0 λ

(i) *d*' is circular and compatible with ordering *y*, *x*_{3}, ..., *x*_{n }of *M*'.

(ii) If *z*_{1}, ..., *z*_{n-1 }is an ordering of *M*' that is compatible with *d*' then at least one of the orderings *x*_{1}, *x*_{2}, *z*_{2}, ..., *z*_{n-1 }or *x*_{2}, *x*_{1}, *z*_{2}, ..., *z*_{n-1 }of *M *is compatible with *d*.

*Proof*: (i) and (ii) can be proven using convexity arguments, or in a way analogous to our proof of Propositions 4.3 and 4.4, respectively. ■

**Proposition 4.6 **The distance function , defined on the individual clusters in , is a circular distance. Moreover, for every ordering *D*_{1}, ..., *D*_{k }of that is compatible with there exist orderings Θ_{i }of *D*_{i}, *i *∈ {1, ..., *k*}, such that the ordering Θ_{1}, ..., Θ_{k }of *Y *is compatible with distance function *d*.

*Proof*: We use multiple applications of Proposition 4.5, once for each cluster in with two elements, and with *λ *= in each case. ■

We now have the more difficult task of showing that clusters *C*_{1 }and *C*_{2 }selected by the *Q*-criterion, that is by minimizing (3), are adjacent in at least one ordering of the clusters that is compatible with , as described in Proposition 4.6. This is the most technical part of the proof. The key step is the inequality established in Lemma 4.7. This is used to prove Theorem 4.8, which establishes that the *Q*-criterion when applied to a circular distance will always select a pair of elements that are adjacent in at least one ordering compatible with the circular distance. As a corollary it will follow that there exists an ordering of the clusters in compatible with where *C*_{1 }and *C*_{2 }are adjacent.

**Lemma 4.7 **Let Θ = *x*_{1}, *x*_{2}, ..., *x*_{n }be an ordering of *M *that is compatible with circular distance *d *on *M *and suppose that 3 ≤ *r *≤ ⌈*n*/2⌉. Let *S *= {*A*, *M*\*A*} be a split compatible with Θ where *A *= {*x*_{i}, ..., *x*_{j}}. Define *Q*_{S}: *M *× *M *→ by

and let

(i) If min{|*A*|, |*M*\*A*|} > 1 and |*A *∩ {*x*_{1}, *x*_{r}}| = 1 then *λ*(*S*)

(ii) Any other split *S *compatible with Θ satisfies *λ*(*S*) ≤ 0.

*Proof*: Expanding *λ*(*S*) gives

We divide the rest of our argument into five cases which are summarized in Table 1. For these cases straight-forward calculations yield the entries of Table 2. Using Table 2 we compute *λ*(*S*) in each case.

*Case *(i): We obtain *λ*(*S*) = 2(*j *- 1)(*j *+ 1 - *r*) + 2(*j *- 1)(*j *+ 1 - *n*). Hence, *λ*(*S*) = 0 if *j *= 1 and *λ*(*S*) j ≥ 2.

*Case *(ii): We obtain *λ*(*S*) = 0.

*Case *(iii): We obtain *λ*(*S*) = (*j *- *i*)(4(*j *- *i*) - 2*n *+ 8). Thus, since *j *- *i *≤ *r *- 3 ≤ (*n *+ 1)/2 - 3, *λ*(*S*) = 0 if *i *= *j *and *λ*(*S*) i j.

*Case *(iv): We obtain *λ*(*S*) = 2(*i *- *r*)(*n *- 2 - (*j *- *i*)) + 2(2 - *i*)(*j *- *i*). Thus, since *j *- *i *≤ *n *- 3, *λ*(*S*) i r. If *i *= *r *then *λ*(*S*) = 0 if *j *= *r *and *λ*(*S*)

*Case *(v): We obtain *λ*(*S*) = 0. ■

**Theorem 4.8 **Let *M *be a set of *n *elements and *d*: *M *× *M *→ _{≥0 }be a circular distance function. Suppose that *x*, *y *minimize

Then there is an ordering of *M *that is compatible with *d *in which *x *and *y *are adjacent.

*Proof*: Let Θ = *x*_{1}, ..., *x*_{n }be an ordering of *M *that is compatible with *d*. Suppose that *Q*(*x*_{1}, *x*_{r}) ≤ *Q*(*x*, *y*) for all *x*, *y *where, without loss of generality, 2 ≤ *r *≤⌈*n*/2⌉. If *r *= 2 then we are done, so we assume *r *≥ 3. Let *ω *be the (circular) split weight function for which *d *= *d*_{ω}, so Θ is compatible with *ω*. Let Θ* be the ordering obtained by removing *x*_{r }from Θ and re-inserting it immediately after *x*_{1}. We claim that Θ* is also compatible with *ω*.

As in Lemma 4.7, for any split *S *compatible with Θ we define

By the choice of *x*_{1 }and *x*_{r }we have

Since *Q *is linear, and *d *= Σ_{S∈Ϭ(X)}*ω*(*S*)*d*_{S }by Lemma 4.7 we have

Now consider any split *S *compatible with Θ but not Θ*. Then *S *satisfies the conditions in Lemma 4.7 (i), giving *λ*(*S*) ω(*S*) = 0. Thus there are no splits in the support of *ω *that are not compatible with Θ*, and Θ* is compatible with *ω *and, hence, *d*. Thus *x*_{1 }and *x*_{r }are adjacent in an ordering Θ* compatible with *d*. ■

**Corollary 4.9 **Let *C*_{1 }and *C*_{2 }be the two clusters selected in line 17 of procedure FINDORDERING. Then there exists an ordering Θ* = *D*_{1}, ..., *D*_{k }of such that *D*_{1 }= *C*_{1}, *D*_{2 }= *C*_{2 }and is compatible with Θ*.

After selecting *C*_{1 }and *C*_{2 }the procedure FINDORDERING removes these clusters from the collection and replaces them with their union *C*' = *C*_{1 }∪ *C*_{2}. It also assigns an ordering Θ_{C' }to the cluster.

FINDORDERING is then called recursively. The following is directly analogous to Proposition 4.3.

**Proposition 4.10 **There exists an ordering of *Y *that is compatible with collection and split weight function *ω*.

*Proof*: We already know by Proposition 4.9 and Proposition 4.6 that there exists an ordering = *y*_{1}, ..., *y*_{n }of *Y *that is compatible with and *ω *and, in addition, also satisfies one of the following properties:

If *x*_{1 }∈ *C*_{1 }and *x*_{2 }∈ *C*_{2 }are selected such that is also compatible with then we are done. Otherwise we have to construct a suitable new ordering of *Y*. There are, up to symmetric situations with roles of *C*_{1 }and *C*_{2 }swapped, only two cases we need to consider.

*Case 1*: *C*_{1 }= {*y*_{1}, *y*_{2}}, *x*_{1 }= *y*_{1 }and *x*_{2 }= *y*_{3}. We want to show that ordering = *y*_{2}, *y*_{1}, *y*_{3}, ..., *y*_{n }is compatible with *ω*. To this end we first show that [*d*](*y*_{2}, *y*_{3}) ≤ [*d*](*y*_{1}, *y*_{3}). It suffices to establish this inequality for all split metrics *d*_{S }with *S *∈ . Define the set of splits

Ϭ' = {{{y_{2}, ..., y_{i}}, Y\{y_{2}, ..., y_{i}}}|3 ≤ i ≤ n - 1}. |

By a case analysis similar to the one applied in the proof of Lemma 4.7 we obtain the following:

• [*d*_{S}](*y*_{2}, *y*_{3}) = [*d*_{S}](*y*_{1}, *y*_{3}) if *S *∈ \Ϭ', and

• [*d*_{S}](*y*_{2}, *y*_{3}) [*d*_{S}](*y*_{1}, *y*_{3}) if *S *∈ Ϭ'.

But then, since [*d*](*y*_{1}, *y*_{3}) is minimum, [*d*](*y*_{2}, *y*_{3}) = [*d*](*y*_{1}, *y*_{3}). Thus, by the above strict inequality, for every split *S *∈ Ϭ' we must have *ω*(*S*) = 0. Hence, *ω *is compatible with .

*Case 2*: *C*_{1 }= {*y*_{1}, *y*_{2}}, *C*_{2 }= {*y*_{3}, *y*_{4}}, *x*_{1 }= *y*_{1}, *x*_{2 }= *y*_{4 }and *n *≥ 5. We want to show that = *y*_{2}, *y*_{1}, *y*_{4}, *y*_{3}, *y*_{5}, ..., *y*_{n }is compatible with *ω*. A similar argument to the one used in Case 1 shows that for every split *S *in

Ϭ' = {{{y_{2}, ..., y_{i}}, Y\{y_{2}, ..., y_{i}}}|3 ≤ i ≤ n - 1} ∪ {{{y_{4}, ..., y_{i}}, Y\{y_{2}, ..., y_{i}}}|5 ≤ i ≤ n} |

we must have *ω*(*S*) = 0. Thus, *ω *is compatible with . ■

Now, by Proposition 4.10, we can apply the induction hypothesis and conclude that the recursive call FINDORDERING(, *d*) will return an ordering Θ compatible with and *d*. Since Θ will order *C*' according to Θ_{C' }(or its reverse), we have that Θ is compatible with *C*_{1 }and *C*_{2}. Thus Θ is compatible with and *d*, completing the proof of Theorem 4.2. □

**Remark 4.11 **Note that we have shown that Corollary 4.9 holds under the assumption that (in view of line 6) every cluster in contains at most two elements. However, it is possible to prove this result in the more general setting where clusters can have arbitrary size. In principle, this could yield a consistent variation of the Neighbor-Net algorithm that is analogous to the recently introduced QNet algorithm [16], where, instead of reducing the size of clusters when they have more than two elements, the reduction case is skipped entirely and clusters are pairwise combined until only one cluster is left. However, we suspect that such a method would probably not work well in practice since the reduced distances have smaller variance than the original distances.

rating: **1.00** from **1** votes | updated on: **1 Sep 2007** | views: **8816** |