A note on quantum divide and conquer for minimal string rotation

Qisheng Wang

Abstract

Lexicographically minimal string rotation (LMSR) is a fundamental problem in string processing that has recently gained significant attention in quantum computing. While near-optimal quantum algorithms have been proposed, they often carry small overhead factors. This note investigates the quantum query complexity of LMSR and proposes improved algorithms using a refined quantum divide-and-conquer framework. For the function problem, we establish a query complexity of $\sqrt{n} \cdot 2^{O(\sqrt{\log n})}$, improving upon the previous best of $\sqrt{n} \cdot 2^{(\log n)^{1/2+\varepsilon}}$. For the decision problem, we improve the complexity to $O(\sqrt{n \log^3 n \log \log n})$. These improvements are achieved through algorithmic techniques such as preprocessing and level-wise optimization within a divide-and-conquer structure.

Introduction

The Lexicographically Minimal String Rotation (LMSR) problem asks: given a string $s$ of length $n$, find the starting index $k$ such that the rotated string starting at $k$ is alphabetically first among all possible rotations. For example, the minimal rotation of "banana" is "abanan" (starting at index 5).

LMSR is a cornerstone of string processing with diverse applications, including bioinformatics, graph theory, and identifying chemical structures. Classically, the problem is solvable in linear time $\Theta(n)$. In the quantum realm, researchers have sought to reach the $\tilde{O}(\sqrt{n})$ lower bound. While recent developments brought the complexity close to this target, a quasi-polylogarithmic overhead remained. This work focuses on shrinking that overhead by optimizing the recursive structures inherent in quantum divide-and-conquer algorithms.

Methodology: Refined Quantum Divide and Conquer

The core of the proposed algorithm is a Quantum Divide and Conquer approach. The string is partitioned into smaller blocks, and minimal rotations are identified within these blocks. An "exclusion rule" is then applied to prune the candidate space for the global minimum.

Fault-Tolerant Minimum Finding

A significant challenge in recursive quantum algorithms is error propagation. Quantum subroutines, such as minimum finding, are inherently probabilistic. Standard error-mitigation techniques like majority voting typically introduce a logarithmic overhead ($O(\log n)$) at each level of recursion.

This work circumvents this by employing fault-tolerant quantum minimum finding on bounded-error oracles. This technique allows for finding the minimum among candidates even when comparisons are noisy, without requiring the full logarithmic overhead at every recursive step. By refining the recurrence relation to eliminate the $O(\log b)$ factor previously required for error correction, the overall query complexity is significantly reduced.

Key Results and Improvements

The primary contribution of this work is the establishment of tighter upper bounds for both the function and decision versions of the LMSR problem.

Comparison of query complexities for the Lexicographically Minimal String Rotation (LMSR) problem across different algorithmic paradigms.

As shown in the table above, this work improves the worst-case quantum query complexity for the function problem to $\sqrt{n} \cdot 2^{O(\sqrt{\log n})}$. This represents a quasi-polylogarithmic improvement over the previous state-of-the-art result by Akmal and Jin (2022).

Applications in Chemistry

The improved algorithm has direct implications for organic chemistry, specifically in benzenoid identification. Benzenoids are often represented by a "boundary-edges code" (BEC). Identifying the "canonical" BEC—the unique representation of a molecule—is equivalent to finding the minimal string rotation. The algorithm presented here provides the fastest known quantum method for this task.

Discussion and Future Work

While this work significantly narrows the gap, a small quasi-polylogarithmic difference remains between the function version and the decision version of the problem. Current "adversary composition" tools in quantum complexity theory are primarily designed for Boolean cases, making it difficult to reach a clean $\tilde{O}(\sqrt{n})$ for index-finding problems.

The results suggest that "baby steps"—tiny polylogarithmic improvements at each level of a recursive "divide" phase—can lead to "giant steps" in overall complexity. A major open question is whether this refined framework can be generalized to other non-Boolean problems to achieve similar speedups. Future research will explore whether true polynomial speedups can be obtained solely by optimizing the levels of a quantum divide-and-conquer structure.

Summary updated

BibTeX
@article{wang2022note,
  author = {Qisheng Wang},
  title = {{A note on quantum divide and conquer for minimal string rotation}},
  journal = {Theoretical Computer Science},
  year = {2022},
  url = {https://openreview.net/forum?id=PcfqsWVSdK},
}
Figure