Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong lemma in two_way_notes.txt #132088

Open
hugopm opened this issue Apr 4, 2025 · 6 comments
Open

Wrong lemma in two_way_notes.txt #132088

hugopm opened this issue Apr 4, 2025 · 6 comments
Labels
docs Documentation in the Doc dir

Comments

@hugopm
Copy link

hugopm commented Apr 4, 2025

Hi @sweeneyde @tim-one

I think there is a wrong claim in the notes about two-way algorithm.

If p is a substring of s and p has period r, then the period
of s is either equal to r or greater than len(p).

Let s = (abcccd)^2 = abcccdabcccd and p = ccdabcc of length len(p) = 7 and period r = 5.

The period of the whole string s is 6, which is strictly greater than r but strictly smaller than len(p).

@picnixz picnixz added the docs Documentation in the Doc dir label Apr 4, 2025
@StanFromIreland

This comment has been minimized.

@AA-Turner

This comment has been minimized.

@StanFromIreland

This comment has been minimized.

@picnixz

This comment has been minimized.

@StanFromIreland

This comment has been minimized.

@picnixz
Copy link
Member

picnixz commented Apr 5, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir
Projects
Status: Todo
Development

No branches or pull requests

4 participants