Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

2
  • 1
    $\begingroup$ What happens if, during the running of this algorithm, the "none is a substring of another" condition is violated by $s_{i1},...,s_{ik}, b_{n-k+1}$, where the $b$ string is the newly formed big string? Or is that the point? Gerhard "Sometimes Not Quick On Uptake" Paseman, 2015.10.06 $\endgroup$ Commented Oct 6, 2015 at 17:08
  • 3
    $\begingroup$ That can't really happen during the execution (except at the beginning). Suppose for contradiction that this happens first time when we merge $s_i$ and $s_j$ to obtain $b$, and now $s_k$ is contained in $b$. Now either $s_k$ was already contained in $s_i$ or $s_j$ (contradicting that it happened the first time), or the overlap of $s_k$ with $s_i$ is larger than the overlap between $s_i$ and $s_j$, contradicting that we executed the correct step. (my previous comment - now deleted - where I wrote that this can happen was wrong) $\endgroup$ Commented Oct 7, 2015 at 9:50