Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Error in "Compressing a string" section in "Prefix function. Knuth–Morris–Pratt algorithm" #1414

Open
@ohwphil

Description

@ohwphil

I think "But then the string consists of only one character repeated over and over, hence we can compress it to a string of size  $1$ ..." is false. Shouldn't it be written: "But then the string consists of$gcd(p, k)$ characters repeated over and over, hence we can compress it to a string of size$gcd(p, k)$, and since it divides$p$ it also divides$n$."

Example: k = 4, n = 12, p = 6.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp