Quantum Distributed Algorithm for the All-Pairs Shortest Path Problem in the CONGEST-CLIQUE Model
Taisuke Izumi, Fran\c{c}ois Le Gall

TL;DR
This paper introduces a quantum distributed algorithm that significantly speeds up solving the All-Pairs Shortest Path problem in the CONGEST-CLIQUE model, surpassing classical limitations by leveraging quantum communication and search techniques.
Contribution
It presents the first quantum distributed algorithm for APSP in the CONGEST-CLIQUE model, breaking the classical $ ilde O(n^{1/3})$ round barrier to $ ilde O(n^{1/4})$ rounds.
Findings
Quantum algorithm achieves faster APSP computation in CONGEST-CLIQUE
Quantum communication offers advantages over classical in this model
Parallel quantum searches are efficiently implemented without congestion
Abstract
The All-Pairs Shortest Path problem (APSP) is one of the most central problems in distributed computation. In the CONGEST-CLIQUE model, in which nodes communicate with each other over a fully connected network by exchanging messages of bits in synchronous rounds, the best known general algorithm for APSP uses rounds. Breaking this barrier is a fundamental challenge in distributed graph algorithms. In this paper we investigate for the first time quantum distributed algorithms in the CONGEST-CLIQUE model, where nodes can exchange messages of quantum bits, and show that this barrier can be broken: we construct a -round quantum distributed algorithm for the APSP over directed graphs with polynomial weights in the CONGEST-CLIQUE model. This speedup in the quantum setting contrasts with the case of the standard CONGEST model,…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Quantum Distributed Algorithm for the All-Pairs Shortest Path Problem in the CONGEST-CLIQUE Model
Taisuke Izumi
Graduate School of Engineering
Nagoya Institute of Technology
François Le Gall
Graduate School of Informatics
Kyoto University
Abstract
The All-Pairs Shortest Path problem (APSP) is one of the most central problems in distributed computation. In the CONGEST-CLIQUE model, in which nodes communicate with each other over a fully connected network by exchanging messages of bits in synchronous rounds, the best known general algorithm for APSP uses rounds. Breaking this barrier is a fundamental challenge in distributed graph algorithms. In this paper we investigate for the first time quantum distributed algorithms in the CONGEST-CLIQUE model, where nodes can exchange messages of quantum bits, and show that this barrier can be broken: we construct a -round quantum distributed algorithm for the APSP over directed graphs with polynomial weights in the CONGEST-CLIQUE model. This speedup in the quantum setting contrasts with the case of the standard CONGEST model, for which Elkin et al. (PODC 2014) showed that quantum communication does not offer significant advantages over classical communication.
Our quantum algorithm is based on a relationship discovered by Vassilevska Williams and Williams (JACM 2018) between the APSP and the detection of negative triangles in a graph. The quantum part of our algorithm exploits the framework for quantum distributed search recently developed by Le Gall and Magniez (PODC 2018). Our main technical contribution is a method showing how to implement multiple quantum searches (one for each edge in the graph) in parallel without introducing congestions.
1 Introduction
Background. The CONGEST-CLIQUE model is a model in distributed computing that has recently been the subject of intensive research [4, 8, 9, 18, 19, 20, 21, 29, 30, 31, 32, 35, 25, 34, 16]. In this model nodes communicate with each other over a fully connected network (i.e., a clique) by exchanging messages of bits in synchronous rounds. Compared with the more traditional CONGEST model [36], the CONGEST-CLIQUE model removes the effect of distances between nodes in the computation and thus focuses solely on understanding the role of congestion in distributed computing.
The study of shortest path problems is one of the central topics in the context of distributed graph algorithms. In the CONGEST model, much progress has been done in the past years [29, 22, 32, 21, 15, 23, 12, 2, 1, 10, 4]: while for exact computation of the Single-Source Shortest Path problem (SSSP) there is still a small gap between the upper bounds and the lower bounds [37, 12], for the All-Pairs Shortest Path problem (APSP) an algorithm with optimal time complexity (up to possible polylogarithmic factors) has been constructed very recently [2]. In the CONGEST-CLIQUE model, the first non-trivial result attaining sublinear running time was an algorithm by Nanongkai [32], which solves the -approximate APSP over undirected weighted graphs within rounds. This was improved by Censor-Hillel at al. [4], who gave a -round exact algorithm for the general APSP (i.e., the APSP over directed graphs with polynomial weights). While faster algorithms based on fast matrix multiplication have been designed for the APSP over graphs with small weights or for approximating the shortest paths [4, 26], the above -round is still not only the best known exact algorithm for the general APSP, but also the best known exact algorithm for SSSP in the CONGEST-CLIQUE model.
Quantum distributed computing. The power of distributed network computation in the quantum CONGEST model has been first investigated by Elkin et al. [11]. In this model the nodes can use quantum processing and communicate using quantum bits (qubits): each edge of the network corresponds to a quantum channel (e.g., an optical fiber if qubits are implemented using photons) of bandwidth qubits. Their main conclusion was that for many fundamental problems in distributed computing, including the computation of the - shortest path in weighted graphs, quantum communication does not offer significant advantages over classical communication. A significant development recently happened: Le Gall and Magniez [27] constructed a quantum distributed algorithm in the CONGEST model computing the exact diameter within rounds, where denotes the diameter. Since Frischknecht et al. [13] have shown that any classical algorithm requires rounds, even in the case , this gives a speedup (up to quadratic when the diameter is small). At the core of this quantum algorithm lies a distributed implementation of Grover’s seminal quantum algorithm [17]. Grover’s algorithm achieves a quadratic speedup over brute-force search for generic search problems in the centralized setting. The algorithm from [27] carefully adapts Grover’s algorithm to the distributed CONGEST model and shows how to combine it with a classical distributed algorithm in a completely black-box way. Due to its versatility, this approach has the potential of accelerating many graph algorithms. A pressing open question is to understand for which problems in distributed computing it can actually help.
Our result. While it is tempting to consider potential quantum acceleration of computing shortest paths using the distributed version of Grover’s algorithm, there are several significant obstacles. The distributed quantum diameter algorithm from [27] crucially relies on reducing the computation of the diameter to the search problem of finding a node with the maximum eccentricity, and this strategy does not directly work for shortest path problems. Indeed, as already mentioned, it is known that for - shortest paths over weighted graphs, quantum communication cannot offer any significant speedup in the CONGEST model. Even over unweighted graphs, in the CONGEST model it is easy to extend the classical lower bound from [13] to show a -round lower bound for the APSP that holds even in the quantum setting.
In this paper we show that a speedup is possible in the CONGEST-CLIQUE model. Our main result is the following theorem.
Theorem 1**.**
There is a quantum algorithm that solves with high probability the All-Pairs Shortest Path problem over directed graphs with integer weights in using rounds in the CONGEST-CLIQUE model.
As already mentioned, the best known upper bound for the APSP in the classical CONGEST-CLIQUE is due to Censor-Hillel at al. [4]: for graphs with integer weights in their upper bound is rounds. While no nontrivial lower bound is known on the classical complexity of APSP in the CONGEST-CLIQUE model, which is not surprising due to the technical challenges of proving any nontrivial lower bound in this model, the current bound appears as a significant barrier for classical algorithms. Our quantum algorithm breaks this barrier. This gives strong evidence for the superiority of quantum distributed computing over classical distributed computing in the CONGEST-CLIQUE model as well (unless the barrier can be broken in the classical setting as well — this would in itself be a significant breakthrough). Another interesting observation is that this quantum speedup occurs for a problem (the APSP) for which no quantum speedup can be achieved in the standard CONGEST model, as already mentioned.
Technical overview. The first step of our approach consists in reducing the APSP problem to the problem of detecting negative triangles (triangles in which the sum of the weights of the three edges is negative). This reduction is inspired by the recent breakthrough by Vassilevska Williams and Williams [39] in centralized algorithms that revealed the relationship between the APSP and triangle detection, via the computation of the distance product of two matrices. More precisely, our approach reduces the APSP to the problem of identifying all the edges of the graph that are involved in (at least) one negative triangle, under the promise that each edge is involved in at most negative triangles.
In order to solve the latter problem, we would like to design an algorithm running a quadratic number of instances of negative-triangle detection simultaneously, since in the worst case edges involved in negative triangles need to be detected. Due to the fact that the query sequence generated by a single run of the distributed version of Grover’s algorithm is a quantum superposition, a naive parallelization would result in high congestion of query messages, causing delays and degradation of the running time. To overcome this difficulty, we develop a novel machinery ensuring that all the parallel runs of the quantum searches are fairly load balanced, which resolves the problem of congestions. This is done by analyzing carefully the error probability of multiple quantum searches and showing that (for the problem considered) ignoring the queries that are not load balanced does not decrease significantly the success probability.
Other related works. As already mentioned, triangle detection and matrix multiplication are closely related to the APSP problem. There are several results considering those problems in the CONGEST or CONGEST-CLIQUE models [8, 4, 26, 24, 33, 5, 6]. In the CONGEST-CLIQUE model, in particular, an -round algorithm for listing all triangles is proposed by Dolev et al. [8]. This algorithm is combinatorial (i.e., non-algebraic) and thus works for listing negative triangles as well. Combined with our reduction from APSP to negative triangles, this can be used to construct a classical distributed APSP algorithm in the CONGEST-CLIQUE with the same complexity as the algorithm by Censor-Hillel [4]. While there exist faster algorithms for triangle detection [4, 9, 26], all these faster algorithms are based on an algebraic approach (more precisely, a reduction to matrix multiplication over a ring), and cannot be used to find negative triangles (which corresponds to matrix multiplication over a semiring).
To our knowledge the present work is the first to consider the quantum CONGEST-CLIQUE model. We already mentioned the prior works [11, 27] on the quantum CONGEST model. Besides the vast literature on two-party quantum communication complexity (see, e.g., [40, 3, 7]), there exist a few works that considered other settings in quantum distributed computing. First, exact quantum protocols for leader election in anonymous networks have been developed by Tani et al. [38]. Gavoille et al. [14] then considered quantum distributed computing in the LOCAL model, and showed that for several fundamental problems, allowing quantum communication does not lead to any significant advantage. Very recently Le Gall et al. [28] showed that there nevertheless exist some computational problems for which quantum distributed computing can be much more powerful than classical distributed computing in the LOCAL model.
2 Preliminaries
General notations.
Given any positive integer , we use the notation to represent the set . Given a graph and any two sets , we write the set of pairs of vertices with , and . When we simply write . Finally, for any vertex we write the set of neighbors of .
Quantum CONGEST-CLIQUE model.
Recent definitions of the quantum CONGEST model [27] and the quantum LOCAL model [28] are obtained by starting with the corresponding classical model (classical CONGEST model and LOCAL model, respectively) and simply allowing nodes to send quantum information instead of classical information. In this paper we use the same approach to define a natural quantum version of the CONGEST-CLIQUE model.
In the classical CONGEST-CLIQUE model, nodes communicate with each other over a fully connected network by exchanging messages of bits in synchronous rounds. All links and nodes (corresponding to the edges and vertices of , respectively) are reliable and suffer no faults. Each node has a distinct identifier. In the quantum CONGEST-CLIQUE model the only difference is that the nodes can exchange quantum information: each message exchanged consists of quantum bits instead of bits in the classical case. In particular, initially the nodes of the network do not share any entanglement.
This paper will describe many classical algorithms and procedures that will be used for pre-processing and post-processing (or even used inside the main quantum part as a subprocedure). We will use many times (sometimes implicitly) the following Lemma by Dolev et al. [8].
Lemma 1**.**
[8]** In the CONGEST-CLIQUE model a set of messages in which no node is the source of more than messages and no node is the destination of more than messages can be delivered within two rounds if the source and destination of each message is known in advance to all nodes.
Graph-theoretic problems in the CONGEST-CLIQUE model.
When studying graph-theoretic problems such as the APSP problem in the classical or quantum CONGEST-CLIQUE model, the input is a graph consisting of nodes, i.e., the number of nodes of the graph is the same as the number of nodes of the communication network. This means that we can assign to each node of the network a distinct label . The input is given as follows: each node with label of the network receives the row of the adjacency matrix of corresponding to vertex of . The result of the computation is defined similarly: for the APSP the node with label should output the shortest distance from to all the other nodes in . We refer to [4] for details.
3 APSP and negative triangles
In this section we show how to reduce the APSP to finding all the edges involved in a negative triangle. We first define the latter problem and state the main technical result of this paper (Theorem 2). Then we show the computation of the distance product of a matrix reduces to this problem. Finally, we recall the standard reduction from APSP to the computation of the distance product and derive Theorem 1 from Theorem 2.
Finding the edges in negative triangles.
Consider an undirected weighted graph with weight function . For an edge , we use the notation instead of .
Definition 1**.**
Given three vertices , we say that the triple is a negative triangle in if , and are edges and the inequality holds.
For any pair , we use the notation to denote the number of negative triangles involving , i.e., We simply write when the graph is clear from the context.
We now define the main problem considered in this paper. This problem, which we denote FindEdges, asks to compute the list of all edges involved in a negative triangle. The formal definition of the problem is as follows.
FindEdges
Input: an undirected weighted graph distributed among the nodes
of the network (each node gets )
Output: each node outputs the list of all pairs such that
Let us now consider the version of this problem in which we have the promise for all pairs . It will actually be convenient to define a more general problem where there is an additional input , the promise only holds for the pairs in and we only require each node to output the edges in that are involved in a negative triangle. The definition of this version with promise, which we call FindEdgesWithPromise, follows.
FindEdgesWithPromise
Input: an undirected weighted graph and a set distributed
among the nodes of the network
(each node gets and the list of all pairs in containing )
Promise: for all pairs
Output: each node outputs the list of all pairs such that
It is not difficult to show a randomized reduction from solving FindEdges to solving instances of FindEdgesWithPromise. We state this reduction in the following proposition.
Proposition 1**.**
Assume there exists a -round algorithm that solves FindEdgesWithPromise with probability at least for some . Then there exists a -round algorithm that solves the problem FindEdges with probability at least .
Proof.
Let denote the -round algorithm for FindEdgesWithPromise. We construct an algorithm for FindEdges as follows.
; ; .
- 2.
While do:
- 2.1.
Sample each edge of with probability . Let be the subgraph of consisting only of the sampled edges.
- 2.2.
Apply the algorithm on input . Let be the output of the algorithm.
- 2.3.
; ; .
- 3.
Apply the algorithm on input . Let be the output of the algorithm.
- 4.
Output .
Let us call Algorithm the algorithm we just described. Its round complexity is .
Let us first analyze Algorithm under the assumption that Algorithm never makes any error. We will prove below by induction the following invariant for the while loop: when testing the exit condition “” at Step 2 of the while loop for some value , we have for all , and all the pairs such that are already contained in . This shows that at the end of the while loop we have for all , and all the pairs such that are contained in , where is the smallest integer such that . Since , the call to Algorithm at Step 3 then finds all the remaining pairs involved in negative triangles and the output at Step 4 is precisely the output of FindEdges.
The loop invariant is obviously satisfied for . Now assume that it is satisfied when for some and let us consider what is happening at Step 2.2. Consider any pair . From the induction hypothesis we have . Note that . Chernoff’s bound then implies
[TABLE]
which means that with probability at least the promise required to execute Algorithm is satisfied for all . Let us now consider a pair such that the inequality holds. We have
[TABLE]
and thus the pair is included in the output of Algorithm , and thus removed from (and added to ) at Step 2.3, with high probability. This proves that the loop invariant is satisfied for as well with probability at least .
We have thus shown that under the assumption that Algorithm never makes any error, our algorithm solves FindEdges with probability at least . Since the error probability of Algorithm is at most and is applied times, the union bound implies that our algorithm solves the problem FindEdges with probability at least . ∎
The main technical contribution of this paper is the following theorem, which is proved in Section 5.
Theorem 2**.**
There is a -round quantum algorithm that solves with probability the problem FindEdgesWithPromise in the CONGEST-CLIQUE model.
From distance products to negative triangles.
We first recall the definition of the distance product of two matrices.
Definition 2**.**
*Let and be two matrices with entries in . The distance product of and , denoted , is the matrix such that for all . *
Vassilevska Williams and Williams [39] proved a reduction from the computation of the distance product of two matrices and to computing the edges involved in negative triangles in a graph. We state this reduction in the following proposition.
Proposition 2**.**
[39]** Assume that there exists a -round algorithm for FindEdges. Then there exists a -round algorithm that computes the distance product of any two matrices with entries in .
Sketch of the proof.
Let be an arbitrary symmetric matrix with integer entries. Consider the undirected tripartite graph with and weight function for all , for all and for all . Observe that a triple with , and is a negative triangle if and only if
[TABLE]
which implies that the pair is involved in a negative triangle of if and only if
[TABLE]
Thus by finding all the pairs involved in a negative triangle, we learn for which pairs the above inequality holds. By starting with the all-zero matrix and doing binary search (adjusting each time each entry of the matrix ), the distance product can thus be computed by calling times an algorithm for FindEdges. More details can be found in [39]. ∎
From APSP to distance products and proof of Theorem 1.
We now recall how the APSP reduces to the computation of the distance product.111Our explanations focus on computing the lengths of the shortest paths. Using standard techniques (see for instance [4]), the approach can be adapted to return the shortest paths as well, at a cost of increasing the complexity only by a polylogarithmic factor. This is a standard reduction: we refer to, e.g., [41] for a reference in the centralized setting and to [4] for a discussion of the reduction in the CONGEST-CLIQUE model.
Let be a weighted directed graph on vertices with no self-loop. Assume that the graph has no negative cycle. Let us associate with the set . The graph can be encoded as an matrix in which
[TABLE]
for each . It is easy to check that the matrix , the -th power of the matrix with respect to the distance product, contains the distances between all pairs of vertices of . Moreover, this matrix can be computed using only matrix products. If the weights of the graph are integers in , then all the finite entries of the matrices arising during the computation of are between and . We summarize this result in the following proposition.
Proposition 3**.**
Assume that there exists a -round algorithm that computes the distance product of any two matrices with entries in . Then there exists a -round algorithm for the APSP with integer weights in .
Theorem 1 then follows from the reductions described in Propositions 1, 2, 3 and from Theorem 2. The success probability of the final quantum algorithm is , i.e., with probability all the nodes of the network output the correct answer.
4 Distributed multiple quantum searches
In this section we describe our quantum technique: distributed multiple quantum searches only using typical inputs.
4.1 Distributed quantum search
Here, we explain the basic framework for quantum distributed search developed in [27].
Description of the result. Let be a finite set and be a Boolean function over . Let be an arbitrary node of the network (e.g., an elected leader). Assume that node can evaluate the function in rounds: assume that there exists an -round classical distributed algorithm such that node , when receiving as input , outputs . Now consider the following problem: node should find one element such that (or decide that no such element exists). The trivial strategy is to compute for each one by one, which requires rounds. Le Gall and Magniez [27] showed that there exists a quantum distributed algorithm that solves this problem with high probability in rounds. While this result is described in [27] for the CONGEST model, it holds for the CONGEST-CLIQUE model as well.
Example. Let us show how the quantum distributed algorithm for the diameter from [27] can be described in this setting. Let be the vertex set of the graph considered. Fix an integer and define the function as follows: for any vertex we have if and only if the eccentricity of vertex is larger than . Solving the problem described in the previous paragraph enables us to decide whether the maximum eccentricity of a vertex (i.e., the diameter of the graph) is larger than , and repeating this process a logarithmic number of times for different values of (chosen via binary search) enables us to compute the diameter.222Ref. [27] then observed that in the CONGEST model the function can be evaluated by computing the eccentricity of the vertex and sending the information to the node , which can be done in rounds, where denotes the diameter of the graph. Thus the diameter can be computed in rounds. With a few additional improvements it is possible to obtain the better bound , see [27].
Technical details. The quantum distributed algorithm for search is obtained by implementing Grover’s well-known quantum search algorithm [17] in the distributed setting. We now explain how this works.
Let us define the two sets and and assume that . As usual when analyzing Grover’s algorithm, we make the convenient assumption (otherwise finding a solution is easy). Define the following two quantum states: and which are the uniform superpositions over all the elements in and , respectively. Let denote the subspace generated by these two quantum states. Grover’s algorithm starts from the quantum state corresponding to the uniform superposition over all the elements in . Note that belongs to and is easy to create. Grover’s algorithm then successively applies the unitary operator corresponding to and then a unitary operator independent of the function .333Here the term “unitary operator corresponding to ” means the unitary operator corresponding to the quantum circuit obtained by converting the classical algorithm into a quantum circuit. We typically denote this unitary operator by the same symbol , since there is no risk of confusion. The key observation of [27] is that this conversion preserves the complexity: if is an -round classical algorithm then the corresponding unitary operator can be implemented in rounds.
A crucial property is that any state in is mapped by to a state in , which means that for any the state of the system after the -th iteration can be written as for some complex numbers and such that . The analysis of Grover’s algorithm shows that by choosing such that we can guarantee that , which means that measuring the state gives an element with high probability. The total round complexity is thus .
Multiple searches. We now describe an easy generalization to multiple searches of the framework presented above. Let be a finite set and be Boolean functions over , for some integer . For each define the set and assume for convenience that .444This can easily be enforced by adding dummy solutions. Even if a dummy solution is introduced, if there is a real solution then Grover’s algorithm will output it after a few repetitions (since when there are more than one solution Grover’s algorithm outputs a random solution). Let be an arbitrary node of the network. Assume now that node can evaluate the functions simultaneously in rounds. More precisely, assume that there exists a -round classical distributed algorithm such that node , when receiving as input , outputs . Now consider the following problem: node should find one element in . The framework described above can easily be generalized to this problem by having node implement in parallel independent distributed quantum searches. This gives a quantum algorithm solving this problem with high probability in rounds.
4.2 Multiple searches only using typical inputs
We now show a stronger result for the multiple searches problem introduced in the previous subsection: we construct a quantum algorithm that solves the problem even if the evaluation procedure is correct only on inputs close to typical inputs. The motivation for this assumption on the evaluation procedure is as follows. In a typical application (e.g., the example in Section 4.1), the search domain represents nodes of the network and evaluation should be delegated to these nodes. In this case, at each evaluation step, the node then needs to send a query to the nodes corresponding to each coordinate of the input . Then if is mostly dominated by a single , e.g., , the communication link suffers high congestion due to the queries injected by . In this subsection we show that in some cases such “non-typical” inputs can be completely ignored, which solves this congestion problem.
Let us first introduce the following notation: for any real number , let denote the set of all such that for each its frequency in is at most (i.e., appears at most times in ). Note that when for some large enough , the set includes the “typical” elements of , i.e., the elements in which the frequencies of all are close to the frequencies in an element of chosen uniformly at random.
Suppose that instead of assuming the existence of an -round algorithm that simultaneously evaluates the functions on , we only assume that we have an -round classical distributed algorithm in which node outputs on an input but may output an error message (or an arbitrary output) on an input . Our key result is the following theorem, which shows that the same complexity as in Section 4.1 can be achieved in case is large enough so that works correctly both on typical elements from and on the solutions of the search problem.
Theorem 3**.**
Assume that . Assume the existence of an evaluation algorithm , as just described, for some real number such that . Finally, assume that
[TABLE]
There exists a -round quantum algorithm that outputs an element of with probability at least .
The proof of Theorem 3 can be found in the appendix. The basic idea behind the proof is fairly easy to describe. Let denote the -round quantum algorithm described in Section 4.1, which uses Algorithm (or more precisely, the quantum operator corresponding to ). The initial state of this algorithm is the uniform superposition over all elements of ; since is large enough most of these elements are in . The final state is close to the uniform superposition over all elements of ; all these elements are also in from the assumption. The algorithm of Theorem 3 is exactly the same as but uses (the quantum operator corresponding to) instead of (the quantum operator corresponding to) . Using instead of obviously only has a negligible impact at the beginning of computation and at the end of the computation. The main technical difficulty is to show that this has no significant impact at each step of the computation as well. We show this by proving that at any step of the computation the quantum state of the system is close to its projection on the vector space spanned by the basis vectors that are in .
5 Detecting Negative Triangles
In this section we present a -round quantum distributed algorithm that solves the problem FindEdgesWithPromise, which proves Theorem 2. Through the section represents the input of FindEdgesWithPromise, i.e., an undirected weighted graph on vertices that satisfies the promise for all .
5.1 Overall description of the algorithm
The description of our algorithm will use two partitions of the vertex set , which we now introduce. For the ease of presentation we assume that the three numbers , and are integers (otherwise we can simply round them to the next integers and slightly adjust the sizes of the sets). The first partition is an arbitrary partition of into subsets each containing elements. We denote the collection of subsets making this partition. The second partition is an arbitrary partition of into subsets each containing elements. We denote the collection of subsets making this partition. In addition to the labeling scheme described in Section 2, which labels the nodes of the network by elements of , our algorithm will also use the following two labeling schemes.
Second labeling scheme.
Let us write and observe that . We assign one distinct label from to each node of the network. We will simply write “node ” to refer to the node with label , for each triple . This labeling scheme will be used by the algorithm to decide which node should gather the information of the graph: node will gather the weights of all the edges and of the graph.
Third labeling scheme.
For each we have . We will describe below a procedure that partitions the set into sets each of size . These sets will be denoted , for . Our third labeling scheme assigns one distinct label to each node of the network. Again, we will simply write “node ” to refer to the node with label , for each triple . This labeling scheme will be used by the algorithm to distribute to search for triangles: node will be in charge of checking the existence of all the triangles involving one edge in the set .
The partition procedure.
We now describe how to construct the sets . For technical reasons it will be much more convenient to use a covering instead of a partition of , i.e., to allow some elements to appear more than once, and to construct the covering randomly rather than deterministically.
Consider the following process. Each node constructs the set as follows: starting with the empty set, each pair is added by the node to its set with probability . We say that the set is well-balanced if the inequality \big{|}\{v\in\bm{v}\>|\>\{u,v\}\in\Lambda_{x}(\bm{u},\bm{v})\}\big{|}\leq 100\cdot n^{1/4}\log n holds for all . The following lemma, which is proved by standard probabilistic arguments, shows that with high probability the sets created by this process are well-balanced and cover all the set .
Lemma 2**.**
With probability at least the following statements hold for all :
- (i)
* is well-balanced for each ;*
- (ii)
.
Proof.
Let us fix .
For any we have
[TABLE]
for each . Chernoff’s bound and the union bound imply that Condition (i) of the lemma thus holds with probability at least .
Let be an arbitrary pair in . For any , this pair is included in with probability . The probability that this pair is not included in any is thus
[TABLE]
Condition (ii) of the lemma thus holds with probability at least .
The statement of the lemma then follows from the above analyses and the union bound. ∎
Description and analysis of the algorithm.
Our algorithm is called ComputePairs and described in Figure 1. Let us analyze it step by step. Step 1 requires rounds, since hold. Step 2 performs the sampling described in Section 5.1, checks which sampled pairs are in and loads their weight. Step 2 can be implemented in rounds, since communication occurs only when all the sets are well-balanced. Lemma 2 implies that with probability at least the following two statements hold:
- (a)
Algorithm ComputePairs does not abort at Step 2;
- (b)
at the end of Step 2, each pair appears at least once at some node.
Note that when the algorithm does not abort, at the end of Step 2 each node keeps at most pairs (since the sets are all well-balanced). While the exact number of remaining pairs may naturally depend on the node, in order to simplify the notation we will assume that each node keeps precisely pairs.
Step 3 of Algorithm ComputePairs can easily be implemented in rounds in the classical setting. In the next subsections we prove the following statement, which shows that a quadratic speedup can be achieved in the quantum setting.
Proposition 4**.**
Step 3 of Algorithm ComputePairs can be implemented by a -round quantum algorithm that succeeds with probability at least .
Proposition 4 combined with the analysis done in this subsection shows that Algorithm ComputePairs solves the problem FindEdgesWithPromise with probability at least (from the union bound). Its overall complexity is . This proves Theorem 2.
Overview of the proof of Proposition 4.
Proposition 4 is proved by applying the methodology of Section 4 to perform simultaneous quantum searches over the search space . A crucial point of the analysis is to show how to implement the checking procedure in rounds. Let us discuss below the main difficulties that need to be overcome.
Consider the problem of checking, for some pair and some fixed , whether there exists for which is a negative triangle. This can be done easily as follows: node first sends the pair and the weight to node . Node then checks whether the inequality
[TABLE]
holds, which can be done locally from the information gathered at Step 1 of Algorithm ComputePairs, and sends back this information to node .
For each , node will execute simultaneously executions of this checking procedure (one for each value of ). Each node can thus receive, in the worst case, pairs during one call of the checking procedure, which would require rounds. To reduce the checking cost to rounds, as needed, we will partition the set into classes and use this partition to balance the load of the checking queries in order to avoid congestions.
The partitioning of is described in Section 5.2. It will in particular identify the triples of containing many edges from involved in negative triangles. These triples are the main source for the possible congestions in the checking procedure. A simple, but crucial, observation is that there cannot exist many such triples, since the promise of FindEdgesWithPromise guarantees that the total number of negative triangles in the graph is low. This observation is the key idea on which the implementation of the load balancing is based.
5.2 Implementation of Step 3: Dividing the set into classes
Let us first introduce a crucial definition.
Definition 3**.**
For any , let be the following quantity:
[TABLE]
The goal of this subsection is to divide the set of triples into classes according to the value of . Since we do not know how to compute exactly this value efficiently, we actually need to define the classification based on an approximation of that can be computed efficiently. In Figure 2 we describe a classical algorithm called IdentifyClass that either aborts or assign a nonnegative integer to each node . Note that the complexity of the algorithm is rounds: Step 1 can obviously be implemented in rounds and Step 3 does not require any communication. In the case where the algorithm does not abort, we write the set of all triples such that , for each integer . This defines a partition of the set . We now show that with high probability the algorithm does not abort and the partition indeed classifies the triples according to the value of .
Proposition 5**.**
With probability at least , Algorithm IdentifyClass does not abort and the partition satisfies the following conditions:
- (i)
for any , the inequality holds;
- (ii)
for any and any , the inequalities hold.
Proof of Proposition 5.
Let us first compute the probability that the protocol does not abort. For each node , let be the random variable representing the number of neighbors chosen by , i.e., . Observe that
[TABLE]
Chernoff’s bound implies the inequality
[TABLE]
The probability that the protocol does not abort is thus , from the union bound.
We now consider the probability that Conditions (i) and (ii) hold. Let us consider an arbitrary triple . The expectation of the random variable is
[TABLE]
We divide our analysis into three cases.
- •
The case where . Chernoff’s bound shows that
[TABLE]
Thus with probability at least .
- •
The case where and , for some . Chernoff’s bound implies that
[TABLE]
Thus with probability at most .
- •
Finally, the case for some . Chernoff’s bound implies that
[TABLE]
Thus with probability at most .
We conclude that the probability that the outputs of all the nodes satisfy Conditions (i) and (ii) is at least , from the union bound.
Finally, the union bound again guarantees that the probability that the protocol does not abort and all the nodes satisfy Conditions (i) and (ii) is at least . ∎
5.3 Implementation of Step 3: Details and proof of Proposition 4
In this subsection we describe the details of the implementation of Step 3 in Algorithm ComputePairs, which is the only part of the algorithm that uses quantum computation.
The nodes first apply Algorithm IdentifyClass. Proposition 5 guarantees that with probability at least Algorithm IdentifyClass does not abort and the partition satisfies the two conditions of the proposition. In all this subsection we will assume that this happens.
Let us write
[TABLE]
for any and any . We will later use the following two lemmas that are direct consequences of the bounds given in Proposition 5.
Lemma 3**.**
With probability at least the inequality
[TABLE]
holds for all , all and all .
Proof.
Let us fix . Consider any , any and any . Observe that
[TABLE]
Chernoff’s bound implies that the inequality holds with probability at most . The statement of the lemma then follows from the union bound. ∎
Lemma 4**.**
The following inequality holds for all and all :
[TABLE]
Proof.
This is obviously true for . Let us now consider any and any . Remember that we are assuming that for all pairs . We thus have
[TABLE]
Combining this upper bound with the lower bound of Statement (ii) of Proposition 5 gives the claimed upper bound on . ∎
To implement Step 3 of Algorithm ComputePairs, the strategy is to consider each separately and perform simultaneous quantum searches over , as outlined in Figure 3. We first describe in Section 5.3.1 how to implement these quantum searches in rounds for the case , and then in Section 5.3.1 how to achieve the same complexity for the case .
5.3.1 Analysis of Step 3.2 for
In Step 3.2 each node executes simultaneous quantum searches. In order to describe this process using the framework presented in Section 4, with and , we need to explain the evaluation procedure. Since , we have . For simplicity (but without loss of generality) we assume below that . Observe that the evaluation procedure should implement the following test: each node , when evaluating a list of elements in , should check for each whether there exists a vertex such that is a negative triangle.
Let denote the list consisting of all the pairs such that , for each node and each . We make the assumption that for all and all and describe an evaluation procedure that works under this assumption. The procedure is described in Figure 4.
The procedure of Figure 4 obviously always outputs the correct answers since for each and each , Inequality (2) at Step 2 precisely checks if there exists some such that is a negative triangle (because the pair is sent to node ). We now analyze its complexity. Since each list contains at most elements, at Step 1 each node sends at most elements to for each . Conversely, each node receives at most elements from for each . Thus, in the CONGEST-CLIQUE model, Step 1 can be implemented in rounds. Testing whether Inequality (2) holds or not at Step 2 can be done locally using the information collected at Step 1 of Algorithm ComputePairs. Sending back the information at Step 2 can be done with the same complexity as in Step 1. The complexity of the checking procedure is thus rounds.
We can apply Theorem 3 with and . Lemma 3 guarantees that with probability at least , the assumptions in the statement of Theorem 3 are satisfied. Theorem 3 then implies that for the quantum searches of Step 3.2 of Algorithm ComputePairs can be implemented in rounds and succeed with probability at least .
5.3.2 Analysis of Step 3.2 for
The analysis of the complexity of the approach presented in Section 5.3.1 crucially relied on the inequality from Lemma 3, which guarantees that . For and , Lemma 3 only gives the weaker upper bound
[TABLE]
The upper bound from Lemma 4 is the key observation that will make possible to solve this technical issue.
In Section 5.3.1 each node communicated with node for each . We used the upper bound in the analysis. In the case we can use the better upper bound from Lemma 4, which reduces the number of destination nodes by (roughly) a factor . In consequence, we can increase the bandwidth towards these destinations nodes by (roughly) a factor . (This can be done by duplicating the information owned by the destination nodes.) We will show that this is enough to counterbalance the increase by a factor of the message size due to Inequality (3).
We now give more details about the idea of duplicating information to increase the bandwidth. We introduce a new labeling scheme. For the ease of presentation let us assume that is an integer (if this is not the case the scheme just need to be slightly adapted). In the new scheme each node is assigned a distinct label in . Lemma 4 ensures that this can be done.
Similarly to Section 5.3.1, let denote the list consisting of all the pairs such that , for each node and each . We make the assumption that for all and describe an evaluation procedure that works under this assumption. The procedure is described in Figure 5. The main difference with the procedure in Section 5.3.1 is that instead of sending the whole list we divide it in sublists and send the sublist to for each . Another difference is Step 0: each node first duplicates its input by broadcasting it to all the nodes , which can be done in rounds using a randomized routing scheme.
We now analyze the complexity of Steps 1 and 2 of the evaluation procedure. Since each list contains at most elements, at Step 1 each node sends a list containing elements to
[TABLE]
nodes (here we used Lemma (4)). Conversely, each node receives elements from for each . Thus, in the CONGEST-CLIQUE model, Step 1 can be implemented in rounds. Testing whether Inequality (2) holds or not at Step 2 can be done locally using the information collected at Step 1. Sending back the information at the end of Step 2 can be done with the same complexity as in Step 1. The complexity of the checking procedure is thus rounds.
We can apply Theorem 3 with and . Lemma 3 guarantees that with probability at least , the assumptions in the statement of Theorem 3 are satisfied. Theorem 3 then implies that for as well the quantum searches of Step 4 of Algorithm ComputePairs can be implemented in rounds and succeed with probability at least .
Acknowledgements
TI was partially supported by JST SICORP and JSPS KAKENHI grants No. 16H02878 and No. 19K11824. FLG was partially supported by JSPS KAKENHI grants No. 15H01677, No. 16H01705, No. 16H05853 and No. 19H04066.
Appendix A Distributed multiple quantum searches
In this appendix we prove Theorem 3.
Let denote the -round quantum algorithm described at the end of Section 4.1. Remember that this algorithm implements in parallel independent executions of Grover’s algorithm and uses Algorithm as a global evaluation procedure. We first analyze this algorithm in more details. For any string let us define the quantum state
[TABLE]
where
[TABLE]
for each . Let denote the Hilbert space spanned by all the quantum states in the set . An important observation is that Algorithm leaves the space invariant. The initial state of Algorithm is
[TABLE]
which is in . For each , one step of the algorithm maps the state to the state
[TABLE]
where is a unitary operator independent of the function and represents the unitary operator corresponding to the quantum circuit obtained by converting the classical algorithm into a quantum circuit. Analyzing Grover’s algorithm shows that after iterations the quantum state becomes close to the state , and thus measuring this state gives an element from with high probability. This success probability can be amplified to (for instance) by repeating the algorithm a logarithmic number of time.
Let be exactly the same algorithm as but with each application of the quantum circuit corresponding to replaced by an application of the quantum circuit corresponding to . Let us analyze the output of . As in Section 4.1, we make the assumption , for all . Let denote the Hilbert space spanned by all vectors with , and denote the Hilbert space spanned by all with . Let denote the projection into . We first show the following crucial lemma.
Lemma 5**.**
Assume that and . For any quantum state we have
[TABLE]
Proof.
The state can be written as
[TABLE]
for some amplitude such that . Observe that
[TABLE]
since all the vectors are orthogonal. We show below that the inequality
[TABLE]
holds for any . The claimed upper bound on then immediately follows.
Consider a string . Let us assume, without loss of generality, that is the string with [math]s in the first positions, followed by s in the next positions, for some integer . The state is thus the uniform superposition of all the states for all . For any choice of , we claim that the fraction of such that is at most
[TABLE]
This immediately implies Inequality (4).
Let us prove the claim. Remember that we are assuming . For any , we thus know that there are at most indices such that . For each , the probability that an element taken uniformly at random from equals is at most . When is chosen uniformly at random in , the expected number of times appears is thus at most
[TABLE]
where we used the assumption for the last inequality. Chernoff’s bound implies that the probability that appears more than times is at most
[TABLE]
and the claim then follows from the union bound. ∎
We can now analyze the output of Algorithm and prove Theorem 3.
Proof of Theorem 3.
Let denote the state at the -th iteration when executing Algorithm . Initially we have . For any let us write
[TABLE]
where and are the projections of into and , respectively, and and are the projections of into and , respectively. Note that for all .
We have
[TABLE]
where we used Lemma 5 to obtain the last inequality. We conclude that for any we have
[TABLE]
where we used the assumption to derive the last inequality. This implies that the output of Algorithm is the same as the output of Algorithm with probability at least . The output of is thus correct with probability at least , from the union bound. ∎
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1[1] Ruben Becker, Andreas Karrenbauer, Sebastian Krinninger, and Christoph Lenzen. Near-optimal approximate shortest paths and transshipment in distributed and streaming models. In Proceedings of the International Symposium on Distributed Computing (DISC) , pages 7:1–7:16, 2017.
- 2[2] Aaron Bernstein and Danupon Nanongkai. Distributed exact weighted all-pairs shortest paths in near-linear time. In Proceedings of the 51st ACM Symposium on Theory of Computing , 2019 (to appear). Ar Xiv:1811.03337.
- 3[3] Anne Broadbent and Alain Tapp. Can quantum mechanics help distributed computing? SIGACT News , 39(3):67–76, 2008.
- 4[4] Keren Censor-Hillel, Petteri Kaski, Janne H. Korhonen, Christoph Lenzen, Ami Paz, and Jukka Suomela. Algebraic methods in the congested clique. Distributed Computing , March 2016.
- 5[5] Yi-Jun Chang, Seth Pettie, and Hengjie Zhang. Distributed triangle detection via expander decomposition. In Proceedings of the ACM-SIAM Symposium on Discrete Algorithms (SODA) , pages 821–840, 2019.
- 6[6] Yi-Jun Chang and Thatchaphol Saranurak. Improved distributed expander decomposition and nearly optimal triangle enumeration. Ar Xiv:1904.08037, April 2019.
- 7[7] Vasil S. Denchev and Gopal Pandurangan. Distributed quantum computing: a new frontier in distributed systems or science fiction? SIGACT News , 39(3):77–95, 2008.
- 8[8] Danny Dolev, Christoph Lenzen, and Shir Peled. “Tri, Tri Again”: Finding triangles and small subgraphs in a distributed setting - (extended abstract). In Proceedings of the International Symposium on Distributed Computing (DISC) , pages 195–209, 2012.
