# Improving the Competitive Ratio of the Online OVSF Code Assignment Problem

^{1}

^{2}

^{*}

## Abstract

**:**

## 1. Introduction

**Our Contribution.**In this paper, we improve both upper and lower bounds on the competitive ratio of this problem, namely, we give a 7-competitive algorithm Extended-Lazy, and show that no online algorithm can be better than 2-competitive. We further show that our upper bound analysis is tight by giving a sequence of requests for which the competitive ratio of Extended-Lazy is $7-\epsilon $ for an arbitrary constant $\epsilon >0$.

**Related Results.**For the online OVSF code assignment problem, there have been some resource augmentation models, namely, online algorithms are allowed to use more bandwidth than an optimal offline algorithm: Erlebach et al. [4] developed a 4-competitive algorithm in which an online algorithm can use a double-sized OVSF code tree. Chin, Zhang, and Zhu [7] developed a 5-competitive algorithm that uses 1/8 extra bandwidth. Recently, Chan et al. [8] gave a 1-competitive online algorithm which uses $(h+1)/2$ trees and showed that there is no 1-competitive online algorithm that uses less than $(h+1)/2$ trees. They also gave a 2-competitive algorithm with $3h/8+2$ trees and an amortized $(4/3+\alpha )$-competitive algorithm with $(11/4+4/(3\alpha \left)\right)$ trees, for any α where $0<\alpha \le 4/3$.

## 2. Preliminaries

## 3. Algorithm Extended-Lazy

- AppendRich($\ell ,c$): This function is available if the level of code c is less than or equal to ℓ (namely $\ell \left(c\right)\le \ell $), and level ℓ is rich. It assigns c to the leftmost non-dead vertex at ℓ. Note that if $\ell \left(c\right)\ne \ell $, this function creates tank[$\ell \left(c\right)$, ℓ].
- AppendPoor($\ell ,c$): This function is available if $\ell \left(c\right)\le \ell $ and level ℓ is poor. It assigns code c to the leftmost non-dead vertex v at ℓ. If there is no such v, abort. Note that if $\ell \left(c\right)\ne \ell $, tank[$\ell \left(c\right)$, ℓ] is created. Then, it releases a code assigned to a vertex in the path from v to the root and returns it. (Such a code exists because ℓ was poor and v was non-dead. This code is unique because of the orthogonality.)
- FreeTail(ℓ): Release the code assigned to the rightmost assigned vertex at level ℓ, and return it.
- AppendLeft($\ell ,c$): This function is available if $\ell \left(c\right)=\ell $. Assign code c to the leftmost assignable vertex at level ℓ.

#### 3.1. Executions of Extended-Lazy for insertions

**Case (1):**The case that $\ell \left(c\right)$ does not belong to a tank and is rich. Execute AppendRich($\ell \left(c\right),c$). The execution of this case costs 1 and the number of locally rich levels increases by at most one because only $\ell \left(c\right)$ changes its status.

**Case (2):**The case that $\ell \left(c\right)$ does not belong to a tank and is poor. Furthermore, if we look at the higher levels than $\ell \left(c\right)$ in the order of $\ell \left(c\right)+1,\ell \left(c\right)+2,\dots ,h$ until we encounter a level that is rich or a bottom of a tank, we encounter a rich level (say, the level t) before a bottom of a tank. In this case, execute AppendRich($t,c$). Note that the new tank[$\ell \left(c\right),t$] is created. This case costs 1 and the number of locally rich levels increases by at most one since only level t changes its status.

**Case (3):**The same as Case (2), but when looking at higher levels, we encounter a bottom b of tank[$b,t$] before we encounter a rich level. Since this case is a little bit complicated, we give an example in Figure 5, in which $\ell \left(c\right)=0$, $b=1$, and $t=2$. First, execute FreeTail(t) and receive the code ${c}^{\prime}$ of level b (because a level-b code was assigned to level t by exploiting a tank), and then execute AppendPoor($b,{c}^{\prime}$) (note that b is poor by the condition (v) of semi-compactness)(Figure 5①). Next, receive another code ${c}^{\prime \prime}$ of level s. Note that there is an assigned vertex at t because of the condition (iv), and hence $b<s\le t$. Then, using AppendRich($t,{c}^{\prime \prime}$), assign ${c}^{\prime \prime}$ to the vertex which was tank[$b,t$], which creates the new tank[$s,t$] if $s\ne t$ (Figure 5②). Now, recall that the level b was poor, and hence ${c}^{\prime}$ was assigned to a left child. So, the level b is currently locally rich. We execute AppendRich($b,c$) (Figure 5③). Note that tank[$\ell \left(c\right),b$] is newly created. In this case, the cost incurred is 3, and the number of locally rich levels does not change.

**Case (4):**The case that $\ell \left(c\right)$ is the top of a tank and is rich. First, execute FreeTail($\ell \left(c\right)$) and receive the code ${c}^{\prime}$ from the bottom of the tank. Then, execute AppendRich($\ell \left(c\right),c$) and AppendRich($\ell \left(c\right),{c}^{\prime}$) in this order. Intuitively speaking, we shift the top of the tank to the right, and assign c to the vertex which was the tank. In this case, it costs 2 and similarly as Case (1), the number of locally rich levels increases by at most one.

**Case (5):**The case that $\ell \left(c\right)$ is the top of a tank, say tank[$b,\ell \left(c\right)$], and is poor. Execute FreeTail($\ell \left(c\right)$) and receive the code ${c}^{\prime}$ of level b from tank[$b,\ell \left(c\right)$], and execute AppendRich($\ell \left(c\right),c$) to process c. Note that $\ell \left({c}^{\prime}\right)\phantom{\rule{3.33333pt}{0ex}}(=b)$ is poor because $\ell \left({c}^{\prime}\right)$ was the bottom of tank[$b,\ell \left(c\right)$]. Also, note that b currently does not belong to a tank. Hence our current task is to process ${c}^{\prime}$ of level b where b does not belong to a tank and is poor. So, according to the statuses of levels higher than b, we execute one of Cases (2) or (3). Before going to Cases (2) or (3), the cost incurred is 1 and there is no change in the number of locally rich levels. Hence, the total cost of the whole execution of this case can be obtained by adding one to the cost incurred by the subsequently executed case (Cases (2) or (3)), and the change in the locally rich levels is the same as that of the subsequently executed case.

**Case (6):**The case that $\ell \left(c\right)$ belongs to tank[$b,t$] and is not the top of tank[$b,t$]. Execute FreeTail(t) and receive the code ${c}^{\prime}$ of level b from tank[$b,t$]. Then, execute AppendPoor($\ell \left(c\right),c$) and receive a code ${c}^{\prime \prime}$ of level s. By a similar observation as Case (3), we can see that $\ell \left(c\right)<s\le t$. Then, assign ${c}^{\prime \prime}$ to the vertex which was tank[$b,t$] using AppendRich($t,{c}^{\prime \prime}$). (Note that tank[$s,t$] is created if $s\ne t$.) Since $\ell \left(c\right)$ was poor, c was assigned to a left child. Hence $\ell \left(c\right)$ is currently locally rich. Execute AppendRich($\ell \left(c\right),{c}^{\prime}$), which creates tank[b, $\ell \left(c\right)$] if $\ell \left(c\right)\ne b$. The execution of this case costs 3, and the number of locally rich levels does not change.

**Lemma 1.**

**Lemma 2.**

**Case (1):**It is not hard to see that conditions (iii) through (v) remain satisfied because no tank is created or removed. We check that condition (ii) is satisfied for each group of levels $[0,\ell (c\left)\right)$, $\ell \left(c\right)$, and $\left(\ell \right(c),h]$.

$[0,\ell (c\left)\right)$: | Condition (ii) remains satisfied because nothing changes. |

$\ell \left(c\right)$: | Since we only append c to the leftmost non-dead vertex at $\ell \left(c\right)$, condition (ii) remains satisfied. |

$\left(\ell \right(c),h]$: | Let v be the vertex to which the code c is assigned. Note that by AppendRich($\ell \left(c\right),c$), some of ancestors of v may turn from non-dead to dead. Suppose that vertex ${v}_{s}$ of level s ($s>\ell \left(c\right)$) turned from non-dead to dead. Then, by the above observation, ${v}_{s}$ is an ancestor of v. Next, let ${v}^{\prime}$ be the vertex which is immediately left of v. Then, since ${v}^{\prime}$ was dead, ${v}_{s}$ is not an ancestor of ${v}^{\prime}$. As a result, the ancestor of ${v}^{\prime}$ at level s is the vertex, say ${v}_{s}^{\prime}$, immediately left of ${v}_{s}$, which implies that ${v}_{s}^{\prime}$ was dead. Thus, condition (ii) remains satisfied at any level. |

**Case (2):**We can see that condition (ii) is satisfied by a similar discussion as Case (1). The tank tank[$\ell \left(c\right),t$] is only the tank which is created in Case (2). Then, condition (iii) is satisfied because no level from $\ell \left(c\right)$ to t belonged to a tank. Since level $t-1$ was poor and level t was rich, level t contained at least one assinged vertex. Therefore, condition (iv) is satisfied. Also, condition (v) is satisfied because the levels from $\ell \left(c\right)$ to $t-1$ were poor.

**Case (3):**We check that the four conditions (ii) through (v) are satisfied for each group of levels $[0,\ell (c\left)\right)$, $\left[\ell \right(c),b)$, b, $(b,s)$, s, $(s,t)$, t, and $(t,h]$. ($\ell \left(c\right)$, b, t, and s are defined in the description of Case (3).)

$[0,\ell (c\left)\right)$: | All the conditions remain satisfied because nothing changes. |

$\left[\ell \right(c),b)$: | All the conditions remain satisfied by the same argument as Case (2). |

b: | We only append ${c}^{\prime}$ and c to the leftmost two non-dead vertices. Hence, condition (ii) is satisfied. Condition (iii) remains satisfied because tank[$b,t$] is removed and tank[$\ell \left(c\right),b$] is created. Condition (iv) is satisfied because ${c}^{\prime}$ is assigned to the vertex immediately right of the vertex to which c is assigned. Also, condition (v) remains satisfied because b is the top of tank[$\ell \left(c\right),b$]. |

$(b,s)$: | The tank tank[$b,t$] is removed and the statuses of some vertices may turn from non-dead to dead. Since only tank[$b,t$] is removed, conditions (iii), (iv) and (v) remain satisfied. Also, condition (ii) is satisfied by the same discussion as the case of levels $\left(\ell \right(c),h]$ of Case (1). |

s: | The vertex v to which ${c}^{\prime \prime}$ was assigned remains dead because ${c}^{\prime}$ and c are assigned to descendants of v. So, condition (ii) remains satisfied. Next, tank[$b,t$] is removed while tank[$s,t$] is created. So, conditions (iii), (iv), and (v) also remain satisfied. |

$(s,t)$: | The tank tank[$b,t$] is removed and tank[$s,t$] is created, but other things do not change. Therefore, all the conditions remain satisfied. |

t: | The tank tank[$b,t$] is changed into tank[$s,t$] if $s\ne t$. In this case, nothing changes and hence all the conditions remain satisfied. If $s=t$, tank[$b,t$] is removed and code ${c}^{\prime \prime}$ is assigned to the vertex which was tank[$b,t$]. In this case, the statuses of vertices of level t remain the same. Therefore, all the conditions also remain satisfied. |

$(t,h]$: | All the conditions remain satisfied because nothing changes. |

**Case (4):**By executing FreeTail($\ell \left(c\right)$), receiving code ${c}^{\prime}$, and executing AppendRich($\ell \left(c\right),c$), only tank[$\ell \left({c}^{\prime}\right),\ell \left(c\right)$] is removed but the statuses of all vertices remain the same. Hence, all the conditions remain satisfied. Note that at this moment, the situation is the same as the situation just before Case (2) is executed. Then, we can do the same argument as Case (2).

**Case (5):**Similar to Case (4), but this time, after executing FreeTail($\ell \left(c\right)$), receiving code ${c}^{\prime}$, and executing AppendRich($\ell \left(c\right),c$), the situation is the same as the situation before Case (2) or Case (3) is executed. So, the correctness follows from the same argument as Cases (2) and (3).

**Case (6):**Similarly as the proof of Case (3), we check conditions (ii) through (v) for each group of levels $[0,b)$, $[b,\ell (c\left)\right)$, $\ell \left(c\right)$, $\left(\ell \right(c),s)$, s, $(s,t)$, t, and $(t,h]$. To avoid lengthy description, however, we omit the proof of this case. ☐

#### 3.2. Executions of Extended-Lazy for deletions

**Case (I):**The case that $\ell \left(c\right)$ does not belong to a tank and is locally rich. Remove c. If c is the rightmost dead vertex at $\ell \left(c\right)$, do nothing. Otherwise, use FreeTail($\ell \left(c\right)$) and receive a code ${c}^{\prime}$ of level $\ell \left(c\right)$. Then, using AppendLeft($\ell \left(c\right),{c}^{\prime}$), assign ${c}^{\prime}$ to the vertex to which c was assigned. Note that the vertex v which was the rightmost dead vertex of level $\ell \left(c\right)$ becomes non-dead after the above operations, which may turn some dead vertices in the path from v to the root non-dead. As a result, an assignment may become non-semi-compact. If the semi-compactness is broken, we use the operation Repair, which will be explained later, to retrieve the semi-compactness. The cost of this case is either 1 or 0, and the number of locally rich levels decreases by one without considering the effect of Repair. (We later estimate these quantities considering the effect of Repair.)

**Case (II):**The case that $\ell \left(c\right)$ does not belong to a tank and is not locally rich. Extended-Lazy behaves in exactly the same way as Case (I). Note that vertex v which was the rightmost dead vertex at level $\ell \left(c\right)$ becomes non-dead after the above operations, but v is a right child because $\ell \left(c\right)$ was not locally rich. Since the semi-compactness was satisfied before the execution, the vertex immediately left of v was (and is) dead, which implies that the parent and hence all ancestors of v are still dead. Thus, we do not need Repair in this case. It costs either 1 or 0, and the number of locally rich levels increases by one or remains unchanged because $\ell \left(c\right)$ may become locally rich.

**Case (III):**The case that $\ell \left(c\right)$ belongs to tank[$b,t$], $\ell \left(c\right)=t$, and t is locally rich. First, remove c. Next, execute FreeTail(t) and receive the code ${c}^{\prime}$ of level b from tank[$b,t$]. If c was assigned to the vertex immediately left of tank[$b,t$] at t, do nothing. Otherwise, using FreeTail(t), receive a code ${c}^{\prime \prime}$ of level t, and using AppendLeft($t,{c}^{\prime \prime}$), assign ${c}^{\prime \prime}$ to the vertex to which c was assigned. We then find a level to which we assign the code ${c}^{\prime}$. Starting from level t, we see if the level contains at least one code, until we reach level $b+1$. Let ℓ be the first such level. Then execute AppendRich($\ell ,{c}^{\prime}$), which creates tank[$b,\ell $]. If there is no such level ℓ between t and $b+1$, execute AppendRich($b,{c}^{\prime}$). In this case, we may need Repair. Without considering the effect of Repair, it costs either 1 or 2. If it costs 1, the number of locally rich levels stays unchanged or decreases by one, and if it costs 2, the number of locally rich levels decreases by one.

**Case (IV):**The case that $\ell \left(c\right)$ belongs to tank[$b,t$], $\ell \left(c\right)=t$, and t is not locally rich. Extended-Lazy behaves in exactly the same way as Case (III). In this case, we do not need Repair by a similar observation as Case (II). It costs either 1 or 2, and the number of locally rich levels increases by one.

**Case (V):**The case that $\ell \left(c\right)$ belongs to tank[$b,t$], $\ell \left(c\right)=b$, and t is locally rich. First, remove c. If c was the code assigned to tank[$b,t$], stop here; otherwise, do the following: Execute FreeTail(t) and receive the code ${c}^{\prime}$ of level b from tank[$b,t$]. Then, using AppendLeft($b,{c}^{\prime}$), assign ${c}^{\prime}$ to the vertex to which c was assigned. In this case, we may need Repair because tank[b, t] becomes unassigned. The incurred cost is 1 or 0, and the number of locally rich levels decreases by one without considering the effect of Repair.

**Case (VI):**The case that $\ell \left(c\right)$ belongs to tank[$b,t$], $\ell \left(c\right)=b$, and t is not locally rich. Extended-Lazy behaves in exactly the same way as Case (V). In this case, we do not need Repair for the same reason as Case (II). The cost is 1 or 0, and the number of locally rich levels increases by one.

**Case (VII):**The case that $\ell \left(c\right)$ belongs to tank[$b,t$], $b<\ell \left(c\right)<t$, and t is locally rich. First, remove c. Next, execute FreeTail(t) and receive the code ${c}^{\prime}$ of level b from tank[$b,t$]. If c was assigned to the rightmost assigned vertex at $\ell \left(c\right)$, do nothing. Otherwise, using FreeTail($\ell \left(c\right)$), receive a code ${c}^{\prime \prime}$ of level $\ell \left(c\right)$, and using AppendLeft($\ell \left(c\right),{c}^{\prime \prime}$), assign ${c}^{\prime \prime}$ to the vertex to which c was assigned. We then find a level to which we assign the request ${c}^{\prime}$ in the same way as Case (III). Starting from level $\ell \left(c\right)$, we see if the level contains at least one code, until we reach level $b+1$. Let ℓ be the first such level. Then execute AppendRich($\ell ,{c}^{\prime}$), which creates tank[$b,\ell $]. If there is no such level ℓ between $\ell \left(c\right)$ and $b+1$, execute AppendRich($b,{c}^{\prime}$). In this case, we may need Repair. Without considering the effect of Repair, it costs either 1 or 2. If it costs 1, the number of locally rich levels is unchanged or decreases by one, and if it costs 2, the number of locally rich levels decreases by one.

**Case (VIII):**The case that $\ell \left(c\right)$ belongs to tank[$b,t$], $b<\ell \left(c\right)<t$, and t is not locally rich. Extended-Lazy behaves in exactly the same way as Case (VII). In this case, we do not need Repair for the same reason as Case (IV). The cost is 1 or 2. The number of locally rich levels increases by one or two when the cost is 1, and by one when the cost is 2.

**Lemma 3.**

**Case (I):**

$[0,\ell (c\left)\right)$: | Nothing changes. Thus, all the conditions remain satisfied. |

$\ell \left(c\right)$: | Only the rightmost assigned vertex turns unassigned by removing c, and applying FreeTail($\ell \left(c\right)$) and AppendLeft($\ell \left(c\right),{c}^{\prime}$). Therefore, condition (ii) remains satisfied. Since $\ell \left(c\right)$ does not belong to any tank, conditions (iii), (iv), and (v) also remain satisfied. |

$\left(\ell \right(c),h]$: | Conditions (iii) and (iv) remain satisfied because no tank is removed or created. In the following, we show that there is at most one level that breaks the conditions (ii) or (v). Since the rightmost dead vertex v at level $\ell \left(c\right)$ turns non-dead and v is the left child of its parent ${v}^{\prime}$, ${v}^{\prime}$ turns from dead to non-dead. Also, if ${v}^{\prime}$ was the rightmost dead vertex at level $\ell \left(c\right)+1$ and is the left child of its parent ${v}^{\prime \prime}$, ${v}^{\prime \prime}$ turns from dead to non-dead. Otherwise, ${v}^{\prime \prime}$ remains dead. In this way, we can apply the same argument to the upper levels. Then there is a level ${\ell}^{*}$ such that one vertex turns from dead to non-dead at each level from $\ell \left(c\right)$ to ${\ell}^{*}$, and nothing changes at levels ${\ell}^{*}+1$ or higher. Clearly, levels ${\ell}^{*}+1$ or higher do not break the conditions. Also, we can see that both conditions (ii) and (v) are satisfied at any level in $[\ell \left(c\right),{\ell}^{*})$ as follows: Consider a level $\ell \in [\ell \left(c\right),{\ell}^{*})$ and suppose that ${v}^{\prime \prime \prime}$ at level ℓ turns from dead to non-dead. Condition (ii) is satisfied at ℓ because ${v}^{\prime \prime \prime}$ was the rightmost dead vertex at ℓ. Condition (v) is also satisfied for the following reason: ${v}^{\prime \prime \prime}$ was the rightmost dead vertex at ℓ and is the left child of its parent, so ℓ was locally rich. Since condition (v) was satisfied before the application of Case (I), ℓ must not belong to a tank. So, the conditions can be broken only at ${\ell}^{*}$. Let $\tilde{v}$ be the vertex at ${\ell}^{*}$ that turns from dead to non-dead. Note that if (ii) is broken, $\tilde{v}$ was not the rightmost dead vertex, while if (v) is broken, $\tilde{v}$ was the rightmost dead vertex (since ${\ell}^{*}$ turns from poor to rich), namely, ${\ell}^{*}$ cannot break both (ii) and (v). This completes the proof. |

**Case (II):**

$[0,\ell (c\left)\right]$: | All the conditions are satisfied by the same argument as Case (I). |

$\left(\ell \right(c),h]$: | Since v is a right child and its sibling remains dead, the parent of v remains dead. So, the statuses of all vertices remain the same. Thus, all the conditions remain satisfied. |

**Case (III):**

$[0,b)$: | Nothing changes and so all the conditions remain satisfied. |

$[b,\ell )$: | The tank tank[$b,t$] is removed and tank[$b,\ell $] is created. However, nothing changes except for the tanks. Thus, all the conditions remain satisfied. |

ℓ: | If $\ell =t$, tank[$b,t$] is moved to the vertex immediately left of tank[$b,t$]. Thus, conditions (ii), (iii), and (v) remain satisfied. Also, condition (iv) remains satisfied, because there is at least one assigned vertex except for tank[$b,t$] at t. If $\ell \ne t$, ${c}^{\prime}$ is assigned to the vertex to the right of the rightmost dead vertex which is also assigned and tank[$b,\ell $] is created. Hence, conditions (ii) and (iv) remain satisfied. Also, condition (iii) remains satisfied because tank[$b,t$] is removed and tank[$b,\ell $] is created. Since ℓ is the top of tank[$b,\ell $], condition (v) also remain satisfied |

$(\ell ,t)$: | Only tank[$b,t$] is removed. Therefore, all the conditions remain satisfied. |

t: | We have already proven above the case of $\ell =t$. Otherwise, tank[$b,t$] is removed and the rightmost assigned vertex v turns unassigned. Since levels [$\ell ,t$) were poor, there was an assigned ancestor of the leftmost non-dead vertices at levels [$\ell ,t$). The assigned ancestor was v because there were no assigned vertices at levels ($\ell ,t$). Hence, v remains dead. Condition (ii) remains satisfied because only the rightmost dead vertex turns non-dead. Conditions (iii), (iv), and (v) also remain satisfied because tank[$b,t$] is removed. |

$(t,h]$: | We can use the same argument as the proof for levels ($\ell \left(c\right),h$] of Case (I). |

**Case (IV):**

$[0,t]$: | All the conditions remain satisfied by the same discussion as Case (III). |

$(t,h]$: | The parent of tank[$b,t$] remains dead because tank[$b,t$] is a right child and its sibling remains dead as we proved in the proof of Case (III). So, the statuses of all vertices remain the same. Thus, all the conditions remain satisfied. |

**Case (V):**

$[0,b)$: | Nothing changes and so all the conditions remain satisfied. |

$[b,t)$: | Only tank[$b,t$] is removed and all the conditions remain satisfied. |

t: | The tank tank[$b,t$] is removed and the rightmost dead vertex, which was tank[$b,t$], turns non-dead. Condition (ii) remains satisfied because only the rightmost dead vertex turns non-dead. Also conditions (iii), (iv), and (v) remain satisfied because tank[$b,t$] is removed. |

$(t,h]$: | We can use the same argument as the proof for level ($\ell \left(c\right),h$] of Case (I). |

**Case (VI):**

$[0,t]$: | All the conditions remain satisfied by the same discussion as Case (V). |

$(t,h]$: | Since tank[$b,t$] is a right child and its sibling remains dead, the parent of tank[$b,t$] remains dead. So, the statuses of all vertices remain the same. Thus, all the conditions remain satisfied. |

**Case (VII):**

$[0,b)$: | Nothing changes and so all the conditions remain satisfied. |

$[b,\ell (c\left)\right]$: | We can use the same argument as the proof for levels $[b,t$] of Case (III). |

$\left[\ell \right(c),t)$: | Only tank[$b,t$] is removed and all the conditions remain satisfied. |

t: | The tank tank[$b,t$] is removed and the rightmost dead vertex, which was tank[$b,t$], turns non-dead. Condition (ii) remains satisfied because only the rightmost dead vertex turns non-dead. Also conditions (iii), (iv), and (v) remain satisfied because tank[$b,t$] is removed. |

$(t,h]$: | We can do the same argument as the proof for level ($\ell \left(c\right),h$] of Case (I). |

**Case (VIII):**

$[0,t]$: | All the conditions remain satisfied by the same discussion as Case (VII). |

$(t,h]$: | The statuses of all vertices remain the same by the same discussion as Case (VI). ☐ |

## 4. Competitive Analyses of Extended-Lazy

Case | (1) | (2) | (3) | (4) | (5) | (6) | |

Cost | 1 | 1 | 3 | 2 | 2 | 4 | 3 |

Increase | $\le 1$ | $\le 1$ | 0 | $\le 1$ | $\le 1$ | 0 | 0 |

Case | (I) | (II) | (III) | (IV) | (V) | (VI) | (VII) | (VIII) | |||

Cost | $\le k+1$ | $\le 1$ | $k+1$ | $k+2$ | $\le 2$ | $\le k+1$ | $\le 1$ | $k+1$ | $k+2$ | 1 | 2 |

Increase | $\le -k+1$ | $\le 1$ | $\le -k+2$ | $\le -k+1$ | 1 | $\le -k+1$ | 1 | $\le -k+2$ | $\le -k+1$ | $\le 2$ | 1 |

**Theorem 1.**

**Theorem 2.**

## 5. A Lower Bound

**Theorem 3.**

## 6. Conclusion

## References

- Holma, H.; Toskala, A. WCDMA for UMTS; Wiley: New York, NY, USA, 2001. [Google Scholar]
- Laiho, J.; Wacker, A.; Novosad, T. Radio Network Planning and Optimisation for UMTS; Wiley: New York, NY, USA, 2002. [Google Scholar]
- Adachi, F.; Sawahashi, M.; Okawa, K. Tree-structured generation of orthogonal spreading codes with different lengths for forward link of DS-CDMA mobile radio. Electronics Letters
**1997**, 33, 27–28. [Google Scholar] [CrossRef] - Erlebach, T.; Jacob, R.; Mihaľák, M.; Nunkesser, M.; Szabó, G.; Widmayer, P. An algorithmic view on OVSF code assignment. Algorithmica
**2007**, 47, 269–298. [Google Scholar] [CrossRef] - Forišek, M.; Katreniak, B.; Katreniaková, J.; Královič, R.; Koutný, V.; Pardubská, D.; Plachetka, T.; Rovan, B. Online bandwidth allocation. Proc. of The 16th Annual European Symposium on Algorithms (ESA)
**2007**, LNCS 4698, 546–557. [Google Scholar] - Chin, F.Y.L.; Ting, H.F.; Zhang, Y. A constant-competitive algorithm for online OVSF code assignment. Proc. of The 18th International Symposium on Algorithms and Computation (ISAAC)
**2007**, LNCS 4835, 452–463. [Google Scholar] - Chin, F.Y.L.; Zhang, Y.; Zhu, H. Online OVSF code assignment with resource augmentation. Proc. of The 3rd International Conference on Algorithmic Aspects in Information and Management (AAIM)
**2007**, LNCS 4508, 191–200. [Google Scholar] - Chan, J.W.; Chin, F.Y.L.; Ting, H.F.; Zhang, Y. Online Tree Node Assignment with Resource Augmentation. Proc. of The 15th International Computing and Combinatorics Conference (COCOON)
**2009**, LNCS 5609, 358–367. [Google Scholar] - Karakoc, M.; Kavak, A. Stochastic Methods for Dynamic OVSF Code Assignment in 3G Networks. Proc. of The 4th International Symposium on Stochastic Algorithms: Foundations and Applications (SAGA)
**2007**, LNCS 4665, 142–153. [Google Scholar] - Minn, T.; Siu, K.Y. Dynamic assignment of orthogonal variable-spreading-factor codes in W-CDMA. IEEE Journal on Selected Areas in Communications
**2000**, 18, 1429–1440. [Google Scholar] [CrossRef] - Erlebach, T.; Jacob, R.; Tomamichel, M. Algorithmische Aspekte von OVSF code assignment mit Schwerpunkt auf offline code assignment. Student thesis as ETH Zürich.
- Chin, F.Y.L.; Ting, H.F.; Zhang, Y. Constant-Competitive Tree Node Assignment. manuscript.

^{*}A preliminary version of this paper was presented at the 19th International Symposium on Algorithms and Computation, ISAAC 2008. This work was supported by KAKENHI 17700015, 19200001, and 20300028.

© 2009 by the authors; licensee Molecular Diversity Preservation International, Basel, Switzerland. This article is an open-access article distributed under the terms and conditions of the Creative Commons Attribution license (http://creativecommons.org/licenses/by/3.0/).

## Share and Cite

**MDPI and ACS Style**

Miyazaki, S.; Okamoto, K.
Improving the Competitive Ratio of the Online OVSF Code Assignment Problem. *Algorithms* **2009**, *2*, 953-972.
https://doi.org/10.3390/a2030953

**AMA Style**

Miyazaki S, Okamoto K.
Improving the Competitive Ratio of the Online OVSF Code Assignment Problem. *Algorithms*. 2009; 2(3):953-972.
https://doi.org/10.3390/a2030953

**Chicago/Turabian Style**

Miyazaki, Shuichi, and Kazuya Okamoto.
2009. "Improving the Competitive Ratio of the Online OVSF Code Assignment Problem" *Algorithms* 2, no. 3: 953-972.
https://doi.org/10.3390/a2030953