Skip to main content
QUICK REVIEW

[Paper Review] Counting Triangles under Updates in Worst-Case Optimal Time

Ahmet Kara, Hung Q. Ngo|arXiv (Cornell University)|Apr 9, 2018
Data Management and AlgorithmsComputer Science23 references9 citations
TL;DR

This paper introduces IVMǫ, a novel incremental view maintenance framework for counting triangles in a database under single-tuple updates. By partitioning relations into heavy and light parts based on attribute degrees and adapting evaluation strategies dynamically, IVMǫ achieves amortized update time of O(|D|^{max{ε,1−ε}}) and space usage of O(|D|^{1+min{ε,1−ε}}), with worst-case optimal update time conditioned on the Online Matrix-Vector (OMv) conjecture.

ABSTRACT

We consider the problem of incrementally maintaining the triangle count query under single-tuple updates to the input relations. We introduce an approach that exhibits a space-time tradeoff such that the space-time product is quadratic in the size of the input database and the update time can be as low as the square root of this size. This lowest update time is worst-case optimal conditioned on the Online Matrix-Vector Multiplication conjecture. The classical and factorized incremental view maintenance approaches are recovered as special cases of our approach within the space-time tradeoff. In particular, they require linear-time update maintenance, which is suboptimal. Our approach also recovers the worst-case optimal time complexity for computing the triangle count in the non-incremental setting.

Motivation & Objective

  • To address the gap in worst-case optimal incremental maintenance for triangle counting under single-tuple updates.
  • To overcome the suboptimal O(|D|) update time of classical and factorized IVM approaches.
  • To achieve a space-time trade-off where the product of space and amortized update time is quadratic in |D|.
  • To demonstrate that the proposed method achieves worst-case optimal update time under the OMv conjecture.
  • To unify and generalize existing IVM techniques under a single adaptive framework.

Proposed method

  • Partitions each input relation R, S, T into heavy and light parts based on the degree of attributes (e.g., degree of A in R is the number of B-values paired with A).
  • Uses a parameter ε ∈ [0,1] to tune the space-time trade-off: space is O(|D|^{1+min{ε,1−ε}}), update time is O(|D|^{max{ε,1−ε}}).
  • Employs adaptive evaluation strategies that vary based on the heavy-light composition of input relation parts to minimize update cost.
  • Maintains auxiliary views (e.g., VST(b,a) = Σ_c S(b,c)·T(c,a)) to enable constant-time delta computation for updates.
  • Rebalances partitions periodically to reflect changes in database size and attribute degrees, though rebalancing may take superlinear time.
  • Applies an optimization phase that discards redundant partitioning (e.g., of S) when it does not affect correctness or performance, reducing space and complexity.

Experimental results

Research questions

  • RQ1Can incremental triangle counting be maintained in amortized sublinear time under single-tuple updates?
  • RQ2Is there a space-time trade-off for incremental triangle counting such that the space-time product is O(|D|^2)?
  • RQ3Can the update time be made worst-case optimal under the OMv conjecture?
  • RQ4How does the proposed method generalize or unify classical, recursive, and factorized IVM approaches?
  • RQ5What is the impact of adaptive partitioning and view materialization on update and space complexity?

Key findings

  • IVMǫ achieves amortized update time of O(|D|^{max{ε,1−ε}}) and space usage of O(|D|^{1+min{ε,1−ε}}) for any ε ∈ [0,1], with preprocessing time O(|D|^{3/2}).
  • The method recovers classical IVM (O(|D|) update time) and factorized IVM (O(1) update for some relations) as special cases at the extremes of the ε parameter.
  • For 3R0 ∪ 3R1 queries, the optimization phase eliminates redundant partitioning, resulting in constant non-amortized update time and linear space.
  • The update time is worst-case optimal under the OMv conjecture, as shown via a reduction from the OuMv problem.
  • The framework supports exact incremental maintenance of triangle counts with tunable performance characteristics.
  • The approach also counts all triangles in a static database in worst-case optimal time, matching the lower bound for enumeration.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.