Skip to main content
QUICK REVIEW

[Paper Review] Quasi-Linear-Time Algorithm for Longest Common Circular Factor

Mai Alzamel, Maxime Crochemore|arXiv (Cornell University)|Jan 1, 2019
Algorithms and Data Compression28 references2 citations
TL;DR

This paper presents the first quasi-linear-time algorithm for the Longest Common Circular Factor (LCCF) problem, solving it in O(n log⁵ n) time and O(n log² n) space. The approach combines suffix arrays, synchronized fragments, Lyndon factorization, and geometric techniques to reduce the problem to intersecting compatible 4D rectangles, enabling efficient computation of the longest factor of S whose cyclic shift appears in T.

ABSTRACT

We introduce the Longest Common Circular Factor (LCCF) problem in which, given strings $S$ and $T$ of length $n$, we are to compute the longest factor of $S$ whose cyclic shift occurs as a factor of $T$. It is a new similarity measure, an extension of the classic Longest Common Factor. We show how to solve the LCCF problem in $O(n \log^5 n)$ time.

Motivation & Objective

  • To introduce and solve the Longest Common Circular Factor (LCCF) problem, a novel string similarity measure extending the classic Longest Common Factor (LCF).
  • To develop an efficient algorithm that computes the longest factor of string S whose cyclic shift occurs as a factor in string T.
  • To achieve a time complexity significantly below quadratic, aiming for quasi-linear performance despite the non-trivial nature of circular factor matching.
  • To demonstrate that the LCCF problem can be reduced to a geometric problem of intersecting 4D rectangles with compatibility constraints.

Proposed method

  • The algorithm uses suffix arrays and weighted ancestor queries to efficiently locate fragment occurrences and compute intervals of matching factors.
  • It applies τ-synchronizing functions to identify non-periodic fragments and Lyndon factorization to handle highly periodic cases.
  • The problem is reduced to checking intersections of 4D rectangles, where each rectangle encodes the positional constraints of a pair of consecutive fragments in S and T.
  • A sweep-line algorithm is used to solve the Max-Weight Intersection of Compatible Rectangles in 4D, with weights based on fragment lengths.
  • The method leverages the fact that occurrences of substrings form intervals in the suffix array, enabling range-based membership checks.
  • The solution combines internal pattern matching and geometric optimization to achieve the final time complexity.

Experimental results

Research questions

  • RQ1Can the Longest Common Circular Factor (LCCF) problem be solved in sub-quadratic time, given its extension of the classic LCF problem?
  • RQ2What is the optimal time complexity achievable for computing the longest factor of S whose cyclic shift appears as a factor in T?
  • RQ3How can the circular nature of the factor matching be efficiently encoded and queried using string data structures?
  • RQ4Can geometric techniques be effectively applied to internal string pattern matching problems with multiple constraints?

Key findings

  • The LCCF problem can be solved in O(n log⁵ n) time and O(n log² n) space, representing a significant improvement over naive approaches.
  • The algorithm achieves its efficiency by reducing the problem to the Max-Weight Intersection of Compatible Rectangles in 4D, solvable in O(m log³ m) time.
  • The use of synchronized fragments ensures that matching fragments in S and T are aligned consistently, enabling correct geometric encoding.
  • The method handles both non-periodic and highly periodic cases via separate strategies based on Lyndon factorization and synchronizing functions.
  • The solution is robust and general, supporting all possible types of circular factors by decomposing them into type-(a,b) components.
  • The algorithm is the first to achieve quasi-linear time complexity for the LCCF problem, leaving open the possibility of a linear-time solution.

Better researchstarts right now

From paper design to paper writing, dramatically reduce your research time.

No credit card · Free plan available

This review was created by AI and reviewed by human editors.