<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Fast Classical and Quantum Algorithms for Online k-server Problem on Trees ? ??</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Ruslan Kapralov</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Kamil Khadiev</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Joshua Mokut</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Yixin Shen</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Maxim Yagafarov</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Kazan Federal University</institution>
          ,
          <addr-line>Kazan</addr-line>
          ,
          <country country="RU">Russia</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Universite de Paris</institution>
          ,
          <addr-line>CNRS, IRIF, F-75006 Paris</addr-line>
          ,
          <country country="FR">France</country>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>Zavoisky Physical-Technical Institute, FRC Kazan Scienti c Center of RAS</institution>
          ,
          <addr-line>Kazan</addr-line>
          ,
          <country country="RU">Russia</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>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 time complexity O(n) to process each request, where n is the number of nodes. We propose a new time-e cient implementation of this algorithm that has O(n log n) time complexity for preprocessing and O k2 + k log n time for processing a request. 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 request is O(k2pn log n). When the number of requests is o on the total runtime compared to our classical algorithm.</p>
      </abstract>
      <kwd-group>
        <kwd>online algorithms</kwd>
        <kwd>k-server problem on trees</kwd>
        <kwd>quantum computing</kwd>
        <kwd>binary search</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>
        Online optimization is a eld of optimization theory that deals with optimization
problems having no knowledge of the future [
        <xref ref-type="bibr" rid="ref27">27</xref>
        ]. An online algorithm reads an
input piece by piece and returns an answer piece by piece immediately, even if the
answer can depend on future pieces of the input. The goal is to return an answer
that minimizes an objective function (the cost of the output). The most standard
method to de ne the e ectiveness of an online algorithm is the competitive
ratio [
        <xref ref-type="bibr" rid="ref20">20</xref>
        ]. The competitive ratio is the approximation ratio achieved by the
algorithm. That is the worst-case ratio between the cost of the solution found
by the algorithm and the cost of an optimal solution. If the ratio is c, then the
online algorithm is called c-competitive. In the general setting, online algorithms
have unlimited computational power. Nevertheless, many papers consider them
with di erent restrictions. Some of them are restrictions on memory [
        <xref ref-type="bibr" rid="ref18 ref2 ref21 ref22 ref23 ref24 ref25 ref26 ref5 ref6 ref9">6, 9, 24, 2,
5, 18, 23, 21, 26, 25, 22</xref>
        ], others are restrictions on time complexity [
        <xref ref-type="bibr" rid="ref15 ref31">15, 31</xref>
        ].
      </p>
      <p>
        In this paper, we focus on e cient online algorithms in terms of time
complexity. We consider the k-server problem on trees. Chrobak and Larmore [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ]
proposed a k-competitive algorithm for this problem where the competitive ratio
k is the best possible for deterministic algorithms for this problem. The existing
implementation of their algorithm has O(n) time complexity for each request,
where n is the number of nodes in the tree. For general graphs, there exists a
time-e cient algorithm for the k-server problem [
        <xref ref-type="bibr" rid="ref31">31</xref>
        ] that uses
min-cost-maxow algorithms. However, in the special case of a tree, this algorithm is not
optimal. We propose a new time-e cient implementation of the algorithm from
[
        <xref ref-type="bibr" rid="ref11">11</xref>
        ]. It has O (n log n) time complexity for preprocessing and O k2 + k log n
for processing a request. It is based on fast algorithms for computing Lowest
Common Ancestor (LCA) [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] and the binary lifting technique [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ].
      </p>
      <p>
        We also revisit the problem of nding the rst marked element in a collection
of m objects. It is well-known that it can be solved in expected O(pm) queries
when given quantum oracle access to the input, and expected O(px) queires
where x is the position of the rst marked element [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ],[29, Theorem 10] and
[28, Theorem 6]. We give a O(pm) queries algorithm that works even in the
presence of two-sided bounded errors in the input. We also provide an expected
O(px) queries algorithm in the case where the input has one-sided errors only.
Note that contrary to the previous results, we assume that the oracle can have
errors whereas [
        <xref ref-type="bibr" rid="ref13 ref28 ref29">13, 29, 28</xref>
        ] assume that the oracle is perfect.
      </p>
      <p>We then consider the k-server problem in the case where the description of
the tree is given by string paths. The string path of a node in a rooted tree
is a sequence of length h, where h is the height of the node, describing the
path from the root to the node. Such a way of representing the trees is useful,
for example, as a path to a le in le systems. Assuming oracle access to the
length of the string path of each node and to each element on the string path
with time complexity O(1), we obtain a quantum algorithm for this problem with
O(k2pn log(n)) running time to process each request and without preprocessing.
This algorithm is based on our improved quantum search algorithm. When the
number of requests is o</p>
      <p>pk2n , the total runtime of our quantum algorithm is
smaller than the classical one.</p>
      <p>The structure of the paper is the following. Section 2 contains preliminaries.
The classical algorithm is described in Section 3. Section 4 contains our improved
quantum search algorithm. The quantum algorithm for the k-server problem is
described in Section 5.
2
2.1</p>
    </sec>
    <sec id="sec-2">
      <title>Preliminaries</title>
      <sec id="sec-2-1">
        <title>Online algorithms</title>
        <p>An online minimization problem consists of a set I of inputs and a cost
function. Each input I = (x1; : : : ; xn) is a sequence of requests, where n is the length
of the input jIj = n. Furthermore, a set of feasible outputs (or solutions) Oe(I)
is associated with each I; an output is a sequence of answers O = (y1; : : : ; yn).
The cost function assigns a positive real value cost(I; O) to I 2 I and O 2 Oe(I).
An optimal solution for I 2 I is Oopt(I) = arg minO2Oe(I) cost(I; O).</p>
        <p>Let us de ne an online algorithm for this problem. A deterministic online
algorithm A computes the output sequence A(I) = (y1; : : : ; yn) such that yi is
computed based on x1; : : : ; xi. We say that A is c-competitive if there exists a
constant 0 such that, for every n and for any input I of size n, we have:
cost(I; A(I)) c cost(I; OOpt(I)) + . The minimal c that satis es the previous
condition is called the competitive ratio of A.
2.2</p>
      </sec>
      <sec id="sec-2-2">
        <title>Rooted Trees</title>
        <p>Consider a rooted tree G = (V; E), where V is the set of nodes/vertices, and
E is the set of edges. Let n = jV j be the number of nodes, or equivalently the
size of the tree. We denote by 1 the root of the tree. A path P is a sequence
of nodes (v1; : : : ; vh) that are connected by edges, i.e. (vi; vi+1) 2 E for all
i 2 f1; : : : ; h 1g, such that there are no duplicates among v1; : : : ; vh. Here h
is a length of the path. Between any two nodes v and u on the tree, there is a
unique path. The distance dist(v; u) is the length of this path. For each node v
we can de ne a parent node Parent(v) which is the rst node on the unique
path from v to root 1. We have dist (1; Parent(v))+1 = dist(1; v). Additionally,
we can de ne the set of children Children(v) = fu : Parent(u) = vg. Any
node y on the unique path from root 1 to node v is an ancestor of node v.</p>
      </sec>
      <sec id="sec-2-3">
        <title>Lowest Common Ancestor (LCA). Given two nodes u and v of a rooted</title>
        <p>tree, the Lowest Common Ancestor is the node w such that w is an ancestor of
both u and v, and w is the closest one to u and v among all such ancestors. The
following result is well-known.</p>
        <p>
          Lemma 1 ([
          <xref ref-type="bibr" rid="ref7">7</xref>
          ]). There is an algorithm for the LCA problem with the following
properties: (i) The time complexity of the preprocessing step is O(n); (ii)The
time complexity of computing LCA for two vertices is O(1).
        </p>
        <p>We call LCA Preprocessing() the subroutine that does the preprocessing
for the algorithm and LCA(u; v) that computes the LCA of two nodes u and v.</p>
        <p>
          Binary Lifting Technique. This technique from [
          <xref ref-type="bibr" rid="ref8">8</xref>
          ] allows us to obtain a
vertex v0 that is at distance z from a vertex v with O(log n) time complexity.
There are two procedures:
        </p>
        <p>BL Preprocessing() prepares the required data structures. The time
complexity is O(n log n).</p>
        <p>MoveUp(v; z) returns a vertex v0 on the path from v to the root and at
distance dist(v0; v) = z. The time complexity is O(log n).</p>
        <p>
          The technique is well documented in the literature. We present an
implementation in the arxiv version [
          <xref ref-type="bibr" rid="ref19">19</xref>
          ] for completeness.
2.3
        </p>
        <p>k-server Problem on Trees
Let G = (V; E) be a rooted tree, and we are given k servers that can move among
nodes of G. At each time slot, a request q 2 V appears. We have to \serve" this
request, that is, to choose one of the k servers and move it to q. The other servers
are also allowed to move. The cost function is the distance by which we move
the servers. In other words, if before the request, the servers are at positions
v1; : : : ; vk and after the request they are at v10; : : : ; vk0, then q 2 fv10; : : : ; vk0g and
the cost of the move is Pk</p>
        <p>i=1 dist(vi; vi0). The cost of a sequence of requests is the
sum of the costs of serving each requests. The problem is to design a strategy
that minimizes the cost of servicing a sequence of requests given online.
2.4</p>
      </sec>
      <sec id="sec-2-4">
        <title>Quantum query model</title>
        <p>
          We use the standard form of the quantum query model. Let f : D ! f0; 1g; D
f0; 1gm be an m variable function. We wish to compute on an input x 2 D.
We are given an oracle access to the input x, i.e. it is realized by a speci c
unitary transformation usually de ned as jii jzi jwi ! jii jz + xi (mod 2)i jwi
where the jii register indicates the index of the variable we are querying, jzi is the
output register, and jwi is some auxiliary work-space. An algorithm in the query
model consists of alternating applications of arbitrary unitaries independent of
the input and the query unitary, and a measurement in the end. The smallest
number of queries for an algorithm that outputs f (x) with probability 32 on
all x is called the quantum query complexity of the function f and is denoted by
Q(f ). We refer the readers to [
          <xref ref-type="bibr" rid="ref1 ref3 ref30">30, 3, 1</xref>
          ] for more details on quantum computing.
De nition 1 (Search problem). Suppose we have a set of objects named
f1; 2; : : : ; mg, of which some are targets. Suppose O is an oracle that
identies the targets. The goal of a search problem is to nd a target i 2 f1; 2; : : : ; mg
by making queries to the oracle O.
        </p>
        <p>
          In search problems, one will try to minimize the number of queries to the
oracle. In the classical setting, one needs O(m) queries to solve such a problem.
Grover, on the other hand, constructed a quantum algorithm that solves the
search problem with only O(pm) queries [
          <xref ref-type="bibr" rid="ref16">16</xref>
          ], provided that there is a unique
target. When the number of targets is unknown, Brassard et al. designed a
modied Grover algorithm that solves the search problem with O(pm= ) queries [
          <xref ref-type="bibr" rid="ref10">10</xref>
          ],
where is the number of targets, which is of the same order as the query
complexity of the Grover search.
3
        </p>
        <p>
          A Fast Online Algorithm for k-server Problem on Trees
with Preprocessing
We rst describe Chrobak-Larmore's k-competitive algorithm for k-server
problem on trees from [
          <xref ref-type="bibr" rid="ref11">11</xref>
          ]. Assume that we have a request on a vertex q, and the
servers are on the vertices v1; : : : ; vk. We say that a server i is active if there are
no other servers on the path from vi to q. In each phase, we move every active
server one step towards the vertex q. After each phase, the set of active servers
can change. We repeat this phase (moving of the active servers) until one of the
servers reaches the queried vertex q.
        </p>
        <p>
          The naive implementation of this algorithm has time complexity O(n) for
each request. First, we run a depth- rst search with time labels [
          <xref ref-type="bibr" rid="ref12">12</xref>
          ], whose
result allows us to check in constant time whether a vertex u is an ancestor of
a vertex v. Recall that time labels record the rst timestamp f (v) when the
depth- rst search enters a node v, and the last timestamp `(v) when the
depthrst search nishes processing the last child of node v; the timestamp increases
every time a new node is visited. A node u is then an ancestor of v if and only
if the interval [f (v); `(v)] is contained in [f (u); `(u)]. After that, we can move
each active server towards the queried vertex, step by step. Together all active
servers cannot visit more than O(n) vertices.
        </p>
        <p>In the following, we present an e ective implementation of Chrobak-Larmore's
algorithm with preprocessing. The preprocessing part is done once and has
O(n log n) time complexity (Theorem 1). The request processing part is done
for each request and has O k2 + k log n time complexity (Theorem 2).
3.1</p>
      </sec>
      <sec id="sec-2-5">
        <title>Preprocessing</title>
        <p>
          We do the following steps for the preprocessing :
1. We do required preprocessing for LCA algorithm (Section 2.2)
2. We do required preprocessing for Binary lifting technique (Section 2.2)
3. Additionally, for each vertex v we compute the distance from the root to v,
i.e. dist(1; v). This can be done using a depth- rst search algorithm [
          <xref ref-type="bibr" rid="ref12">12</xref>
          ]. We store
all the distances in an array. See the arxiv version [
          <xref ref-type="bibr" rid="ref19">19</xref>
          ] for an implementation of
ComputeDistance(u).
        </p>
        <p>Theorem 1. The preprocessing has time complexity O(n log n).</p>
        <p>Proof. The time complexity of the preprocessing phase is O(n) for LCA, O(n log n)
for the binary lifting technique and O(n) for ComputeDistance(1). Therefore,
the total time complexity is O(n log n).
Algorithm 1 Preprocessing. The preprocessing procedure.</p>
        <p>LCA Preprocessing()
BL Preprocessing()
dist(1; 1) 0</p>
        <p>ComputeDistance(1)
3.2</p>
      </sec>
      <sec id="sec-2-6">
        <title>Request Processing</title>
        <p>Assume that we have a request on a vertex q, and the servers are on the vertices
v1; : : : ; vk. We do the following steps, implemented in Algorithms 2 and 4.
Step 1. We sort all the servers by their distance to the node q. The distance
dist(v; q) between a node v and the node q can be computed in the following way.
Let l = LCA(v; q) be the lowest common ancestor of v and q, then dist(v; q) =
dist(1; q) + dist(1; v) 2 dist(1; l). Using the prepocessing, this quantity can
be computed in constant time. We denote by Sort(q; v1; : : : ; vk) this sorting
procedure. In the following steps we assume that dist(vi; q) dist(vi+1; q) for
i 2 f1; : : : ; k 1g.</p>
        <p>Step 2. The rst server on v1 processes the request. We move it to the node q.
Step 3. For i 2 f2; : : : kg we consider the server on vi. It will be inactive when
some other server with a smaller index arrives on the path between vi and q.
Section 3.3 contains the di erent cases that can happen and how to compute
the distance d traveled by vi before it becomes inactive. We then move the i-th
server d steps towards the request q. The new position of the i-th server is vi0.
Algorithm 2 Request(q). Request processing procedure.
minj&lt;i diq;j.</p>
        <p>When processing a request, all servers except one will eventually become inactive.
The crucial part of the optimization is to compute when a server becomes inactive
quickly. For the purpose of computing this time, we claim that we can pretend
that servers \never go inactive". Formally, let q be a request, i be a server, and j
another server with smaller index. We know that i will become inactive because
it is not the closest to the target. However it is possible that this particular
server j is not the one that will render i inactive. Nevertheless, we can pretend
that j will never become inactive and compute the distance i will travel before
going inactive because of j, call this distance diq;j (the index i is xed in this
reasoning). We claim the following:
Lemma 2. For any request q and server i &gt; 1 ( i.e. a server that will become
inactive), the distance Diq travelled by i before it becomes inactive is equal to</p>
      </sec>
      <sec id="sec-2-7">
        <title>Distance to Inactive State</title>
        <p>. see Algorithm 3
. see Algorithm 4
Proof. Let j0 be one of the servers that renders i inactive, then Diq = diq;j0
because j0 will not become inactive before it makes i inactive, hence for the
purpose of computing Di, it makes no di erence whether j0 eventually becomes
q
inactive or not. Therefore, we only need to prove no other di;j is strictly smaller.
Assume for contradiction that diq;j &lt; Diq for some j &lt; i, and pick j so that diq;j is
minimum among all j &lt; i (and in case of equality, pick j the smallest possible).
q
Then, it means there exists a vertex t such that di;j = dist(vj ; t) 6 dist(vi; t)
and t is on the paths from vi and vj to q. Now we claim that j must become
inactive before it reaches t. Indeed, if not, it would reach t and makes i inactive
q q q
after a distance di;j &lt; D , which is impossible by de nition of D . Therefore, j is
i i
rendered inactive before reaching t by another server ` reaching some vertex u on
the path from vj to t. In particular, we must have Djq = dist(v`; u) 6 dist(vj ; u)
and dist(vj ; u) &lt; dist(vj ; t). But now observe that if we pretend that ` never
goes inactive, it will reach t after travelling a distance dist(v`; u) + dist(u; t) 6
dist(vj ; u) + dist(u; t) = dist(vj ; t) hence di;` = dist(v`; t) 6 dist(vj ; t) = diq;j . But
q
q q q
we chose j so that di;j is minimal so we must have di;` = di;j and therefore, j &lt; `
(we sort by index in case of tie). Going back to the computation, we see that
q q
di;` = di;j implies that dist(vi; u) = dist(v`; u), i.e. i and ` reach u at the same
time. But when two servers reach the same vertex simultaneously, the greater
index goes inactive, i.e. ` would go inactive because of j. This is a contradiction
because we assumed that ` is the one making j inactive.</p>
        <p>We have now reduced the problem to the following question: given a server
i and another server j with smaller index, compute diq;j , the distance until i
becomes inactive because of j, pretending that j never goes inactive. There are
several cases to consider, depicted in Figure 1, depending on the relationship of
vi, vj and q in the tree. Let t be the vertex where the paths from vi to q and vj
q
to q intersect the rst time, then di;j = dist(vj ; t) and
1. if q is an ancestor of vi and vj , then t = LCA(vi; vj );
2. if q is an ancestor of vi but not of vj , then t = q;
3. if vi is an ancestor of q, then t = LCA(q; vj ) because vi must also be ancestor
of vj since vj is closer to q than vi;
4. if the LCA of vj and q is not an ancestor of vi, then t = LCA(vj ; q);
5. if the LCA of vi and vj is not an ancestor of q, then t = LCA(vj ; vi);
6. otherwise t = LCA(vi; q).</p>
        <p>Note that in this case distinction, the order of the cases is important: if cases
1 to 3 do not apply for example, then we know that vi is not an ancestor of q
and q is not an ancestor of vi.</p>
        <p>Lemma 3. DistanceToInactive has time complexity O (k).</p>
        <p>Proof. Since a vertex u is ancestor of v if LCA(u; v) = u, we can check this
condition in O(1) due to results from Section 2.2. It follows that we can compute
q
di;j for every i; j; q in O(1) and there are at most k other servers to consider.
Algorithm 3 DistanceToInactive(q; i). Compute the distance travelled
before going inactive.</p>
        <p>d 1
for j 2 f1; : : : ; i 1g do
t do case analysis as above
d min(d; dist(t; vj))
return d
vi
vi
vj
case 4
t
t
case 1
q
vj
q
vi
vi
q
t
case 2
vj
vj
q
q
vi
t
t
case 3
case 5
case 6
vi
vj
q
vj
We now consider the following problem: given a server v and a distance z, how to
e ciently compute the new position of the server after moving it z steps towards
q. We use the binary lifting technique for this procedure.</p>
        <p>Let l = LCA(v; q). If dist(l; v) z, then the result node is on the path
between v and l. We can thus invoke MoveUp(v; z) from Section 2.2. Otherwise,
we should move the server rst to l. We then move it z dist(l; v) steps down
towards q from l. Moving down from l is the same as moving up dist(l; q) (z
dist(l; v)) steps from q. The algorithm is presented in Algorithm 4.
Algorithm 4 Move(v; z). Moves of a server from v to distance z on a path
from v to q.</p>
        <p>l = LCA(v; q)
if z dist(l; v) then</p>
        <p>Result MoveUp(v; z)
if z &gt; dist(l; v) then
z z dist(l; v)</p>
        <p>Result MoveUp(q; dist(l; q)
return Result
z)
Lemma 4. The time complexity of Move is O (log n).</p>
        <p>Proof. The time complexity of MoveUp is O(log n) using the binary lifting
technique from Section 2.2 and LCA is in O(1) by Section 2.2. Furthermore,
we can compute the distance between any two nodes in O(1) thanks to the
preprocessing. Therefore, the total complexity is O(log n).</p>
        <p>Theorem 2. The time complexity of the request processing phase is O k2 + k log n .
Proof. The complexity of sorting the servers by distance is O(k log k). For each
server, we compute the distance traveled before being inactive in O(1) by Lemma 3.
We then move each server by that distance in time O(log n) by Lemma 4.
Therefore, the complexity of processing one server is O(k + log n), and there are k
servers.
4</p>
        <p>Binary Search for a Function with Errors
Consider a search space S = f1; : : : ; mg and a subset M S of marked elements.
De ne the indicator function gM : S2 ! f0; 1g by gM (`; r) = 1 if f`; : : : ; rg \
M 6= ?; and 0 otherwise: In other words, gM (`; r) indicates whether there is a
marked element from M in the interval [`; r]. Now assume that we do not know
M but have access to a two-sided probabilistic approximation g~ of gM . Formally,
there is a probability p &lt; 1=2 such that for any `; r 2 S, g~(`; r) = gM (`; r) with
probability at least 1 p and 1 gM (`; r) otherwise. Intuitively, g~ behaves like
gM with probability at least 1 p. However, sometimes it makes mistakes and
returns a completely wrong answer. Note that g~ has two-sided error: it can return
0 even if the interval [`; r] contains a marked element, but more importantly, it
can also return 1 even though the interval does not contain any marked element.
We further assume that a call to g~(`; r) takes time T (r `) where T is some
nondecreasing function. Typically, we assume that T (m) = o(m), i.e. T is strictly
better than a linear search.</p>
        <p>We now consider the problem of nding the rst marked element in S, with
probability at least, say, 1=2. A trivial algorithm is to perform a linear search
in O(m) until g~ returns 1. If g~ had no errors, we could perform a binary search
in O(T (m)). This does not work very well in the presence of errors because
decisions made are irreversible, and errors accumulate quickly. Our observation
is that if we modify the binary search to boost the success probability of certain
calls to g~, we can still solve the problem in time in O (T (m)).
4.1</p>
      </sec>
      <sec id="sec-2-8">
        <title>Algorithm</title>
        <p>
          The idea is inspired by [
          <xref ref-type="bibr" rid="ref4">4</xref>
          ] and very similar to [
          <xref ref-type="bibr" rid="ref14">14</xref>
          ] except that the calls to g~ (the
\comparisons") do not necessarily have unit cost. The di erence with [
          <xref ref-type="bibr" rid="ref14">14</xref>
          ] is
apparent in the complexity since we can avoid the extra log factor when the cost
of each comparison becomes high enough. For reasons that become clear in the
proof, we need to boost some calls' success probability. We do so by repeating
        </p>
        <p>. search interval
. depth of the search
. repeat d times and take the majority
d</p>
        <p>mid
d + 1
Algorithm 5 Binary search for a function with two-sided errors
` 1; r m + 1
d 1
while ` &lt; r do
mid b(` + r)=2c
vl g~(`; mid)
if vl = 0 then</p>
        <p>` mid + 1
else</p>
        <p>r
them several times and taking the majority: by this we mean that we take the
most common answer, and return an error in the case of a tie.</p>
        <p>Proposition 1. Assume that T satis es T (m=k) = O(T (m)=k ) for some &gt;
0 and every m and k, then with probability more than 0:5, Algorithm 5 returns
the position of the rst marked element, or m + 1 if none exists. The running
time is O(T (m)).</p>
        <p>Proof. The correctness of the algorithm, when there are no errors, is clear. We
need to argue about the complexity and error probability.</p>
        <p>At the uth iteration of the loop, the algorithm considers a segment [`; r] of
length at most m 2 (u 1). The complexity of g~(`; mid) is at most O(T (r `)) =
O T (m 2 (u 1)) but we repeat it 2u times, so the total complexity of the uth
iteration is O uT m 2 (u 1) . The number of iterations is at most log2 m.
Hence, the total complexity is
uuA = O</p>
        <p>1
T (m) X 2
u=1
uu</p>
        <p>!
2
(2</p>
        <p>1)2
= O</p>
        <p>T (m)
= O (T (m)) :</p>
        <p>Finally, we need to analyze the success probability of the algorithm: at the
uth iteration, the algorithm will run each test 2u times and each test has a
constant probability of failure p. Hence for the algorithm to fail at iteration u,
at least half of the 2u runs must fail: this happens with probability at most
2uu pu 6 2uue u pu 6 (2ep)u; where e = exp(1). Hence, the probability that the
log2 m
algorithm fails is bounded by P (2ep)u 6 Pu1=1(2ep)u 6 1 2e2pep . By taking p
u=1
small enough (say 2ep &lt; 31 ), which is always possible by repeating the calls to
g~ a constant number of times to boost the probability, we can ensure that the
algorithm fails less than half of the time.</p>
        <p>Remark 1. The condition T (m=k) = O(T (m)=k ) for some &gt; 0 and every m
and k is clearly satis ed by any function of the form T (m) = m log m log log m.
4.2</p>
      </sec>
      <sec id="sec-2-9">
        <title>Application to Quantum Search</title>
        <p>A particularly useful application of the previous section is for quantum search,
particularly when g~ is a Grover-like search. Indeed, Grover's search can decide in
O(pm) queries if a marked element exists in an array of size m, with a constant
probability of error.</p>
        <p>More precisely, assume that we have a function f : f1; : : : mg ! f0; 1g and
the task is to nd the minimal x 2 f1; : : : ; mg such that f (x) = 1. If we let
g~(`; r) = GROVER(`; r; f ) then g~ has query complexity T (m) = pm and fails
with constant probability. Hence, we can apply Proposition 1 and obtain an
algorithm to nd the rst marked element with query complexity T (m) = O(pm)
and constant probability of error. In fact, note that we are not making use of
Proposition 1 to its full strength because g~ really has one-sided error: it will never
return 1 if there are no marked element. We will make use of this observation
later.</p>
        <p>Proposition 2. There is a quantum algorithm that nds the rst marked
element in an array of size m in O(pm) queries and error probability &lt; 0:5.</p>
        <p>
          As observed above, we are not really using Proposition 1 to its full strength
because Grover's search has one-sided error. This suggests that there is room for
improvement. Suppose that we now only have access to a two-sided probabilistic
approximation f~ of f . In other words, f can now make mistakes: it can return 1
for an unmarked element or 0 for a marked element with some small probability.
Formally, f~(x) = f (x) with probability at least 1 p and 1 f (x) otherwise,
for some probability p &lt; 1=2. We cannot apply Grover's search directly in this
case, but some variants have been developed that can handle bounded errors [
          <xref ref-type="bibr" rid="ref17">17</xref>
          ].
Using this result, we can build a two-sided error function g~ with high probability
of success and time complexity O(pm). Applying Proposition 1 again, we obtain
the following improvement:
Proposition 3. There exists a quantum algorithm FindFirst that nds the
rst marked element in an array of size m in O(pm) queries and error
probability less than 0:5; even when the oracle access to the array has a two-sided
error.
        </p>
        <p>In quantum computing, f rarely has two-sided errors. For instance, Grover's
search has a one-sided error only. If we assume that f~ has one-sided error only,
we can obtain a slightly better version of Proposition 3. Formally, we assume
that f~(x) = f (x) with probability at least 1 p and 0 otherwise.</p>
        <p>
          Proposition 4. There exists a quantum algorithm that nds the rst marked
element in an array of size m in expected O(px) queries and with error
probability less than 0:5, where x is the position of the rst marked element, or O(pm)
queries if none is marked. Furthermore, it works even when the oracle access to
the array has one-sided error. Additionally, it has a worst-case query complexity
of O(pm) in all cases.
Proof. Let FindFirst denote the algorithm from Proposition 3 and GroverTwoSided
denote the variant of Grover's algorithm of [
          <xref ref-type="bibr" rid="ref17">17</xref>
          ] that works with two-sided error
oracles. Recall that we assume that f~ has one-sided error, i.e. it may return 0
instead of 1 with small probability but not the other way around. Consider the
following algorithm:
Algorithm 6 FindFirstAdvanced(m; f ). Find the rst marked element in an
array.
        </p>
        <p>r 1 . size of the search space
while r n and GroverTwoSided(1; r; f~) = 0 do</p>
        <p>r min(m; 2r)
return FindFirst(r; f~)</p>
        <p>We now show that this algorithm satis es the requirements of Proposition 4.
To simplify the proof, we assume that the array always contains a marked
element; this is without loss of generality because we can add an extra object at
the end that is always marked. Furthermore, we assume that n is a power 2, this
is again without loss of generality because we can add dummy object at the end
at the cost of doubling the array size at most.</p>
        <p>Recall that f~ has a one-sided error, and the same applies to GroverTwoSided
in this case. Therefore the test GroverTwoSided(1; r; f~) = 0 can only fail if
there actually is a marked element in the interval [1; r]. Of course, the problem
is that it can succeed even though there is a marked element in this interval. Let
p be the probability that this happens (i.e. GroverTwoSided fails), we know
that this is &lt; 1=2 by [17, Theorem 10]. Let x be the position of the rst marked
element and let `x be such that 2`x 6 x &lt; 2`x+1. Let R be the value of r after the
loop, it is a random variable and always a power of 2. By the above reasoning,
it is always the case that R &gt; x. Furthermore, for any `x 6 ` &lt; log2 n, the
probability that R = 2` is at most p` `x (1 p). The call to FindFirst takes time
O(pR) by Proposition 3. Hence, the expected time complexity of this algorithm
is</p>
        <p>O
log n
X p` `x (1
`=`x
p)p2`
!
= O
= O
= O px</p>
        <p>1
p2`x X p`p2`</p>
        <p>!
p2`x
`=0
1
1
p2p
where we assume that p is small enough. This is always possible by repeating the
calls to FindFirst a constant number of times to reduce the failure probability
p. Finally, we note that the only way this algorithm can fail is if the (unique)
call to FindFirst fails and this only happen with constant probability.</p>
        <p>A Fast Quantum Implementation of Online Algorithm
for k-server Problem on Trees
We consider a special way of storing a rooted tree. Assume that for each vertex
v we have access to a sequence av = (a1v; : : : ; avd) for d = dist(1; v) + 1. Here
av is a path from the root (the vertex 1) to the vertex v, a1v = 1; avd = v.
Such a way of describing a tree is not uncommon, for example when the tree
represents a le system. A le path \c:nUsersnMyUsernnewdoc.txt" is exactly
such a path in the le system tree. Here \c", \Users", \MyUser" are ancestors
of \newdoc.txt", \c" is the root and \newdoc.txt" is the node itself.</p>
        <p>We assume that we have access to the following two oracles in time O(1): (i)
given a vertex u, a (classical) oracle that returns the length of the string path
au; (ii) given a vertex u and an index i, a quantum oracle that returns the ith
vertex aiu of the sequence au.</p>
        <p>We can solve the k-server problem on trees using the same algorithm as in
Section 3 with the following modi cations: (i) The function LCA(u; v) becomes
LCP(au; av) where LCP(au; av) is a longest common pre x of two sequences au
and av. (ii) MoveUp(v; z) is the vertex avd z where av is the sequence for v and
d = javj; (iii) We can compute dist(u; v) if u is the ancestor of v: it is d0 d00,
where d0 is a length of au and d00 is a length of av. Note that the invocations of
dist in Algorithms 4 and 2 are always this form. The only exception is dist(u; v)
in Sort in which the function uses LCA as a subroutine. The complexity of
Sort is thus the same as the complexity of LCA or LCP in our case.</p>
        <p>By doing so, we do not need any preprocessing. We now replace the LCP(au; av)
function by a quantum subroutine QLCP(au; av), presented in Section 5.1, and
keep everything else as is. This subroutine runs in time O(pn log n) with O n13
error probability. This allows us to obtain the following result.</p>
        <p>Theorem 3. There is a quantum algorithm that processes a request in time
O k2pn log n with probability of error O n1 . It does not require any
preprocessing.</p>
        <p>Proof. The complexity Move is the complexity of LCA that is QLCP in our
implementation, plus the complexity of MoveUp. The former has complexity is
O(pn log n) by Lemma 5, and the latter O(1) by the oracle. Therefore, the total
running time of Move is O(pn log n).</p>
        <p>The complexity of Request is O(k2) times the cost of LCA that is QLCP
in our implementation, and then a call to Move. Additionally, the Sort
function invokes LCA to compute distances. Hence, the complexity of Sort is
O (k log k pn log n), and the total complexity is O k2pn log n .</p>
        <p>We invoke, QLCP at most 4k2 times so the success probability is at least
1 n13 4k2 1 1 4n2 1 n1 for enough big n. Therefore, the error
probability is O n1 .n3Note that we do not need any preprocessing.</p>
        <p>. Repeat 3 log m times and take the majority vote
5.1</p>
      </sec>
      <sec id="sec-2-10">
        <title>Quantum Algorithm for Longest Common Pre x of Two</title>
      </sec>
      <sec id="sec-2-11">
        <title>Sequences</title>
        <p>Let us consider the Longest Common Pre x (LCP) problem. Given two
sequences (q1; : : : ; qd) and (b1; : : : ; bs), the problem is to nd t such that q1 =
b1; : : : ; qt = bt and qi 6= bi for t + 1 i m, where m = min(d; s). Consider a
function f : f1; : : : ; mg ! f0; 1g such that f (i) = 1 i qi 6= bi. Assume that x is
the minimal argument such that f (x) = 1, then t = x 1. The LCP problem is
equivalent to nding the rst marked element. It can be solved as follows.
Algorithm 7 QLCP(q; b). Quantum algorithm for the longest common pre x.
Lemma 5. Algorithm 7 nds the LCP of two sequences of length m in time
O(pm log m) and with probability of error O</p>
        <p>Proof. The correctness of the algorithm follows from the de nition of f . The
complexity of FindFirst is O(pm) by Proposition 2. The total running time is
O(pm log m) because of the repetitions.</p>
      </sec>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Ablayev</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ablayev</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Huang</surname>
            ,
            <given-names>J.Z.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Khadiev</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Salikhova</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wu</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          :
          <article-title>On quantum methods for machine learning problems part i: Quantum tools</article-title>
          .
          <source>Big Data Mining and Analytics</source>
          <volume>3</volume>
          (
          <issue>1</issue>
          ),
          <volume>41</volume>
          {
          <fpage>55</fpage>
          (
          <year>2019</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Ablayev</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ablayev</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Khadiev</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Vasiliev</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Classical and quantum computations with restricted memory</article-title>
          .
          <source>LNCS 11011</source>
          ,
          <issue>129</issue>
          {
          <fpage>155</fpage>
          (
          <year>2018</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Ambainis</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Understanding quantum algorithms via query complexity</article-title>
          .
          <source>In: Proc. Int. Conf. of Math</source>
          .
          <year>2018</year>
          . vol.
          <volume>4</volume>
          , pp.
          <volume>3283</volume>
          {
          <issue>3304</issue>
          (
          <year>2018</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Ambainis</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Balodis</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Iraids</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Khadiev</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Klevickis</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Prusis</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Shen</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Smotrovs</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Vihrovs</surname>
          </string-name>
          , J.:
          <article-title>Quantum lower and upper bounds for 2d-grid and Dyck language</article-title>
          .
          <source>In: Proceedings of MFCS 2020. LIPIcs</source>
          , vol.
          <volume>170</volume>
          , pp.
          <volume>8</volume>
          :
          <issue>1</issue>
          {8:
          <issue>14</issue>
          (
          <year>2020</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Baliga</surname>
            ,
            <given-names>G.R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Shende</surname>
            ,
            <given-names>A.M.</given-names>
          </string-name>
          :
          <article-title>On space bounded server algorithms</article-title>
          .
          <source>In: Proceedings of ICCI'93</source>
          . pp.
          <volume>77</volume>
          {
          <fpage>81</fpage>
          .
          <string-name>
            <surname>IEEE</surname>
          </string-name>
          (
          <year>1993</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Becchetti</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Koutsoupias</surname>
          </string-name>
          , E.:
          <article-title>Competitive analysis of aggregate max in windowed streaming</article-title>
          .
          <source>In: ICALP. LNCS</source>
          , vol.
          <volume>5555</volume>
          , pp.
          <volume>156</volume>
          {
          <issue>170</issue>
          (
          <year>2009</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Bender</surname>
            ,
            <given-names>M.A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Farach-Colton</surname>
            ,
            <given-names>M.:</given-names>
          </string-name>
          <article-title>The lca problem revisited</article-title>
          .
          <source>In: Latin American Symposium on Theoretical Informatics</source>
          . pp.
          <volume>88</volume>
          {
          <fpage>94</fpage>
          . Springer (
          <year>2000</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Bender</surname>
            ,
            <given-names>M.A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Farach-Colton</surname>
            ,
            <given-names>M.:</given-names>
          </string-name>
          <article-title>The level ancestor problem simpli ed</article-title>
          .
          <source>Theoretical Computer Science</source>
          <volume>321</volume>
          (
          <issue>1</issue>
          ),
          <volume>5</volume>
          {
          <fpage>12</fpage>
          (
          <year>2004</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Boyar</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Larsen</surname>
            ,
            <given-names>K.S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Maiti</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>The frequent items problem in online streaming under various performance measures</article-title>
          .
          <source>International Journal of Foundations of Computer Science</source>
          <volume>26</volume>
          (
          <issue>4</issue>
          ),
          <volume>413</volume>
          {
          <fpage>439</fpage>
          (
          <year>2015</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Boyer</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Brassard</surname>
          </string-name>
          , G., H yer, P.,
          <string-name>
            <surname>Tapp</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Tight bounds on quantum searching</article-title>
          .
          <source>Fortschritte der Physik</source>
          <volume>46</volume>
          (
          <issue>4-5</issue>
          ),
          <volume>493</volume>
          {
          <fpage>505</fpage>
          (
          <year>1998</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Chrobak</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Larmore</surname>
            ,
            <given-names>L.L.</given-names>
          </string-name>
          :
          <article-title>An optimal on-line algorithm for k servers on trees</article-title>
          .
          <source>SIAM Journal on Computing</source>
          <volume>20</volume>
          (
          <issue>1</issue>
          ),
          <volume>144</volume>
          {
          <fpage>148</fpage>
          (
          <year>1991</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>Cormen</surname>
            ,
            <given-names>T.H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Leiserson</surname>
            ,
            <given-names>C.E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rivest</surname>
            ,
            <given-names>R.L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Stein</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          :
          <article-title>Introduction to Algorithms</article-title>
          .
          <string-name>
            <surname>McGraw-Hill</surname>
          </string-name>
          (
          <year>2001</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13. Durr, C., H yer, P.:
          <article-title>A quantum algorithm for nding the minimum</article-title>
          .
          <source>arXiv:quantph/9607014</source>
          (
          <year>1996</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14.
          <string-name>
            <surname>Feige</surname>
            ,
            <given-names>U.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Raghavan</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Peleg</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Upfal</surname>
          </string-name>
          , E.:
          <article-title>Computing with noisy information</article-title>
          .
          <source>SIAM Journal on Computing</source>
          <volume>23</volume>
          (
          <issue>5</issue>
          ),
          <volume>1001</volume>
          {
          <fpage>1018</fpage>
          (
          <year>1994</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          15.
          <string-name>
            <surname>Flammini</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Navarra</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Nicosia</surname>
          </string-name>
          , G.:
          <article-title>E cient o ine algorithms for the bicriteria k-server problem and online applications</article-title>
          .
          <source>Journal of Discrete Algorithms</source>
          <volume>4</volume>
          (
          <issue>3</issue>
          ),
          <volume>414</volume>
          {
          <fpage>432</fpage>
          (
          <year>2006</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          16.
          <string-name>
            <surname>Grover</surname>
            ,
            <given-names>L.K.</given-names>
          </string-name>
          :
          <article-title>A fast quantum mechanical algorithm for database search</article-title>
          .
          <source>In: Proceedings of STOC96</source>
          . pp.
          <volume>212</volume>
          {
          <fpage>219</fpage>
          .
          <string-name>
            <surname>ACM</surname>
          </string-name>
          (
          <year>1996</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          17. H yer, P.,
          <string-name>
            <surname>Mosca</surname>
          </string-name>
          , M.,
          <string-name>
            <surname>de</surname>
            <given-names>Wolf</given-names>
          </string-name>
          , R.:
          <article-title>Quantum search on bounded-error inputs</article-title>
          .
          <source>In: Automata, Languages and Programming</source>
          (
          <year>2003</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          18.
          <string-name>
            <surname>Hughes</surname>
            ,
            <given-names>S.:</given-names>
          </string-name>
          <article-title>A new bound for space bounded server algorithms</article-title>
          .
          <source>In: Proceedings of the 33rd annual on Southeast regional conference</source>
          . pp.
          <volume>165</volume>
          {
          <issue>169</issue>
          (
          <year>1995</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          19.
          <string-name>
            <surname>Kapralov</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Khadiev</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mokut</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Shen</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Yagafarov</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Fast classical and quantum algorithms for online k-server problem on trees</article-title>
          .
          <source>arXiv preprint arXiv:2008</source>
          .
          <volume>00270</volume>
          (
          <year>2021</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          20.
          <string-name>
            <surname>Karlin</surname>
            ,
            <given-names>A.R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Manasse</surname>
            ,
            <given-names>M.S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rudolph</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sleator</surname>
          </string-name>
          , D.D.:
          <article-title>Competitive snoopy caching</article-title>
          .
          <source>In: FOCS</source>
          ,
          <year>1986</year>
          ., 27th Annual Symposium on. pp.
          <volume>244</volume>
          {
          <fpage>254</fpage>
          .
          <string-name>
            <surname>IEEE</surname>
          </string-name>
          (
          <year>1986</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>
          21.
          <string-name>
            <surname>Khadiev</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          :
          <article-title>Quantum request-answer game with bu er model for online algorithms. application for the most frequent keyword problem</article-title>
          .
          <source>In: CEUR Workshop Proceedings</source>
          . vol.
          <volume>2850</volume>
          , pp.
          <volume>16</volume>
          {
          <issue>27</issue>
          (
          <year>2021</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref22">
        <mixed-citation>
          22.
          <string-name>
            <surname>Khadiev</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Khadieva</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Two-way quantum and classical machines with small memory for online minimization problems</article-title>
          .
          <source>In: International Conference on Microand Nano-Electronics 2018. Proc. SPIE</source>
          , vol.
          <volume>11022</volume>
          , p.
          <source>110222T</source>
          (
          <year>2019</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref23">
        <mixed-citation>
          23.
          <string-name>
            <surname>Khadiev</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Khadieva</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Quantum online streaming algorithms with logarithmic memory</article-title>
          .
          <source>International Journal of Theoretical Physics</source>
          <volume>60</volume>
          ,
          <volume>608</volume>
          {
          <fpage>616</fpage>
          (
          <year>2021</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref24">
        <mixed-citation>
          24.
          <string-name>
            <surname>Khadiev</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Khadieva</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mannapov</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          :
          <article-title>Quantum online algorithms with respect to space and advice complexity</article-title>
          .
          <source>Lobachevskii J. of Math</source>
          .
          <volume>39</volume>
          (
          <issue>9</issue>
          ),
          <volume>1210</volume>
          {
          <fpage>1220</fpage>
          (
          <year>2018</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref25">
        <mixed-citation>
          25.
          <string-name>
            <surname>Khadiev</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Khadieva</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Two-way quantum and classical automata with advice for online minimization problems</article-title>
          . In:
          <article-title>Reversibility in Programming, Languages, and Automata (RPLA 2019) procceedings</article-title>
          . LNCS, Springer (
          <year>2020</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref26">
        <mixed-citation>
          26.
          <string-name>
            <surname>Khadiev</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lin</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          :
          <article-title>Quantum online algorithms for a model of the request-answer game with a bu er</article-title>
          .
          <source>Uchenye Zapiski Kazanskogo Universiteta. Seriya FizikoMatematicheskie Nauki</source>
          <volume>162</volume>
          (
          <issue>3</issue>
          ),
          <volume>367</volume>
          {
          <fpage>382</fpage>
          (
          <year>2020</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref27">
        <mixed-citation>
          27.
          <string-name>
            <surname>Komm</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          : An Introduction to Online Computation: Determinism, Randomization, Advice. Springer (
          <year>2016</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref28">
        <mixed-citation>
          28.
          <string-name>
            <surname>Kothari</surname>
            ,
            <given-names>R.:</given-names>
          </string-name>
          <article-title>An optimal quantum algorithm for the oracle identi cation problem</article-title>
          .
          <source>In: Proceedings of STACS 2014</source>
          . p.
          <volume>482</volume>
          (
          <year>2014</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref29">
        <mixed-citation>
          29.
          <string-name>
            <surname>Lin</surname>
            ,
            <given-names>C.Y.Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lin</surname>
            ,
            <given-names>H.H.</given-names>
          </string-name>
          :
          <article-title>Upper bounds on quantum query complexity inspired by the elitzur-vaidman bomb tester</article-title>
          .
          <source>In: Proceedings of CCC</source>
          <year>2015</year>
          (
          <year>2015</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref30">
        <mixed-citation>
          30.
          <string-name>
            <surname>Nielsen</surname>
            ,
            <given-names>M.A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Chuang</surname>
            ,
            <given-names>I.L.</given-names>
          </string-name>
          :
          <article-title>Quantum computation and quantum information</article-title>
          . Cambridge univ. press (
          <year>2010</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref31">
        <mixed-citation>
          31.
          <string-name>
            <surname>Rudec</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Baumgartner</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Manger</surname>
            ,
            <given-names>R.:</given-names>
          </string-name>
          <article-title>A fast work function algorithm for solving the k-server problem</article-title>
          .
          <source>Cent Eur J Oper Res</source>
          <volume>21</volume>
          (
          <issue>1</issue>
          ),
          <volume>187</volume>
          {
          <fpage>205</fpage>
          (
          <year>2013</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>