• Tidak ada hasil yang ditemukan

Generality of K-Diversity Interleaving Algorithm 2.1

2.2 K-Diversity Interleaving and Maximum Interleaving

2.2.3 Generality of K-Diversity Interleaving Algorithm 2.1

DifferentK-diversity interleavings can exist for the same tree, as the following exam- ple shows.

Example 2.2 Fig. 2.2 (a), (b) and (c) show the same tree G = (V, E). In the tree, all edges have the same length, and w(v) = 1 for any vertex v V. n = 3 colors

— denoted by the numbers ‘1’, ‘2’ and ‘3’ — are used to color the tree, and three colorings are shown in (a), (b) and (c), respectively. (The number beside each vertex is the color assigned to it.) It is simple to verify that each coloring is a K-diversity interleaving for K = 3. Clearly the colorings in (a) and (b) can’t be derived from each other through permutation of colors; but the colorings in (b) and (c) can, e.g., the coloring in (c) can be got by changing the colors ‘1’, ‘2’ and ’3’ in (b) into colors

‘2’, ‘3’ and ‘1’, respectively. 2

When Algorithm 2.1 colors a tree, firstly it needs to label the W color-slots as s1, s2, · · ·, sW, and then it assigns colors to those color-slots in order. The labelling is usually not unique; and every time the algorithm assigns a color to a color-slot, the color can usually be chosen from a set of more than one color. By labelling the color- slots in different ways and by choosing the color differently while coloring a color-slot, Algorithm 2.1 can output different K-diversity interleavings. The following theorem shows that in fact, every K-diversity interleaving that exists is a possible output of Algorithm 2.1, — namely, the set of possible outputs of Algorithm 2.1 is exactly the set ofK-diversity interleavings that exist, — and that property holds even if the root of the tree is fixed. (Fixing the root of the tree lessens the number of ways to label the color-slots.)

Theorem 2.2 The set of possible outputs of Algorithm 2.1 is exactly the set of K- diversity interleavings that exist for the tree G = (V, E), even if the root of the tree is fixed.

Proof: We present a sketch of the proof here. A detailed proof for this theorem is presented in Appendix II. By Theorem 2.1, the set of possible outputs of Algorithm 2.1 is a subset of the set ofK-diversity interleavings that exist. So the only thing left to prove is that every K-diversity interleaving is a possible output of Algorithm 2.1, even if the root of the tree is fixed.

Assume the root of the tree is fixed. Assume a fixed K-diversity interleaving for the tree G = (V, E) is given. If P

v∈V w(v) K, it’s simple to see that the K-diversity interleaving must have assigned W distinct colors to the W color-slots, which is clearly a possible output of Algorithm 2.1. So from now on we only consider the case whereW> K. We’ll prove by induction that for 1≤i≤W, there is a set of i color-slots that Algorithm 2.1 can label as s1, s2,· · ·, si and assign the same colors to as the given K-diversity interleaving does.

Let γ denote the fixed root of the tree. For 1 j W, let Rmin(γ, j) denote the minimum value of r such that P

v∈N(γ,r)w(v) j. It is simple to see that there exist a set of K color-slots that are assigned distinct colors in the given K-diversity interleaving and are at distance no greater than Rmin(γ, K) from γ, and that every color-slot at distance less thanRmin(γ, K) from γ is contained in that set. Clearly it is feasible for Algorithm 2.1 to label those color-slots as s1, s2, · · ·, sK, and assign them the same colors as the given K-diversity interleaving does. So the induction is true for 1≤i≤K.

Let I be a fixed integer such that K I < W. Assume the following induction assumption is true: when i = I, there is a set C of i color-slots which Algorithm 2.1 can label as s1, s2, · · ·, si and assign the same colors to as the givenK-diversity interleaving does. We will prove that this induction assumption is also true when i=I+ 1.

Let D denote the set of all theW color-slots in the tree. Let H denote the set of color-slots in D−C at distanceRmin(γ, I+ 1) fromγ. (There are I color-slots in C.

Clearly H 6= .) Denote the color-slots in H as c1, c2, · · ·, c|H|. For 1 p ≤ |H|, definermin(p) as the smallest value ofr such that there are no less thanK color-slots inC at distance no greater than r from cp.

Randomly pick a color-slot cj1 fromH. (Here 1≤j1 ≤ |H|.) If at least one color- slot in C at distance less than rmin(j1) from cj1 is assigned the same color as cj1 in the givenK-diversity interleaving, then lettk1 ∈C denote the color-slot closest tocj1 which is assigned the same color as cj1 in the given K-diversity interleaving. Saycj1

is a color-slot of vertexu1, andtk1 is a color-slot of vertexv1. LetJ denote the set of

color-slots inS(u1, v1). The givenK-diversity interleaving assigns at least K distinct colors to the color slots in J; and J = (J ∩C)(J ∩H). Any color-slot in J ∩C is at distance less than rmin(j1) from cj1, so there exists a color-slot in J∩H which has a color different from any color-slot inJ∩C in the givenK-diversity interleaving

— and we denote that color-slot by cj2. If at least one color-slot in C at distance less than rmin(j2) from cj2 is assigned the same color as cj2 in the givenK-diversity interleaving, then some color-slot cj3 can be found through cj2 in the same way the color-slotcj2 is found throughcj1. This process can keep going on and a series of color slots cj1, cj2, cj3,cj4, · · · will be found. It can be shown that all those color-slots are distinct. Therefore this series is not infinitely long, and eventually some color-slot cjx (x≥1) will be found such that no color-slot in C at distance less than rmin(jx) from cjx is assigned the same color as cjx in the given K-diversity interleaving. Then it’s simple to see that it is feasible for Algorithm 2.1 to labelcjx as the color-slotsI+1 and assign sI+1 the same color as the given K-diversity interleaving does, after labelling the color-slots in C as s1, s2, · · ·, sI and assigning the same colors to them as the given K-diversity interleaving does. So the induction is also true when i=I+ 1.

The proof by induction is complete here. Now it’s clear that Algorithm 2.1 can assign the same colors to all the W color-slots as the arbitrarily given K-diversity interleaving does. So any K-diversity interleaving is a possible output of Algorithm 2.1, even if the root of the tree is fixed. Therefore this theorem is proved.

2