Skip to main content
CenXiv.org
This website is in trial operation, support us!
We gratefully acknowledge support from all contributors.
Contribute
Donate
cenxiv logo > cs > arXiv:2501.00111

Help | Advanced Search

Computer Science > Data Structures and Algorithms

arXiv:2501.00111 (cs)
[Submitted on 30 Dec 2024 ]

Title: Binary Jumbled Indexing: Suffix tree histogram

Title: 二进制混洗索引:后缀树直方图

Authors:Luís Cunha, Mário Medina
Abstract: Given a binary string $\omega$ over the alphabet $\{0, 1\}$, a vector $(a, b)$ is a Parikh vector if and only if a factor of $\omega$ contains exactly $a$ occurrences of $0$ and $b$ occurrences of $1$. Answering whether a vector is a Parikh vector of $\omega$ is known as the Binary Jumbled Indexing Problem (BJPMP) or the Histogram Indexing Problem. Most solutions to this problem rely on an $O(n)$ word-space index to answer queries in constant time, encoding the Parikh set of $\omega$, i.e., all its Parikh vectors. Cunha et al. (Combinatorial Pattern Matching, 2017) introduced an algorithm (JBM2017), which computes the index table in $O(n+\rho^2)$ time, where $\rho$ is the number of runs of identical digits in $\omega$, leading to $O(n^2)$ in the worst case. We prove that the average number of runs $\rho$ is $n/4$, confirming the quadratic behavior also in the average-case. We propose a new algorithm, SFTree, which uses a suffix tree to remove duplicate substrings. Although SFTree also has an average-case complexity of $\Theta(n^2)$ due to the fundamental reliance on run boundaries, it achieves practical improvements by minimizing memory access overhead through vectorization. The suffix tree further allows distinct substrings to be processed efficiently, reducing the effective cost of memory access. As a result, while both algorithms exhibit similar theoretical growth, SFTree significantly outperforms others in practice. Our analysis highlights both the theoretical and practical benefits of the SFTree approach, with potential extensions to other applications of suffix trees.
Abstract: 给定一个二进制字符串 $\omega$ 在字母表 $\{0, 1\}$ 上,向量 $(a, b)$ 是一个 Parikh 向量当且仅当 $\omega$ 的一个因子包含恰好 $a$ 次出现 $0$ 和 $b$ 次出现 $1$。 回答一个向量是否是$\omega$的 Parikh 向量的问题被称为二元混洗索引问题(BJPMP)或直方图索引问题。 大多数解决该问题的方法依赖于一个$O(n)$字长的空间索引来以常数时间回答查询,编码$\omega$的 Parikh 集合,即它的所有 Parikh 向量。 Cunha 等人(《组合模式匹配》,2017)引入了一种算法(JBM2017),该算法在$O(n+\rho^2)$时间内计算索引表,其中$\rho$是$\omega$中相同数字的连续段数量,最坏情况下达到$O(n^2)$。 我们证明了平均的 $\rho$ 的数量为 $n/4$,从而也确认了平均情况下的二次行为。 我们提出了一种新的算法 SFTree,该算法使用后缀树来移除重复的子字符串。 尽管由于依赖于运行边界,SFTree 在平均情况下的复杂度也是 $\Theta(n^2)$,但它通过向量化减少了内存访问开销,从而实现了实际改进。 后缀树还允许高效处理不同的子字符串,降低了内存访问的有效成本。 因此,虽然两种算法在理论上表现出相似的增长趋势, 但在实践中,SFTree 显著优于其他算法。 我们的分析突出了 SFTree 方法在理论和实践上的优势,并展示了其扩展到后缀树其他应用的潜力。
Comments: An extended abstract of this work was presented in COCOON 2024
Subjects: Data Structures and Algorithms (cs.DS)
MSC classes: 68R15, 68R05
ACM classes: E.1
Cite as: arXiv:2501.00111 [cs.DS]
  (or arXiv:2501.00111v1 [cs.DS] for this version)
  https://doi.org/10.48550/arXiv.2501.00111
arXiv-issued DOI via DataCite

Submission history

From: Luís Felipe Ignácio Cunha [view email]
[v1] Mon, 30 Dec 2024 19:16:51 UTC (420 KB)
Full-text links:

Access Paper:

    View a PDF of the paper titled
  • View Chinese PDF
  • View PDF
  • HTML (experimental)
  • TeX Source
  • Other Formats
license icon view license
Current browse context:
cs.DS
< prev   |   next >
new | recent | 2025-01
Change to browse by:
cs

References & Citations

  • NASA ADS
  • Google Scholar
  • Semantic Scholar
a export BibTeX citation Loading...

BibTeX formatted citation

×
Data provided by:

Bookmark

BibSonomy logo Reddit logo

Bibliographic and Citation Tools

Bibliographic Explorer (What is the Explorer?)
Connected Papers (What is Connected Papers?)
Litmaps (What is Litmaps?)
scite Smart Citations (What are Smart Citations?)

Code, Data and Media Associated with this Article

alphaXiv (What is alphaXiv?)
CatalyzeX Code Finder for Papers (What is CatalyzeX?)
DagsHub (What is DagsHub?)
Gotit.pub (What is GotitPub?)
Hugging Face (What is Huggingface?)
Papers with Code (What is Papers with Code?)
ScienceCast (What is ScienceCast?)

Demos

Replicate (What is Replicate?)
Hugging Face Spaces (What is Spaces?)
TXYZ.AI (What is TXYZ.AI?)

Recommenders and Search Tools

Influence Flower (What are Influence Flowers?)
CORE Recommender (What is CORE?)
IArxiv Recommender (What is IArxiv?)
  • Author
  • Venue
  • Institution
  • Topic

arXivLabs: experimental projects with community collaborators

arXivLabs is a framework that allows collaborators to develop and share new arXiv features directly on our website.

Both individuals and organizations that work with arXivLabs have embraced and accepted our values of openness, community, excellence, and user data privacy. arXiv is committed to these values and only works with partners that adhere to them.

Have an idea for a project that will add value for arXiv's community? Learn more about arXivLabs.

Which authors of this paper are endorsers? | Disable MathJax (What is MathJax?)
  • About
  • Help
  • contact arXivClick here to contact arXiv Contact
  • subscribe to arXiv mailingsClick here to subscribe Subscribe
  • Copyright
  • Privacy Policy
  • Web Accessibility Assistance
  • arXiv Operational Status
    Get status notifications via email or slack

京ICP备2025123034号