Quantum Online Algorithms with Respect to Space Complexity

09/25/2017 ∙ by Kamil Khadiev, et al. ∙ 0

Online algorithm is a well-known computational model. We introduce quantum online algorithms and investigate them with respect to a competitive ratio in two points of view: space complexity and advice complexity. We start with exploring a model with restricted memory and show that quantum online algorithms can be better than classical ones (deterministic or randomized) for sublogarithmic space (memory), and they can be better than deterministic online algorithms without restriction for memory. Additionally, we consider polylogarithmic space case and show that in this case, quantum online algorithms can be better than deterministic ones as well.

READ FULL TEXT VIEW PDF
POST COMMENT

Comments

There are no comments yet.

Authors

page 1

page 2

page 3

page 4

This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

1 Introduction

Online algorithms are a well-known computational model for solving optimization problems. The peculiarity is that algorithm reads an input piece by piece and should return an answer piece by piece immediately, even if an answer can depend on feature pieces of the input. An online algorithm should return an output for minimizing an objective function. There are different methods to define the effectiveness of the algorithms [BIL09, BIL15, DLO05]. But a most standard is the competitive ratio [KMRS86, ST85]. It is a ratio between output’s price for an online algorithm and optimal offline algorithms.

We suggest a new model for online algorithms, quantum online algorithms that use a power of quantum computing for solving online minimization problem. In this model, an algorithm can have quantum and classical part. Additionally, we consider restricted version of the algorithms, pure quantum online algorithms. These algorithms have only quantum part. We focus on two measures of complexity: space complexity and advice complexity.

When we consider space, we discuss the online algorithms with restricted memory. For this kind of algorithms, we allow to use only bits of memory, for given integer . Another point of view to the same model is streaming algorithms for an online minimization problem. And such classical models were considered in [BK09, GK15, BLM15]. In this case, we show that quantum online algorithms with single qubit can be better than any classical (deterministic or randomized) online algorithms with sublogarithmic memory. And this quantum algorithm still can be better than any deterministic online algorithms without a restriction for memory. It is also interesting to investigate the model with polylogarithmic memory or logarithmic memory (LOGSPACE). Here the algorithm can use bits of memory. We show that for -Parity for Number of Equality Hats problem the quantum algorithm can be better than any deterministic one. Additionally, we show that quantum online algorithm can simulate a classical (deterministic or randomize) one with almost same memory. It means that quantum model has at least the same computational power. Note that for other models, quantum and classical cases can be incomparable, for example, communication complexity model [Kla00] or Ordered Binary Decision Diagrams [SS05]. Online algorithms with restricted memory are similar to streaming algorithms [LG06, GKK07], Branching programs [Weg00], Automata [AY12, AY15]. Researchers also compare classical and quantum cases for these models [AGK05, AGKY14, AGKY16, Gai15, SS05, KK17, AY12, AY15, LG06, AAKK17], [IKP17, GKK07].

Another interesting complexity measure for the model with respect to the competitive ratio is advice complexity [Kom16, BFK16, BFK17]. In this model online algorithm gets some bits of advice about an input. Trusted Adviser sending these bits knows the whole input and has an unlimited computational power. The question is “how many advice bits are enough to reduce competitive ratio or to make the online algorithm as the same effective as the offline algorithm in the worst case?”. This question has different interpretations. One of them is “How many information an algorithm should know about a future for solving a problem effectively?”. Another one is “If we have an expensive channel which can be used for pre-processed information about the future, then how many bits we should send by this channel to solve a problem effectively?”. Researchers pay attention to deterministic and probabilistic or randomized online algorithms with advice [Hro05, KT06, MR10, Kom16].

We suggest quantum online algorithms with advice. In this model, an algorithm has a quantum channel with Adviser. We consider two kinds of the model. The first one is an algorithm with private qubits. In this case, an algorithm and an Adviser have not shared qubits. Advice bits are only communication between these two “players”. For this model, we show that we also can simulate a classical (deterministic or randomized) online algorithm with the same number of advice bits. And we demonstrate examples of quantum online algorithms with advice for special -Parity for Number of Hats problem. The second kind of algorithms is a model with shared entangled qubits or EPR-pairs. Before the computational process, we prepare pairs of entangled qubits (EPR-pairs), and for each pair, we give one qubit to the algorithm and another to the Adviser. Then the Adviser sends twice less advice qubits using a trick from [BW92]. We apply this idea to the well-known Paging problem [Hro05, BEY05].

The paper is organized in the following way. We present definitions in Section 2. In Section 3 we explore online algorithms with restricted memory. The quantum online algorithms with advice are explored in Section 4. We focus on a model with private quantum bits in Section 4.1 and with shared entangled qubits in Section 4.2.

2 Preliminaries

Firstly, let us define an online optimization problem. All following definitions we give with respect to [Kom16].

Definition 1 (Online Minimization Problem)

An online minimization problem consists of a set of inputs and a cost function. Every input is a sequence of requests . Furthermore, a set of feasible outputs (or solutions) is associated with every ; every output is a sequence of answers . The cost function assigns a positive real value to every input and any feasible output . For every input , we call any feasible output for that has the smallest possible cost (i. e., that minimizes the cost function) an optimal solution for .

Let us define an online algorithm for this problem as an algorithm which gets requests one by one and should return answers immediately, even if an optimal solution can depend on future requests.

Definition 2 (Deterministic online algorithm)

Consider an input of an online minimization problem. An online algorithm computes the output sequence such that is computed from , . We denote the cost of the computed output by .

This setting can also be regarded as a request-answer game: an adversary generates requests, and an algorithm has to serve them one at a time [Alb96].

As the main measure of quality of an online algorithm, we use a competitive ratio. It is the ratio of two costs: cost for an online algorithm’s solution; and cost for an optimal offline algorithm solution. We consider the worst case.

Definition 3 (Competitive Ratio)

An online algorithm is -competitive if there exists a non-negative constant such that, for every input , we have: where is an optimal offline algorithm for the problem. We also call the competitive ratio of . If , then is called strictly -competitive; is optimal if it is strictly -competitive.

Let us define an Online Algorithm with Advice. We can say, that advice is some information about the future input.

Definition 4 (Online Algorithm with Advice)

Consider an input of an online minimization problem. An online algorithm with advice computes the output sequence such that is computed from , where is the message from Adviser, who knows the whole input. is -competitive with advice complexity if there exists a non-negative constant such that, for every and for any input of length at most , there exists some such that and length of is at most bits.

Next, let us define a randomized online algorithm.

Definition 5 (Randomized Online Algorithm)

Consider an input of an online minimization problem. A randomized online algorithm computes the output sequence such that is computed from , where is the content of a random tape, i. e., an infinite binary sequence, where every bit is chosen uniformly at random and independently of all the others. By

we denote the random variable expressing the cost of the solution computed by

on . is -competitive in expectation if there exists a non-negative constant such that, for every , where is an optimal offline algorithm for the problem.

We consider online algorithms that base their computation on both advice bits and randomness.

Definition 6 (Randomized Online Algorithm with Advice)

Consider an input of an online minimization problem. A randomized online algorithm computes the output sequence such that is computed from , where is the content of a random tape, i. e., an infinite binary sequence, where every bit is chosen uniformly at random and independently of all the others, and is the message from Adviser, who knows whole input. By we denote the random variable expressing the cost of the solution computed by on . is -competitive in expectation if there exists a non-negative constant such that, for every of length at most , there is such that, where is an optimal offline algorithm for the problem and length of is at most qubits.

A randomized online algorithm with advice is allowed to make random choices (i.e., “toss coins”) to determine its actions and the advice scheme. Formally, then, a randomized online algorithm with advice is a probability distribution over deterministic online algorithms with advice.

Now we are ready to define a quantum online algorithm. You can read more about quantum computation in [AY15]

Definition 7 (Quantum Online Algorithm)

Consider an input of an online minimization problem. A quantum online algorithm computes the output sequence such that is computed from . can have classical and quantum part. The algorithm can measure qubits several times during computation. If the algorithm has not classical part, then we call it “pure quantum online algorithm”. By we denote the cost of the solution computed by on . Note that quantum computation is probabilistic process. is -competitive in expectation if there exists a non-negative constant such that, for every , where is an optimal offline algorithm for the problem.

Let us define a quantum online algorithm with advice. We define two kinds of the model: a model with shared and a model with private qubits. (We allow or do not allow to share qubits between Adviser and Algorithm before the start of computation.)

Definition 8 (Quantum Online Algorithm with Advice and Private qubits)

Consider an input of an online minimization problem. A quantum online algorithm with advice and private qubits (or quantum online algorithm with advice) computes the output sequence such that is computed from , where is the quantum message from Adviser, who knows the whole input. can have classical and quantum part and do not have any restrictions on measurement. is -competitive with advice complexity if there exists a non-negative constant such that, for every and for any input of length at most , there exists some such that where, as above, is an optimal offline algorithm for the problem and length of is at most qubits.

Definition 9 (Quantum Online Algorithm with Advice and Shared qubits)

Consider an input of an online minimization problem. A quantum online algorithm with advice, and shared qubits is a quantum online algorithm with advice, but before the process of computation, the Algorithm prepares shared qubits (may be entangled) and sends part of them to the Adviser.

Let us define online algorithms with restricted memory. Let deterministic online algorithm be an algorithm which uses at most bits of memory on processing any input . We can define similar restrictions for randomized algorithms and algorithms with advice. Let quantum online algorithm be an algorithm which uses at most classical bits of memory and quantum bits of memory on processing any input . Let pure quantum online algorithm be an algorithm using at most quantum bits of memory on processing any input .

3 Space Complexity for Quantum Online Algorithms

Let us focus on space complexity of online algorithms. It is interesting to analyze the size of memory that is required by the algorithm. In a case of the restricted memory, a quantum algorithm can be better than classical ones (deterministic or probabilistic). We present this result in Theorems 3.1, 3.2 and 3.3. And the quantum algorithm can be still better than any deterministic online algorithm without a restriction to a size of memory (Theorem 3.4).

Let us consider the special problem which allows us to show the separation: -Parity for Number of Hats (-PNH).

Definition of -PNH problem is based on definition of function from [AY12, AGKY14, AGKY16]. Feasible inputs for the problem are , for such that , where is the number of s and is a positive integer. .

Firstly, let us describe -PNH problem informally. There are guardians and prisoners. They stay one by one in a line “, is guardian and is prisoner. Prisoner has an input of length and computes function for . If the result is

then he paints his hat in black. Otherwise, he paints it in white. Each guardian wants to know if the number of following black hats is odd or even. The cost of right guardian’s answer is

, and the cost of the wrong answer is . We want to minimize the cost of output, and assume that .

Formal definition of -PNH is following: Feasible inputs for the problem are of length such that , for some integer . It is guarantied that is always such that , where , for . Additionally, , where is some integer, . Let be output of -PNH and be output bits corresponding to input variables with value (in other words, variables of guardians). Output corresponds to , corresponds to and , corresponds to . Let . The cost , if for all , and otherwise. We consider numbers and such that .

Let us present a pure quantum online algorithm which uses single qubit of memory for this problem. It uses ideas from quantum automata [AY12] and branching programs theories [AGKY14, AGKY16].

Algorithm 1. (Quantum Online Algorithm for -PNH) The pure quantum algorithm uses single qubit.

Step 1. The algorithm emulates guessing for . starts on a state . And it measures the qubit before reading any input variables. It gets or with equal probability. The result of measurement is .

Step 2. The algorithm reads . Let angle . Then rotates the qubit by an angle , if the algorithm meets . And it does not do anything otherwise.

Step 3. If meets then it measures the qubit . If then the qubit is rotated by an angle , for some integer , else the qubit is rotated by an angle , for some integer . If , then and . And if , then and . The result of measurement is .

Step 4. The step is similar to Step 2, but algorithm reads .

Step 5. The step is similar to Step 3, but algorithm outputs .

Step 6. The algorithm reads and skips the last part of the input. does not need these variables, because it guesses and using this value we already can obtain and without .

Assume, that algorithm did right guess that . So, if the parity of the passing part is the same as the parity of the future part of the input, then the algorithm returns the right answer with probability . And if the guess is not correct and , then the algorithm returns a wrong answer with probability .

With equal probabilities we have or . Thus competitive ratio is .

As a result we have the following theorem:

Theorem 3.1

There is -competitive in expectation pure quantum algorithms for -PNH Problem with a single qubit of memory.

At the same time, if a deterministic online algorithm for -PNH Problem uses less than bits; then it is -competitive. To show this claim, let us discuss properties of function.

Lemma 1

Let integer be such that , where is the length of input. Then there is no deterministic algorithm that reads an input variable by variable, uses bits of memory and computes .

Proof. Let us assume that we can construct such a deterministic online algorithm . Therefore we can construct an automaton , with states that emulates the same algorithm and computes . But it is impossible, due to [AY12, AGKY14, AGKY16].

Lemma 2

Let integer be such that , where is the length of input. Then there is no randomized algorithm that reads an input variable by variable, uses bits of memory and computes with probability of error less than .

Proof. We can prove the claim using the same technique as in Lemma 1, because of the same lower bound for probabilistic automata [AY12, AGKY14, AGKY16].

Now we can discuss deterministic online algorithms for -PNH Problem.

Theorem 3.2

Let integer be such that , where is the length of input. Any deterministic online algorithm computing -PNH Problem is -competitive.

Proof. Let us assume that we have such an algorithm . Then we suggest the input such that returns the wrong answer on all requests of guardians. Let .

The first guardian answers . Due to Lemma 1 we can choose input such that cannot compute . It means that we can choose such that , for . By the same reason we can pick such that , for . Let us choose the input such that , for . Note that we guarantee that is an integer, for .

Therefore, we have: We got a contradiction for input . Hence the cost of output is and the competitive ration is .

Theorem 3.3

Let integer be such that , where is the length of input. Any randomize online algorithm computing -PNH Problem is -competitive.

Proof. By the same way as in the previous Theorem we can show that for any algorithm we can suggest the input such that it cannot say anything better than just guessing answers with probabilities . Therefore expected cost is and expected competitive ratio is .

Note that for any deterministic online algorithm without memory restriction, we can construct input such that at least two of three guardians return wrong answers.

Theorem 3.4

Suppose a deterministic online algorithm computes -PNH; then is -competitive.

Proof. Let the algorithm receives the input , such that , for . Let be such that .

Then receives part of the input and returns . Let , if ; and , otherwise. Then we choose such that . In that case . Therefore at least two of three guardians return wrong answers. Therefore and is -competitive. 3

It is easy to see that and due to . Therefore, a pure quantum algorithm is better than any deterministic or randomize online algorithm that uses less than bits of memory. And the same pure quantum online algorithm is better than any deterministic online algorithm without memory restriction.

3.1 Polylogarithmic Space Complexity Separation between Quantum and Deterministic Online Algorithms with Polylogarithmic Memory

Note, that above results show separation for sublogarithmic memory. For polylogarithmic memory case, we present separation between quantum and deterministic models in Theorems 3.5 and 3.6. Also, same results are right in logarithmic memory case.

Let us consider modification of -PNH problem called -Parity Number of Equality Hats or -PNEH. It is the same problem, but we use function instead of . Boolean function is such that , if , and otherwise. So . We suppose that .

Let us construct a pure quantum online algorithm that uses and solves (n,r,w).

Algorithm 2. (Quantum Algorithm for -PNEH) The pure quantum algorithm uses qubits.

Step 1. The algorithm emulates guessing for . initializes the qubit . And it measures the qubit before reading any input variables. It gets or with equal probability. The result of measurement is .

Step 2. The algorithm takes and obtains a value of the function using quantum fingerprinting method presented in [AV09, AV08, AKV10], [AN08, AN09, AF98]. This method allows to compute the function with probability of error by any fixed constant . The method uses qubits. For -instances, probability of error is . And for -instances probability of error is .

Step 3. If meets then it takes a value . Let the value be in qubit . Then the algorithm applies gate for . After that . Then measure and returns .

Step 4. The step is similar to Step 2, but algorithm reads .

Step 5. The step is similar to Step 3, but algorithm outputs .

Step 6. The algorithm reads and skips the last part of the input. does not need these variable, because it guesses and using this value we already can obtain and without .

Let us compute an expected cost of pairs . For this we construct a Table 1 of probabilities and costs for all possible values in columns and all possible answers in rows.

000 001 010 011 100 101 110 111
000
001
010
011
100
101
110
111
Table 1: Probabilities and costs

Let us compute expected cost for each kind of inputs :

So, expected ratio is . As a result we have the following theorem:

Theorem 3.5

There is -competitive in expectation pure quantum algorithms for -PNEH Problem with qubits of memory.

At the same time, if a deterministic online algorithm for -PNEH Problem uses a polylogarithmic number of bits; then it is -competitive. To show this claim, let us discuss a required property of function.

Lemma 3

There is no deterministic algorithm that reads an input variable by variable, uses bits of memory and computes .

Proof. Let us assume that we can construct such a deterministic online algorithm . Therefore we can construct an automaton , with states that emulates the same algorithm and computes . But it is easy to see that requires at least states.

Now we can discuss deterministic online algorithms for -PNEH Problem.

Theorem 3.6

Let integer be such that , where is the length of input. Any deterministic online algorithm computing -PNEH Problem is -competitive.

Proof. Using Lemma 3, we can prove the theorem by the same way as in proof of Theorem 3.2.

Note that for any deterministic online algorithm without memory restriction, we can construct input such that at least two of three guardians return wrong answers.

Theorem 3.7

Suppose a deterministic online algorithm computes -PNEH; then is -competitive.

Proof. We can prove the theorem by the same way as in proof of Theorem 3.4.

It is easy to see that due to . Therefore, the pure quantum algorithm is better than any deterministic online algorithm without memory restriction.

3.2 On an Emulation of a Probabilistic Online Algorithm by a Quantum One

Let us show that a quantum model has at least the same power as a classical model. We use a simple technique, but it is important to show this result, because as we discussed in the introduction, for some models, quantum and classical cases are incomparable.

Theorem 3.8

Let an online optimization problem is solved by -competitive randomized online algorithm using bits of memory, then there is a -competitive quantum online algorithm that computes this problem using at most bits of classical memory and one qubit. (See Appendix 0.A)

Pure quantum algorithms also can emulate random algorithms.

Theorem 3.9

Let an online optimization problem is solved by -competitive randomized online algorithm using bits of memory, then there is a -competitive pure quantum online algorithm that computes using at most qubits.

Proof. We can use the same technique as in the previous theorem, but we will store a state of classical memory in the quantum bits.

4 Advice complexity of Quantum online algorithms

4.1 Results on Model with Private Qubits

Firstly, let us show that situation with advice complexity is similar to model with restricted memory, and quantum model with advice also has at least the same power as a classical one. All proofs of theorems from this section are presented in Appendix 0.B.

Theorem 4.1

Let an online optimization problem is solved by -competitive randomized online algorithm with advice bits, then there is a -competitive quantum online algorithm that computes using at most advice qubits.

Let us apply the above theorem to the -PNH problem. We have shown in Theorem 3.4, which for any deterministic online algorithm, we can construct an input such that at least two of three guardians return wrong results. At the same time, one advice bit is enough to construct optimal an online solution.

Theorem 4.2

There is optimal deterministic online algorithm with advice bit for -PNH problem.

We will formulate two quantum online algorithms for the problem. The first one emulates a random algorithm, the second one is an optimal pure quantum online algorithm with advice, and it is based on ideas from Theorem 3.1.

Theorem 4.3

There are -competitive randomized online algorithm and -competitive quantum online algorithm for -PNH Problem.

Theorem 4.4

There is an optimal pure quantum algorithm with single advice qubit that uses a single qubit of memory for solving -PNH Problem.

4.2 Results on Model with Shared Entangled Qubits

For any classical online algorithm with advice, we can construct a quantum algorithm with shared qubits and two times less advice qubits. The idea is based on paper [BW92], where authors use EPR-pairs. It allows to send 2 bits of classical information using one qubit.

Theorem 4.5

Let be an online minimization problem, and be -competitive deterministic online algorithm with advice bits, be -competitive randomized online algorithm with advice bits. Then, there are -competitive quantum online algorithm with shared qubits and advice qubits, and -competitive quantum online algorithm with shared qubits and advice qubits for the same problem. (See Appendix 0.C)

The Paging problem. Let us apply this result to the well-known Paging problem [DKP09]. We describe it in a very simplified way; a practical view of the problem can be found in the standard literature, for example, in [Kom16].

Consider a two-level memory system that consists of a small fast memory and a large slow memory. Here, each request specifies a page in the memory system. A request is served if the corresponding page is in the fast memory. If a requested page is not in the fast memory, a page fault occurs. Then some page must be moved from the fast memory to the slow memory so that the requested page can be loaded into the vacated location. A paging algorithms specifies which page to evict on a fault. The cost is the total number of evicted pages. The large slow memory has pages. The fast memory (cache) has pages.

Theorem 4.6 ([Dkp09])

There is an optimal deterministic online algorithm for Paging Problem, which uses bits of advice.

Hence, for the quantum case, we get the following result due to Theorem 4.5.

Theorem 4.7

There is an optimal quantum online algorithm with shared qubits for Paging Problem, which uses qubits of advice.

Acknowledgements. Partially supported by ERC Advanced Grant MQC. The work is performed according to the Russian Government Program of Competitive Growth of Kazan Federal University

References

  • [AAKK17] Farid Ablayev, Andris Ambainis, Kamil Khadiev, and Aliya Khadieva. Lower bounds and hierarchies for quantum automata communication protocols and quantum ordered binary decision diagrams with repeated test. 2017.
  • [AF98] Andris Ambainis and Rūsiņš Freivalds. 1-way quantum finite automata: strengths, weaknesses and generalizations. In FOCS’98: Proceedings of the 39th Annual Symposium on Foundations of Computer Science, pages 332–341, 1998. (http://arxiv.org/abs/quant-ph/9802062).
  • [AGK05] Farid Ablayev, Aida Gainutdinova, Marek Karpinski, Cristopher Moore, and Christopher Pollett. On the computational power of probabilistic and quantum branching program. Information and Computation, 203(2):145–162, 2005.
  • [AGKY14] Farid Ablayev, Aida Gainutdinova, Kamil Khadiev, and Abuzer Yakaryılmaz. Very narrow quantum obdds and width hierarchies for classical obdds. In Descriptional Complexity of Formal Systems, volume 8614 of Lecture Notes in Computer Science, pages 53–64. Springer, 2014.
  • [AGKY16] F. Ablayev, A. Gainutdinova, K. Khadiev, and A. Yakaryılmaz. Very narrow quantum obdds and width hierarchies for classical obdds. Lobachevskii Journal of Mathematics, 37(6):670–682, 2016.
  • [AKV10] Farid Ablayev, Airat Khasianov, and Alexander Vasiliev. On complexity of quantum branching programs computing equality-like boolean functions. ECCC, 2010.
  • [Alb96] Susanne Albers. BRICS, Mini-Course on Competitive Online Algorithms. Aarhus University, 1996.
  • [AN08] Andris Ambainis and Nikolajs Nahimovs. Improved constructions of quantum automata. In TQC, pages 47–56. Springer, 2008.
  • [AN09] Andris Ambainis and Nikolajs Nahimovs. Improved constructions of quantum automata. Theoretical Computer Science, 410(20):1916–1922, 2009.
  • [AV08] Farid Ablayev and Alexander Vasiliev. On the computation of boolean functions by quantum branching programs via fingerprinting. In Electronic Colloquium on Computational Complexity (ECCC), volume 15, 2008.
  • [AV09] Farid Mansurovich Ablayev and AV Vasilyev. On quantum realisation of boolean functions by the fingerprinting technique. Discrete Mathematics and Applications, 19(6):555–572, 2009.
  • [AY12] Andris Ambainis and Abuzer Yakaryılmaz. Superiority of exact quantum automata for promise problems. Information Processing Letters, 112(7):289–291, 2012.
  • [AY15] Andris Ambainis and Abuzer Yakaryılmaz. Automata and quantum computing. Technical Report 1507.01988, arXiv, 2015.
  • [BEY05] Allan Borodin and Ran El-Yaniv. Online computation and competitive analysis. cambridge university press, 2005.
  • [BFK16] Joan Boyar, Lene M Favrholdt, Christian Kudahl, Kim S Larsen, and Jesper W Mikkelsen. Online algorithms with advice: A survey. Acm Sigact News, 47(3):93–129, 2016.
  • [BFK17] Joan Boyar, Lene M Favrholdt, Christian Kudahl, Kim S Larsen, and Jesper W Mikkelsen. Online algorithms with advice: A survey. ACM Computing Surveys (CSUR), 50(2):19, 2017.
  • [BIL09] Joan Boyar, Sandy Irani, and Kim S Larsen. A comparison of performance measures for online algorithms. In Workshop on Algorithms and Data Structures, pages 119–130. Springer, 2009.
  • [BIL15] Joan Boyar, Sandy Irani, and Kim S Larsen. A comparison of performance measures for online algorithms. Algorithmica, 72(4):969–994, 2015.
  • [BK09] Luca Becchetti and Elias Koutsoupias. Competitive analysis of aggregate max in windowed streaming. In Automata, Languages and Programming: 36th International Colloquium, ICALP 2009, Rhodes, Greece, July 5-12, 2009, Proceedings, Part I, pages 156–170, Berlin, Heidelberg, 2009. Springer Berlin Heidelberg.
  • [BLM15] Joan Boyar, Kim S Larsen, and Abyayananda Maiti. The frequent items problem in online streaming under various performance measures. International Journal of Foundations of Computer Science, 26(4):413–439, 2015.
  • [BW92] Charles H Bennett and Stephen J Wiesner. Communication via one-and two-particle operators on einstein-podolsky-rosen states. Physical review letters, 69(20):2881, 1992.
  • [DKP09] Stefan Dobrev, Rastislav Královič, and Dana Pardubská. Measuring the problem-relevant information in input. RAIRO-Theoretical Informatics and Applications, 43(3):585–613, 2009.
  • [DLO05] Reza Dorrigiv and Alejandro López-Ortiz. A survey of performance measures for on-line algorithms. SIGACT News, 36(3):67–81, 2005.
  • [Gai15] A. F. Gainutdinova. Comparative complexity of quantum and classical obdds for total and partial functions. Russian Mathematics, 59(11):26–35, 2015.
  • [GK15] Yiannis Giannakopoulos and Elias Koutsoupias. Competitive analysis of maintaining frequent items of a stream. Theoretical Computer Science, 562:23–32, 2015.
  • [GKK07] Dmitry Gavinsky, Julia Kempe, Iordanis Kerenidis, Ran Raz, and Ronald De Wolf. Exponential separations for one-way quantum communication complexity, with applications to cryptography. In

    Proceedings of the thirty-ninth annual ACM symposium on Theory of computing

    , pages 516–525. ACM, 2007.
  • [Hro05] JI Hromkovic. Zámecniková. design and analysis of randomized algorithms: Introduction to design paradigms, 2005.
  • [IKP17] Rishat Ibrahimov, Kamil Khadiev, Krišjānis Prūsis, Jevgenijs Vihrovs, and Abuzer Yakaryılmaz. Zero-error affine, unitary, and probabilistic obdds. arXiv preprint arXiv:1703.07184, 2017.
  • [KK17] Kamil Khadiev and Aliya Khadieva. Reordering Method and Hierarchies for Quantum and Classical Ordered Binary Decision Diagrams, pages 162–175. Springer International Publishing, Cham, 2017.
  • [Kla00] Hartmut Klauck. Quantum communication complexity. In In Proc. Intl. Colloquium on Automata, Languages, and Programming (ICALP. Citeseer, 2000. arXiv preprint quant-ph/0005032.
  • [KMRS86] Anna R Karlin, Mark S Manasse, Larry Rudolph, and Daniel D Sleator. Competitive snoopy caching. In Foundations of Computer Science, 1986., 27th Annual Symposium on, pages 244–254. IEEE, 1986.
  • [Kom16] Dennis Komm. An Introduction to Online Computation: Determinism, Randomization, Advice. Springer, 2016.
  • [KT06] Jon Kleinberg and Eva Tardos. Algorithm design. Pearson Education India, 2006.
  • [LG06] François Le Gall. Exponential separation of quantum and classical online space complexity. In Proceedings of the eighteenth annual ACM symposium on Parallelism in algorithms and architectures, pages 67–73. ACM, 2006.
  • [MR10] Rajeev Motwani and Prabhakar Raghavan. Randomized algorithms. Chapman & Hall/CRC, 2010.
  • [SS05] Martin Sauerhoff and Detlef Sieling. Quantum branching programs and space-bounded nonuniform quantum complexity. Theoretical Computer Science, 334(1):177–225, 2005.
  • [ST85] Daniel D Sleator and Robert E Tarjan. Amortized efficiency of list update and paging rules. Communications of the ACM, 28(2):202–208, 1985.
  • [Weg00] Ingo Wegener. Branching Programs and Binary Decision Diagrams: Theory and Applications. SIAM, 2000.

Appendix 0.A The proof of Theorem 3.8

Let us construct the quantum algorithm which emulates the algorithm . Let be a randomized online algorithm which uses random bits from random tape. Note that a deterministic online algorithm is the partial case of a randomized algorithm with . Before reading the input, initializes a qubit . In each case, when the algorithm should emulate reading of a random bit from random tape, it applies to the Hadamar transformation . Here . After that measures the qubit and gets or with probability

, this action emulates the uniform distributed random bit. By construction,

returns the same results with the same probability as .

Appendix 0.B Proofs of Theorems 4.1, 4.2, 4.3, 4.4

Theorem 4.1. Let an online optimization problem is solved by -competitive randomized online algorithm with advice bits, then there is a -competitive quantum online algorithm that computes using at most advice qubits.

Proof. Let us construct the quantum algorithm which emulates the algorithm . Let be a randomized online algorithm which uses random bits from random tape. Note that deterministic online algorithm is the partial case of a randomized algorithm with . The Adviser sends qubits with the same information as for , using pure states of qubits. When gets advice bits, then it measures them immediately and gets classical advice bits. After that does the same actions as . Let us describe the emulation of the random process. Before reading the input, initializes qubit in state. In each case, when Algorithm is required to emulate reading of a random bit from random tape, it applies the Hadamard transformation to After that measures the qubit and gets or with probability , this action emulates the uniform distributed random bit. By construction, returns result with the same probability as .

Theorem 4.2. There is an optimal deterministic online algorithm with advice bit for -PNH problem.

Proof. Adviser sends parity of numbers of s over . Let the value of this bit be . Algorithm computes the number of s, when it gets full ones, then it inverts . The algorithm returns on each request. It is easy to see that always returns right answers. Thus it is optimal.

Theorem 4.3. There are -competitive randomized online algorithm and -competitive quantum online algorithm for -PNH Problem.

Proof. Firstly, algorithm guesses with equal probability. Let value of guess be . Algorithm computes the number of s, when it gets full ones, then it inverts . The algorithm returns for each request. It is easy to see that if the guess is right, then always returns the right answers, and always returns the wrong answer otherwise. Therefore, competitive ratio is . For the quantum case, we apply Theorem 3.8 and get the claim of the theorem.

Theorem 4.4. There is an optimal pure quantum algorithm with single advice qubit that uses single qubit of memory for solving -PNH Problem.

Proof. We can construct an algorithm like in the proof of Theorem 3.1. The difference is that the Adviser sends one qubit for .

Appendix 0.C The Proof of Theorem 4.5

Let us consider a deterministic online algorithm. The proof for the randomized case is the same. We interpreted the sending of advice bits as a communication game between the algorithm and the Adviser. Let the algorithm wants to receive some information from the Adviser. To perform this feat, the algorithm prepares an EPR-pair (two qubits in a state ) and sends one qubit of the pair to the Adviser. After that, the Adviser applies some unitary operation described in [BW92], to the qubit to encode information with one of the states. And Adviser sends the qubit to the algorithm. Then the pair of qubits can be in one of these states (basis):

(1)

Each state encodes two bits of information. The algorithm can measure qubits jointly in the orthonormal basis (1), and so reliably learn which operator the Adviser applied. For bits the algorithm prepares pairs and sends one qubit for each pair. Then the Adviser applies the described transformation and sends qubits back. After that, the algorithm can get classical bits from received qubits.