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 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.
The text was updated successfully, but these errors were encountered:
I found out that my claim works only when p!=n (Actually the original paragraph also turns out to have this assumption, but it is not explicitly written), so I propose changing the last paragraph wholly.
Now let us assume that $n$ is not divisible by $k$ . We show that this implies that the length of the answer is $n$ . We prove it by contradiction. Assuming there exists an answer, and the compression has length $p$ ( $p$ divides $n$, $p \neq n$ ). Then the last value of the prefix function has to be greater than $n - p$ , i.e. the suffix will partially cover the first block. Now consider the second block of the string. Since the prefix is equal with the suffix, and both the prefix and the suffix cover this block and their displacement relative to each other $k$ does not divide the block length $p$ (otherwise $k$ divides $n$ ). 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 this value divides $p$ it also divides $n$. Contradiction.
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.
The text was updated successfully, but these errors were encountered: