Dynamic Set IntersectionSupported by NSF grants CCF-1217338 and CNS-1318294 and a grant from the US-Israel Binational Science Foundation. This research was performed in part at the Center for Massive Data Algorithmics (MADALGO) at Aarhus University, which is supported by the Danish National Research Foundation grant DNRF84.

Dynamic Set Intersectionthanks: Supported by NSF grants CCF-1217338 and CNS-1318294 and a grant from the US-Israel Binational Science Foundation. This research was performed in part at the Center for Massive Data Algorithmics (MADALGO) at Aarhus University, which is supported by the Danish National Research Foundation grant DNRF84.

Tsvi Kopelowitz and Seth Pettie and Ely Porat University of Michigan University of Michigan Bar-Ilan University
Abstract

Consider the problem of maintaining a family of dynamic sets subject to insertions, deletions, and set-intersection reporting queries: given , report every member of in any order. We show that in the word RAM model, where is the word size, given a cap on the maximum size of any set, we can support set intersection queries in expected time, and updates in expected time. Using this algorithm we can list all triangles of a graph in expected time, where and is the arboricity of . This improves a 30-year old triangle enumeration algorithm of Chiba and Nishizeki running in time.

We provide an incremental data structure on that supports intersection witness queries, where we only need to find one . Both queries and insertions take expected time, where . Finally, we provide time/space tradeoffs for the fully dynamic set intersection reporting problem. Using words of space, each update costs expected time, each reporting query costs expected time where is the size of the output, and each witness query costs expected time.

1 Introduction

In this paper we explore the power of word level parallelism to speed up algorithms for dynamic set intersection and triangle enumeration. We assume a -bit word-RAM model, , with the standard repertoire of unit-time operations on -bit words: bitwise Boolean operations, left/right shifts, addition, multiplication, comparison, and dereferencing. Using the modest parallelism intrinsic in this model (sometimes in conjunction with tabulation) it is often possible to obtain a nearly factor- (or factor-) speedup over traditional algorithms. The Four Russians algorithm for boolean matrix multiplication is perhaps the oldest algorithm to use this technique. Since then it has been applied to computing edit distance [1], regular expression pattern matching [2], APSP in dense weighted graphs [3], APSP and transitive closure in sparse graphs [4, 5], and more recently, to computing the Fréchet distance [6] and solving 3SUM in subquadratic time [7, 8]. Refer to [9] for more examples.

Set Intersection.

The problem is to represent a (possibly dynamic) family of sets with total size so that given , one can quickly determine if (emptiness query) or report some (witness query) or report all members of . Let be an a priori bound on the size of any set. We give a randomized algorithm to preprocess in time such that reporting queries can be answered in expected time. Subsequent insertion and deletion of elements can be handled in expected time.

We give -space structures for the three types of queries when there is no restriction on the size of sets. For emptiness queries the expected update and query times are ; for witness queries the expected update and query times are ; for reporting queries the expected update time is and the expected query time is . These fully dynamic structures do not benefit from word-level parallelism. When only insertions are allowed we give another structure that handles both insertions and emptiness/witness queries in expected time.111These data structures offer a tradeoff between space , query time, and update time. We restricted our attention to here for simplicity.

3sum Hardness.

Data structure lower bounds can be proved unconditionally, or conditionally, based on the conjectured hardness of some problem. One of the most popular conjectures for conditional lower bounds is that the 3SUM problem (given real numbers, determine if any three sum to zero) cannot be solved in truly subquadratic (expected) time, i.e. time. Even if the inputs are integers in the range (the Integer3SUM problem), the problem is still conjectured to be insoluble in truly subquadratic (expected) time. See [10, 11, 8] and the references therein.

Pǎtraşcu in [10] showed that the Integer3SUM problem can be reduced to offline set-intersection, thereby obtaining conditional lower bounds for offline data structures for set-intersection. The parameters of this reduction were tightened by us in [11]. Converting a conditional lower bound for the offline version of a problem to a conditional lower bound for the incremental (and hence dynamic) version of the same problem is straightforward, and thus we can prove conditional lower bounds for the incremental (and hence dynamic) set intersection problems. In particular, we are able to show that conditioned on the Integer3SUM conjecture, for the incremental emptiness version either the update or query time must be at least time. This is discussed in more detail, including lower bounds for the reporting version, in Appendix A.

Related work.

Most existing set intersection data structures, e.g., [12, 13, 14], work in the comparison model, where sets are represented as sorted lists or arrays. In these data structures the main benchmark is the minimum number of comparisons needed to certify the answer. Bille, Pagh, and Pagh [15] also used similar word-packing techniques to evaluate expressions of set intersections and unions. Their query algorithm finds the intersection of sets with a total of elements in time, where is the size of the output. Cohen and Porat [16] designed a static -space data structure for answering reporting queries in time, which is only faster than the data structure presented here.

Triangle Enumeration.

Itai and Rodeh [17] showed that all triangles in a graph could be enumerated in time. Thirty years ago Chiba and Nishizeki [18] generalized [17] to show that time suffices, where is the arboricity of the graph. This algorithm has only been improved for dense graphs using fast matrix multiplication. The recent algorithm of Björklund, Pagh, Williams, and Zwick [19] shows that when the matrix multiplication exponent , triangle enumeration takes time. (The actual running time is expressed in terms of .) We give the first asymptotic improvement to Chiba and Nishizeki’s algorithm for graphs that are too sparse to benefit from fast matrix multiplication. Using our set intersection data structure, we can enumerate triangles in expected time.

For simplicity we have stated all bounds in terms of an arbitrary word size . When the factor becomes .

Overview of the paper.

The paper is structured as follows. In Section 2 we discuss a packing algorithm for (dynamic) set intersection, and in Section 3 we show how the packing algorithm for set intersection can be used to speed up triangle listing. In Section 4 we present our data structure for emptiness queries on a fully dynamic family of sets, with time/space tradeoffs. In Section 5 we combine the packing algorithm for set intersection with the emptiness query data structure to obtain a packed data structure for set intersection witness queries on an incremental family of sets. In Section 6 we present non-packed data structures for emptiness, witness, and reporting set intersection queries on a fully dynamic family of sets, with time/space tradeoffs. Finally, we discuss conditional lower bounds based on the 3SUM conjecture for dynamic versions of the set intersection problem in the Appendix.

2 Packing Sets

Theorem 2.1

A family of sets with can be preprocessed in linear time to facilitate the following set intersection queries. Given two , one can find a witness in in expected time and list all of the elements of in additional expected time. If then the query time is reduced to . Furthermore, updates (insertions/deletions of elements) to sets in can be performed expected time, subject to the constraint that .

Proof

Every set is split into buckets where . We pick a function from a pairwise independent family of hash functions and assign each element into a bucket . The expected number of elements from a set in each bucket is . We use a second hash function from another family of pairwise independent hash functions which reduces the universe size to . An value is represented with bits, the extra control bit being necessary for certain manipulations described below. For each and we represent as a packed, sorted sequence of -values. In expectation each occupies words, though some buckets may be significantly larger. Finally, for each bucket we maintain a lookup table that translates from to . If there is more than one element that is hashed to then all such elements are maintained in the lookup table via a linked list.

Notice that . Thus, we can enumerate by enumerating the intersections of all . Fix one such . We first merge the packed sorted lists and . Albers and Hagerup [20] showed that two words of sorted numbers (separated by control bits) can be merged using Batcher’s algorithm in time. Using this as a primitive we can merge the sorted lists and in time . Let be the resulting list, with control bits set to 0. Our task is now to enumerate all numbers that appear twice (necessarily consecutively) in . Let be with control bits set to 1. We shift one field to the right ( bit positions) and subtract it from .222The control bits stop carries from crossing field boundaries. Let be the resulting list, with all control bits reset to 0. A field is zero in iff it and its predecessor were identical, so the problem now is to enumerate zero fields. By repeated halving, we can distill each field to a single bit (0 for zero, 1 for non-zero) in time and then take the complement of these bits (1 for zero, 0 for non-zero). We have now reduced the problem to reading off all the 1s in a -bit word, which can be done in time per 1 using the most-significant-bit algorithm of [21].333This algorithm uses multiplication. Without unit-time multiplication [22] one can read off the 1s in time per 1. If then the instruction set is not as relevant since we can build -size tables to calculate most significant bits and other useful functions. For each repeated -value we lookup all elements in and with that value and report any occurring in both sets. Every unit of time spent in this step corresponds to an element in the intersection or a false positive.

The cost of intersecting buckets and is

where is the number of false positives. The expected value of is since the expected sizes of and are and for , . Thus, the expected runtime for a query is

It is straightforward to implement insertions and deletions in time in expectation. Suppose we must insert into . Once we calculate and we need to insert into the packed sorted list representing . Suppose that fits in one word; let it be , with all control bits set to 1.444If is larger we apply this procedure to each word of the list . It occupies words in expectation. With a single multiplication we form a word whose fields each contain and whose control bits are zero. If we subtract from and mask everything but the control bits, the most significant bit identifies the location of the successor of in . We can then insert into the sorted list in with masks and shifts. The procedure for deleting an element in time follows the same lines. ∎

3 A Faster Triangle Enumeration Algorithm

Theorem 3.1

Given an undirected graph with edges and arboricity , all triangles can be enumerated in expected time or in expected time if .

Proof

We will make use of the data structure in Theorem 2.1. To do this we first find an acyclic orientation of in which the out-degree of any vertex is . Such an orientation can be found in linear time using the peeling algorithm of Chiba and Nishizeki [18]. Define to be the set of out-neighbors of according to this orientation. Begin by preprocessing the family , where all sets have size . For each edge , enumerate all elements in the intersection . For each vertex in the intersection output the triangle . Since the orientation is acyclic, every triangle is output exactly once. There are set intersection queries, each taking time, aside from the cost of reporting the output, which is per triangle. ∎

4 Dynamic Emptiness Queries with Time/Space Tradeoff

Theorem 4.1

There exists an algorithm that maintains a family of dynamic sets using space where each update costs expected time, and each emptiness query costs expected time.

Proof

Each set maintains its elements in a lookup table using a perfect dynamic hash function. So the cost of inserting a new element into , deleting an element from , or determining whether some element is in is expected time. Let . We make the standard assumption that is always at least and at most for some natural number . Standard rebuilding de-amortization techniques are used if this is not the case.

The Structure.

We say a set is large if at some point , and since the last time was at least that large, its size was never less than . If is not large, and its size is at least then we say it is medium. If is neither large nor medium then it is small. Notice that the size of a small set is less than . Let be the sub-family of large and medium sets, and let . Notice that . For each set we maintain a unique integer , and an intersection-size dynamic look-up table of size such that for a large set we have . Adding and deleting entries from the table takes expected constant time using hashing. Due to the nature of our algorithm we cannot guarantee that all of the intersection-size tables will always be fully updated. However, we will guarantee the following invariant.

Invariant 1

For every two large sets and , and are correctly maintained.

Query.

For two sets where either or is not large, say , we determine if they intersect by scanning the elements in and using the lookup table for . The time cost is . If both sets are large, then we examine which determines the size of the intersection (by Invariant 1) and decide accordingly if it is empty or not. This takes time.

Insertions.

When inserting a new element into , we first update the lookup table of to include . Next, if was small and remained small then no additional work is done. Otherwise, for each we must update the size of in the appropriate intersection-size tables. This is done directly in time by determining whether is in , for each , via the lookup tables. We briefly recall, as mentioned above, that it is possible that some of the intersection-size tables will not be fully updated, and so incrementing the size of an intersection is only helpful if the intersection size was correctly maintained before. Nevertheless, as explained soon, Invariant 1 will be guaranteed to hold, which suffices for the correctness of the algorithm since the intersection-size tables are only used when intersecting two large sets.

The more challenging case is when becomes medium. If this happens we would like to increase by 1, assign to be the new , allocate and initialize in time, and for each we compute and insert the answer into and . This entire process is dominated by the the task of computing for each , taking a total of time, which could be as large as and is too costly. However, this work can be spread over the next insertions made into until becomes large. This is done as follows. When becomes medium we create a list of all of the large and medium sets at this time (without their elements). This takes time. Next, for every insertion into we compute the values of locations in by computing the intersection size of and each of sets from in time. For each such set we also update . By the time becomes large we will have correctly computed the values in for all of the sets in , and for every set we will have correctly computed . It is possible that between the time became medium to the time became large, there were other sets such as which became medium and perhaps even large, but . Notice that in such a case and so it is guaranteed that by the time both and are large, the indicators and are correctly updated, thereby guaranteeing that Invariant 1 holds. Thus the total cost of performing an insertion is expected time.

Deletions.

When deleting an element from , we first update the lookup table of to remove in expected time. If was small and remained small then no additional work is done. If was in then we scan all of the and check if is in in order to update the appropriate locations in the intersection-size tables. This takes time.

If was medium and now became small, we need to decrease by 1, remove the assignment to to be the new , delete , and for each we need to remove . In addition, in order to accommodate the update process of medium sized sets, for each medium set we must remove from if it was in there. ∎

Corollary 2

There exists an algorithm that maintains a family of dynamic sets using space where each update costs expected time, and each emptiness query costs expected time.

5 Incremental Witness Queries

Theorem 5.1

Suppose there exists an algorithm that maintains a family of incremental sets, each of size at most , such that set intersection witness queries can be answered in expected time and inserts can be performed in expected time. Then there exists an algorithm to maintain a family of incremental sets—with no upper bound on set sizes—that uses space and performs insertions and witness queries in expected time, where .

Proof

We make the standard assumption that is always at least and at most for some natural number . Standard rebuilding de-amortization techniques are used if this is not the case. In our context, we say that a set is large if its size is at least , and is medium if its size is between and . Each medium and large set maintains a stash of the at most last elements that were inserted into (these elements are part of ). This stash is the entire set if is medium. If is large then the rest of (the elements not in the stash) is called the primary set of . Stashes are maintained using algorithm with . Thus, answering intersection queries between two medium sets takes expected time.

We maintain for each medium and large set a witness table such that for any large set we have that is either an element (witness) in the intersection of and the primary set of , or null if no such element exists. This works in the incremental setting as once a witness is established it never changes. Since there are at most large sets and at most medium sets, the space usage is . If a query is between and and is large, then: (1) if is small we lookup each element in to see if it is in , (2) if is medium or large then we use the witness tables to see if there is a witness of an intersection between and the primary set of or between and the primary set of , and if there is no such witness then we use algorithm to intersect the stashes of and . In any case, the cost of a query is expected time. The details for maintaining these tables are similar to the details of maintaining the intersection-size array tables from Section 4.

Insertion.

When inserting an element into , if is small then we do nothing. If is medium then we add to the stash of in algorithm . If is large then we add to the stash of and verify for every other large set if is in that set, updating the witness table accordingly. If became medium then we add it to the structure of algorithm . Since the size of is this takes expected time. Furthermore, when becomes medium the table needs to be prepared. To do this, between the time is of size and the time is of size , the table is inclemently constructed. If became large then we now allow its primary set to be nonempty, and must also update the witness tables. The changes to witness tables in this case is treated using the same techniques as in Theorem 4.1, and so we omit their description. This will cost expected time.

Finally, for a large set , once its stash reaches size we dump the stash into the primary set of , thereby emptying the stash. We describe an amortized algorithm for this process, which is deamortized using a standard lazy approach. To combine the primary set and the stash we only need to update the witness tables for set intersection witnesses between medium sets and the new primary set of as it is possible that a witness was only in the stash. To do this, we directly scan all of the medium sets and check if a new witness can be obtained from the stash. The number of medium sets is and the cost of each intersection will be for a total of time. Since this operation only happens after insertions into the amortized cost is time.

Combining Theorem 2.1 with Theorem 5.1 we obtain the following.

Corollary 1

There exists an algorithm in the word-RAM model that maintains a family of incremental sets using space where each insertion costs expected time and a witness query costs expected time.

6 Fully Dynamic Set Intersection with Witness and Reporting Queries

Each element in is assigned an integer from the range of . When a new element not appearing in arrives, it is assigned to the smallest available integer, and that integer is used as its key. When keys are deleted (no longer in use), we do not remove their assignment, and instead, we conduct a standard rebuilding technique in order to reassign the elements. Finally, we use a second assignment via a random permutation of the integers in order to uniformly spread the assignments within the range.

The structure.

Consider the following binary tree of height where each vertex covers some range from , denoted by , such that the range of the root covers all of , and the left (right) child of covers the first (second) half of . A vertex at depth covers elements of . For a vertex let . Let . Let . We say a set is -large if at some point , and since the last time was at least that large, its size was never less than .

Each vertex with children and maintains a structure for emptiness queries as in Theorem 4.1, using space, on the family . In addition, we add auxiliary data to the intersection-size tables as follows. For sets the set of all vertices in which and intersect under them defines a connected tree . This tree has some branching vertices which have 2 children, some non-branching internal vertices with only 1 child, and some leaves. Consider the vertices in for which and are -large and define to be the connected component of these vertices that includes the root . (It may be that does not exist.) To facilitate a fast traversal of during a query we maintain shortcut pointers for every two sets and for every vertex such that both and are -large. To this end, we say is a branching--vertex if both and . Consider the path starting from the left (right) child of and ending at the first descendent of such that:(1) and are relatively large for all of the vertices on the path, (2) , and (3) either is a branching--vertex or one of the sets and is not -large. The left (right) shortcut pointer of will point to . Notice that the shortcut pointers are maintained for every vertex even if on the path from to there are some vertices for which either or are not relatively large, which helps to reduce the update time during insertions/deletions. Also notice that using these pointers it is straightforward to check in time if and are empty or not.

The space complexity of the structure is as follows. Each vertex uses words of space which is . So the space usage is words, since in each level of the sum of all for the vertices in that level is , and there are levels.

Reporting queries.

For a reporting query on and , if then either the emptiness test at the root will conclude in time, or we spend time. Otherwise, we recursively examine vertices in starting with the root . If both and are -large and , then we continue recursively to the vertices pointed to by the appropriate shortcut pointers. If either or is not -large then we wish to output all of the elements in the intersection of and . To do this, we check for each element in the smaller set if it is contained within the larger set using the lookup table which takes time.

For the runtime, as we traverse down from using appropriate shortcut pointers, we encounter only two types of vertices. The first type are vertices for which both and are -large, and the second type are vertices for which either or is not -large. Each vertex of the first type performs work, and the number of such vertices is at most the number of vertices of the second type, due to the branching nature of the shortcut pointers. For vertices of the second type, the intersection of and must both be non-empty relative to such vertices and so the time cost can be charged to at least one element in the output. Denote the vertices of the second type by . Notice that as each contains at least one element from the intersection, and that since the vertices are not ancestors of each other. We will make use of the following Lemma.

Lemma 3

If then .

Proof

Since is maximized whenever all the are equal, we have that . ∎

Therefore, the total time cost is

Witness queries.

A witness query is answered by traversing down using shortcut pointers, but instead of recursively looking at both shortcut pointers for each vertex, we only consider one. Thus the total time it takes until we reach a vertex for which either or is not -large is . Next, we use the hash function to find an element in the intersection in time, for a total of time to answer a witness query.

Insertions and Deletions.

When inserting a new element into , we first locate the leaf of which covers . Next, we update our structure on the path from to as follows. Starting from , for each vertex on the path we insert into . This incurs a cost of for updating the emptiness query structure at . If there exists some set such that becomes non-zero, then we may need to update some shortcut pointers on the path from to relative to and . Being that such a set must be large, the number of such sets is at most .

To analyze the expected running time of an insertion notice that since the elements in the universe are randomly distributed, the expected value of and for a vertex at depth are and respectively. So the number of -large sets is at most . The expected time costs of updating the emptiness structure is at most . The same analysis holds for the shortcut pointer. The deletion process is exactly the reverse of the insertions process, and also costs expected time.

The total space usage is . With a change of variable (substituting for in the construction above), we can make the space and obtain the following result.

Theorem 6.1

There exists an algorithm that maintains a family of dynamic sets using space where each update costs expected time, each reporting query costs time, and each witness query costs expected time.

References

  • [1] Masek, W.J., Paterson, M.: A faster algorithm computing string edit distances. J. Comput. Syst. Sci. 20(1) (1980) 18–31
  • [2] Myers, G.: A Four Russians algorithm for regular expression pattern matching. J. ACM 39(2) (1992) 432–448
  • [3] Chan, T.M.: More algorithms for all-pairs shortest paths in weighted graphs. SIAM J. Comput. 39(5) (2010) 2075–2089
  • [4] Chan, T.M.: All-pairs shortest paths for unweighted undirected graphs in time. ACM Transactions on Algorithms 8(4) (2012)  34
  • [5] Chan, T.M.: All-pairs shortest paths with real weights in time. Algorithmica 50(2) (2008) 236–243
  • [6] Buchin, K., Buchin, M., Meulemans, W., Mulzer, W.: Four Soviets walk the dog – with an application to Alt’s conjecture. In: Proceedings 25th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA). (2014) 1399–1413
  • [7] Baran, I., Demaine, E.D., Pǎtraşcu, M.: Subquadratic algorithms for 3SUM. Algorithmica 50(4) (2008) 584–596
  • [8] Grønlund, A., Pettie, S.: Threesomes, degenerates, and love triangles. In: Proceedings 55th IEEE Symposium on Foundations of Computer Science (FOCS). (2014) Full manuscript available as arXiv:1404.0799.
  • [9] Chan, T.M.: The art of shaving logs. In: Proceedings 13th Int’l Symposium on Algorithms and Data Structures (WADS). Volume 8037 of Lecture Notes in Computer Science. Springer (2013) 231–231
  • [10] Pǎtraşcu, M.: Towards polynomial lower bounds for dynamic problems. In: Proceedings 42nd ACM Symposium on Theory of Computing (STOC). (2010) 603–610
  • [11] Kopelowitz, T., Pettie, S., Porat, E.: 3sum hardness in (dynamic) data structures. CoRR abs/1407.6756 (2014)
  • [12] Demaine, E.D., López-Ortiz, A., Munro, J.I.: Adaptive set intersections, unions, and differences. In: Proceedings of the Eleventh Annual ACM-SIAM Symposium on Discrete Algorithms. (2000) 743–752
  • [13] Barbay, J., Kenyon, C.: Adaptive intersection and t-threshold problems. In: Proceedings 13th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA). (2002) 390–399
  • [14] Baeza-Yates, R.A.: A fast set intersection algorithm for sorted sequences. In: Combinatorial Pattern Matching, 15th Annual Symposium, CPM. (2004) 400–408
  • [15] Bille, P., Pagh, A., Pagh, R.: Fast evaluation of union-intersection expressions. In Tokuyama, T., ed.: ISAAC. Volume 4835 of Lecture Notes in Computer Science., Springer (2007) 739–750
  • [16] Cohen, H., Porat, E.: Fast set intersection and two-patterns matching. Theor. Comput. Sci. 411(40-42) (2010) 3795–3800
  • [17] Itai, A., Rodeh, M.: Finding a minimum circuit in a graph. SIAM J. Comput. 7(4) (1978) 413–423
  • [18] Chiba, N., Nishizeki, T.: Arboricity and subgraph listing algorithms. SIAM J. Comput. 14(1) (1985) 210–223
  • [19] Bjorklund, A., Pagh, R., Williams, V.V., Zwick, U.: Listing triangles. In: Automata, Languages, and Programming - 41st International Colloquium, ICALP 2014, Copenhagen, Denmark, July 8-11, 2014, Proceedings, Part I. (2014) 223–234
  • [20] Albers, S., Hagerup, T.: Improved parallel integer sorting without concurrent writing. Inf. Comput. 136(1) (1997) 25–51
  • [21] Fredman, M.L., Willard, D.E.: Surpassing the information theoretic bound with fusion trees. J. Comput. Syst. Sci. 47(3) (1993) 424–436
  • [22] Brodnik, A., Miltersen, P.B., Munro, J.I.: Trans-dichotomous algorithms without multiplication – some upper and lower bounds. In: Proceedings 5th Int’l Workshop on Algorithms and Data Structures (WADS). Volume 1272 of Lecture Notes in Computer Science. Springer Berlin Heidelberg (1997) 426–439

Appendix A Conditional Lower Bounds from 3sum

We first make use of the following Theorem, which was proven by Kopelowitz, Pettie, and Porat [11].

Theorem A.1 ([11])

For any constants and , let be an algorithm for the offline set intersection reporting problem on a family of sets such that and there are pairs of sets whose intersection needs to be reported such that the total size of these set intersections of these pairs is expected to be . If runs in expected time, then Integer3SUM can be solved in expected time.

Theorem A.2

(Set Intersection Reporting Lower Bound) For any constants and , any algorithm for solving the incremental set intersection reporting problem with insertion time of and query time (where is the size of the output) must have unless the Integer3SUM conjecture is false.

Proof

An algorithm for solving the incremental set intersection decision problem can be used to solve Integer3SUM via Theorem A.1 by first inserting all of the elements into their appropriate sets and then performing the queries. Therefore, unless the Integer3SUM conjecture is false, we have . Substituting completes the proof. ∎

Let us consider a few points on the lower bound curve of Theorem A.2. The coefficients of the terms , , and are equal when , which translates to . Thus, at least one of the operations must cost roughly time. Furthermore, if then so by making as small as possible and as large as possible we obtain . This matches a trivial algorithm where we explicitly maintain each set intersection. However, if then , and so by making as small as possible and setting we obtain . Finally, if then and so making and as large as possible we obtain .

Theorem A.3 ([11])

For any constant let be an algorithm for offline set intersection decision problem on a family of sets such that , and there are pairs of sets whose disjointness needs to be determined. If runs in expected time, then Integer3SUM can be solved in expected time.

Theorem A.4

(Set Intersection Emptiness Lower Bound) Fix . Any algorithm for solving the incremental set intersection emptiness problem with insertion time and query time of must have unless the Integer3SUM conjecture is false.

Proof

An algorithm for solving the incremental set intersection decision problem can be used to solve Integer3SUM via Theorem A.3 by first inserting all of the elements into their appropriate sets and then performing the queries. Therefore, unless the Integer3SUM conjecture is false, we have . Substituting completes the proof.

Let us consider a few points on the lower bound curve of Theorem A.4. The coefficients of the terms and are equal when , which translates to . Thus, at least one of the operations must cost roughly time. Furthermore, if then so by making as small as possible we obtain . Finally, if then so by making as large as possible we obtain .

Comments 0
Request Comment
You are adding the first comment!
How to quickly get a good reply:
  • Give credit where it’s due by listing out the positive aspects of a paper before getting into which changes should be made.
  • Be specific in your critique, and provide supporting evidence with appropriate references to substantiate general statements.
  • Your comment should inspire ideas to flow and help the author improves the paper.

The better we are at sharing our knowledge with each other, the faster we move forward.
""
The feedback must be of minimum 40 characters and the title a minimum of 5 characters
   
Add comment
Cancel
Loading ...
50893
This is a comment super asjknd jkasnjk adsnkj
Upvote
Downvote
""
The feedback must be of minumum 40 characters
The feedback must be of minumum 40 characters
Submit
Cancel

You are asking your first question!
How to quickly get a good answer:
  • Keep your question short and to the point
  • Check for grammar or spelling errors.
  • Phrase it like a question
Test
Test description