-
Time Efficient Implementation for Online $k$-server Problem on Trees
Authors:
Kamil Khadiev,
Maxim Yagafarov
Abstract:
We consider online algorithms for the $k$-server problem on trees of size $n$. Chrobak and Larmore proposed a $k$-competitive algorithm for this problem that has the optimal competitive ratio. However, the existing implementations have $O\left(k^2 + k\cdot \log n\right)$ or $O\left(k(\log n)^2\right)$ time complexity for processing a query, where $n$ is the number of nodes. We propose a new time-e…
▽ More
We consider online algorithms for the $k$-server problem on trees of size $n$. Chrobak and Larmore proposed a $k$-competitive algorithm for this problem that has the optimal competitive ratio. However, the existing implementations have $O\left(k^2 + k\cdot \log n\right)$ or $O\left(k(\log n)^2\right)$ time complexity for processing a query, where $n$ is the number of nodes. We propose a new time-efficient implementation of this algorithm that has $O(n)$ time complexity for preprocessing and $O\left(k\log k\right)$ time for processing a query. The new algorithm is faster than both existing algorithms and the time complexity for query processing does not depend on the tree size.
△ Less
Submitted 22 February, 2024;
originally announced February 2024.
-
Fast Classical and Quantum Algorithms for Online $k$-server Problem on Trees
Authors:
Ruslan Kapralov,
Kamil Khadiev,
Joshua Mokut,
Yixin Shen,
Maxim Yagafarov
Abstract:
We consider online algorithms for the $k$-server problem on trees. Chrobak and Larmore proposed a $k$-competitive algorithm for this problem that has the optimal competitive ratio. However, a naive implementation of their algorithm has $O(n)$ time complexity for processing each query, where $n$ is the number of nodes in the tree. We propose a new time-efficient implementation of this algorithm tha…
▽ More
We consider online algorithms for the $k$-server problem on trees. Chrobak and Larmore proposed a $k$-competitive algorithm for this problem that has the optimal competitive ratio. However, a naive implementation of their algorithm has $O(n)$ time complexity for processing each query, where $n$ is the number of nodes in the tree. We propose a new time-efficient implementation of this algorithm that has $O(n\log n)$ time complexity for preprocessing and $O\left(k^2 + k\cdot \log n\right)$ time for processing a query. We also propose a quantum algorithm for the case where the nodes of the tree are presented using string paths. In this case, no preprocessing is needed, and the time complexity for each query is $O(k^2\sqrt{n}\log n)$. When the number of queries is $o\left(\frac{\sqrt{n}}{k^2\log n}\right)$, we obtain a quantum speed-up on the total runtime compared to our classical algorithm.
We also give a simple quantum algorithm to find the first marked element in a collection of $m$ objects, that works even in the presence of two-sided bounded errors on the input oracle. It has worst-case complexity $O(\sqrt{m})$. In the particular case of one-sided errors on the input, it has expected time complexity $O(\sqrt{x})$ where $x$ is the position of the first marked element. Compare with previous work, our algorithm can handle errors in the input oracle.
△ Less
Submitted 28 July, 2021; v1 submitted 1 August, 2020;
originally announced August 2020.
-
A Fast Algorithm for Online k-servers Problem on Trees
Authors:
Kamil Khadiev,
Maxim Yagafarov
Abstract:
We consider online algorithms for the $k$-server problem on trees. There is a $k$-competitive algorithm for this problem, and it is the best competitive ratio. M. Chrobak and L. Larmore provided it. At the same time, the existing implementation has $O(n)$ time complexity for processing a query and $O(n)$ for prepossessing, where $n$ is the number of nodes in a tree. Another implementation of the a…
▽ More
We consider online algorithms for the $k$-server problem on trees. There is a $k$-competitive algorithm for this problem, and it is the best competitive ratio. M. Chrobak and L. Larmore provided it. At the same time, the existing implementation has $O(n)$ time complexity for processing a query and $O(n)$ for prepossessing, where $n$ is the number of nodes in a tree. Another implementation of the algorithm has $O(k^2+k\log n)$ time complexity for processing a query and $O(n\log n)$ for prepossessing. We provide a new time-efficient implementation of the algorithm. It has $O(n)$ time complexity for preprocessing and $O\left(k(\log n)^2\right)$ for processing a query.
△ Less
Submitted 29 April, 2022; v1 submitted 31 May, 2020;
originally announced June 2020.