{"title":"Elastic-degenerate string comparison","authors":"Estéban Gabory , Moses Njagi Mwaniki , Nadia Pisanti , Solon P. Pissis , Jakub Radoszewski , Michelle Sweering , Wiktor Zuba","doi":"10.1016/j.ic.2025.105296","DOIUrl":null,"url":null,"abstract":"<div><div>An elastic-degenerate (ED) string <em>T</em> is a sequence of <em>n</em> sets <span><math><mi>T</mi><mo>[</mo><mn>1</mn><mo>]</mo><mo>,</mo><mo>…</mo><mo>,</mo><mi>T</mi><mo>[</mo><mi>n</mi><mo>]</mo></math></span> containing <em>m</em> strings in total whose cumulative length is <em>N</em>. We call <em>n</em>, <em>m</em>, and <em>N</em> the length, the cardinality and the size of <em>T</em>, respectively. The language of <em>T</em> is defined as <span><math><mi>L</mi><mo>(</mo><mi>T</mi><mo>)</mo><mo>=</mo><mo>{</mo><msub><mrow><mi>S</mi></mrow><mrow><mn>1</mn></mrow></msub><mo>⋯</mo><msub><mrow><mi>S</mi></mrow><mrow><mi>n</mi></mrow></msub><mspace></mspace><mo>:</mo><mspace></mspace><msub><mrow><mi>S</mi></mrow><mrow><mi>i</mi></mrow></msub><mo>∈</mo><mi>T</mi><mo>[</mo><mi>i</mi><mo>]</mo><mtext> for all </mtext><mi>i</mi><mo>∈</mo><mo>[</mo><mn>1</mn><mo>,</mo><mi>n</mi><mo>]</mo><mo>}</mo></math></span>. Given two ED strings, how fast can we check whether the two languages they represent have a nonempty intersection? We call this problem the <span>ED String Intersection</span> (EDSI) problem. For two ED strings <span><math><msub><mrow><mi>T</mi></mrow><mrow><mn>1</mn></mrow></msub></math></span> and <span><math><msub><mrow><mi>T</mi></mrow><mrow><mn>2</mn></mrow></msub></math></span> of lengths <span><math><msub><mrow><mi>n</mi></mrow><mrow><mn>1</mn></mrow></msub></math></span> and <span><math><msub><mrow><mi>n</mi></mrow><mrow><mn>2</mn></mrow></msub></math></span>, cardinalities <span><math><msub><mrow><mi>m</mi></mrow><mrow><mn>1</mn></mrow></msub></math></span> and <span><math><msub><mrow><mi>m</mi></mrow><mrow><mn>2</mn></mrow></msub></math></span>, and sizes <span><math><msub><mrow><mi>N</mi></mrow><mrow><mn>1</mn></mrow></msub></math></span> and <span><math><msub><mrow><mi>N</mi></mrow><mrow><mn>2</mn></mrow></msub></math></span>, respectively, we show the following:<ul><li><span>•</span><span><div>There is no <span><math><mi>O</mi><mo>(</mo><msup><mrow><mo>(</mo><msub><mrow><mi>N</mi></mrow><mrow><mn>1</mn></mrow></msub><msub><mrow><mi>N</mi></mrow><mrow><mn>2</mn></mrow></msub><mo>)</mo></mrow><mrow><mn>1</mn><mo>−</mo><mi>ϵ</mi></mrow></msup><mo>)</mo></math></span>-time algorithm, for any <span><math><mi>ϵ</mi><mo>></mo><mn>0</mn></math></span>, for EDSI even if <span><math><msub><mrow><mi>T</mi></mrow><mrow><mn>1</mn></mrow></msub></math></span> and <span><math><msub><mrow><mi>T</mi></mrow><mrow><mn>2</mn></mrow></msub></math></span> are over a binary alphabet, unless the Strong Exponential-Time Hypothesis is false.</div></span></li><li><span>•</span><span><div>There is no combinatorial <span><math><mi>O</mi><mo>(</mo><msup><mrow><mo>(</mo><msub><mrow><mi>N</mi></mrow><mrow><mn>1</mn></mrow></msub><mo>+</mo><msub><mrow><mi>N</mi></mrow><mrow><mn>2</mn></mrow></msub><mo>)</mo></mrow><mrow><mn>1.2</mn><mo>−</mo><mi>ϵ</mi></mrow></msup><mi>f</mi><mo>(</mo><msub><mrow><mi>n</mi></mrow><mrow><mn>1</mn></mrow></msub><mo>,</mo><msub><mrow><mi>n</mi></mrow><mrow><mn>2</mn></mrow></msub><mo>)</mo><mo>)</mo></math></span>-time algorithm, for any <span><math><mi>ϵ</mi><mo>></mo><mn>0</mn></math></span> and any function <em>f</em>, for EDSI even if <span><math><msub><mrow><mi>T</mi></mrow><mrow><mn>1</mn></mrow></msub></math></span> and <span><math><msub><mrow><mi>T</mi></mrow><mrow><mn>2</mn></mrow></msub></math></span> are over a binary alphabet, unless the Boolean Matrix Multiplication conjecture is false.</div></span></li><li><span>•</span><span><div>An <span><math><mi>O</mi><mo>(</mo><msub><mrow><mi>N</mi></mrow><mrow><mn>1</mn></mrow></msub><mi>log</mi><mo></mo><msub><mrow><mi>N</mi></mrow><mrow><mn>1</mn></mrow></msub><mi>log</mi><mo></mo><msub><mrow><mi>n</mi></mrow><mrow><mn>1</mn></mrow></msub><mo>+</mo><msub><mrow><mi>N</mi></mrow><mrow><mn>2</mn></mrow></msub><mi>log</mi><mo></mo><msub><mrow><mi>N</mi></mrow><mrow><mn>2</mn></mrow></msub><mi>log</mi><mo></mo><msub><mrow><mi>n</mi></mrow><mrow><mn>2</mn></mrow></msub><mo>)</mo></math></span>-time algorithm for outputting a compact representation of the intersection language of two unary ED strings. When <span><math><msub><mrow><mi>T</mi></mrow><mrow><mn>1</mn></mrow></msub></math></span> and <span><math><msub><mrow><mi>T</mi></mrow><mrow><mn>2</mn></mrow></msub></math></span> are given in a compact representation, we show that the problem is NP-complete.</div></span></li><li><span>•</span><span><div>An <span><math><mi>O</mi><mo>(</mo><msub><mrow><mi>N</mi></mrow><mrow><mn>1</mn></mrow></msub><msub><mrow><mi>m</mi></mrow><mrow><mn>2</mn></mrow></msub><mo>+</mo><msub><mrow><mi>N</mi></mrow><mrow><mn>2</mn></mrow></msub><msub><mrow><mi>m</mi></mrow><mrow><mn>1</mn></mrow></msub><mo>)</mo></math></span>-time algorithm for EDSI.</div></span></li><li><span>•</span><span><div>An <span><math><mover><mrow><mi>O</mi></mrow><mrow><mo>˜</mo></mrow></mover><mo>(</mo><msubsup><mrow><mi>N</mi></mrow><mrow><mn>1</mn></mrow><mrow><mi>ω</mi><mo>−</mo><mn>1</mn></mrow></msubsup><msub><mrow><mi>n</mi></mrow><mrow><mn>2</mn></mrow></msub><mo>+</mo><msubsup><mrow><mi>N</mi></mrow><mrow><mn>2</mn></mrow><mrow><mi>ω</mi><mo>−</mo><mn>1</mn></mrow></msubsup><msub><mrow><mi>n</mi></mrow><mrow><mn>1</mn></mrow></msub><mo>)</mo></math></span>-time algorithm for EDSI, where <em>ω</em> is the matrix multiplication exponent; the <span><math><mover><mrow><mi>O</mi></mrow><mrow><mo>˜</mo></mrow></mover></math></span> notation suppresses factors that are polylogarithmic in the input size.</div></span></li></ul></div></div>","PeriodicalId":54985,"journal":{"name":"Information and Computation","volume":"304 ","pages":"Article 105296"},"PeriodicalIF":0.8000,"publicationDate":"2025-03-14","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Information and Computation","FirstCategoryId":"94","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S089054012500032X","RegionNum":4,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q3","JCRName":"COMPUTER SCIENCE, THEORY & METHODS","Score":null,"Total":0}
引用次数: 0
Abstract
An elastic-degenerate (ED) string T is a sequence of n sets containing m strings in total whose cumulative length is N. We call n, m, and N the length, the cardinality and the size of T, respectively. The language of T is defined as . Given two ED strings, how fast can we check whether the two languages they represent have a nonempty intersection? We call this problem the ED String Intersection (EDSI) problem. For two ED strings and of lengths and , cardinalities and , and sizes and , respectively, we show the following:
•
There is no -time algorithm, for any , for EDSI even if and are over a binary alphabet, unless the Strong Exponential-Time Hypothesis is false.
•
There is no combinatorial -time algorithm, for any and any function f, for EDSI even if and are over a binary alphabet, unless the Boolean Matrix Multiplication conjecture is false.
•
An -time algorithm for outputting a compact representation of the intersection language of two unary ED strings. When and are given in a compact representation, we show that the problem is NP-complete.
•
An -time algorithm for EDSI.
•
An -time algorithm for EDSI, where ω is the matrix multiplication exponent; the notation suppresses factors that are polylogarithmic in the input size.
期刊介绍:
Information and Computation welcomes original papers in all areas of theoretical computer science and computational applications of information theory. Survey articles of exceptional quality will also be considered. Particularly welcome are papers contributing new results in active theoretical areas such as
-Biological computation and computational biology-
Computational complexity-
Computer theorem-proving-
Concurrency and distributed process theory-
Cryptographic theory-
Data base theory-
Decision problems in logic-
Design and analysis of algorithms-
Discrete optimization and mathematical programming-
Inductive inference and learning theory-
Logic & constraint programming-
Program verification & model checking-
Probabilistic & Quantum computation-
Semantics of programming languages-
Symbolic computation, lambda calculus, and rewriting systems-
Types and typechecking