You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've had a look at the lemma and, unless I'm mistaken, this is indeed a counterexample. I'm not entirely sure about the definition of a "period" in this case. Is this the period of ccdabcc itself as a substring in s or is it the period of p as a string itself?
I think I should have a look at the CFT but I don't have much time for that. Tim would be more familiar with this.
Hi @sweeneyde @tim-one
I think there is a wrong claim in the notes about two-way algorithm.
cpython/Objects/stringlib/stringlib_find_two_way_notes.txt
Lines 352 to 353 in 255eb37
Let
s = (abcccd)^2 = abcccdabcccd
andp = ccdabcc
of lengthlen(p) = 7
and periodr = 5
.The period of the whole string
s
is 6, which is strictly greater thanr
but strictly smaller thanlen(p)
.The text was updated successfully, but these errors were encountered: