Commit 593d1521 authored by Filip Stedronsky's avatar Filip Stedronsky
Browse files

Succinct: SOLE: fix redundancy calculations

parent acb06725
import sole_common;
blocks(0, "...", "B", "B", "EOF");
mixarrow(0, 1);
thruarrow(0,3);
blocks(1, "...", "B+i", "B-i", "B+j");
mixarrows(1, 0, 4);
blocks(2, "...", "B", "B", "B");
thruarrows(0, 1, 3);
blocks(1, "...", "B+1", "B+1", "B+1", "0");
mixarrows(1, 1, 4);
blocks(2, "...", "B-i", "B+j", "B-j", "B+k", "0");
mixarrows(2, 0, 6);
blocks(3, "...", "B", "B", "B", "B", "B");
......@@ -165,28 +165,24 @@ odd-numbered blocks have smaller alphabets than even-numbered ones. The second
pass runs phase shifted by one block and converts the variable-alphabet blocks
into blocks with alphabet $[B]$.
What is the redundancy of this scheme? That depends on whether the original
number of blocks (after padding) is even or odd. Figure \figref{sole} showed
the case for an odd number. For an even number, the ending is a little bit different
(fig. \figref{sole_even}).
You can easily check that this is reversible: after performing the inverse of
pass 2, the last block will always be either 0 (for the odd case) or EOF (for
the even case).
\figure[sole_even]{sole_even.pdf}{}{SOLE alphabet re-encoding scheme, alternate ending with even number of blocks}
What is the redundancy of this scheme?
Now we can finally analyze redundancy. Let us count how the number of blocks
increases throughout the encoding passes.
increases throughout the encoding passes:
\tightlist{o}
\: If the original length was a multiple of $b$, we must add one block to complete padding.
\: We always add one block with EOF character.
\: In the first pass, number of blocks does not increase.
\: In the second pass, we may need to add an extra padding block to make number of blocks odd.
\: Before the first pass, we may need to add an extra padding block to make number of blocks even.
\: Before the second pass, we always add an extra padding block to make number of blocks odd.
\endlist
In total, we add at most 3 blocks. Thus $r(n) \le 3B$. That is a constant
In total, we add at most 4 blocks. Thus $r(n) \le 4b$. That is a constant
and thus we have a succinct scheme.
Also not that this representation is locally decodable and modifiable -- each input
block affects at most 4 output blocks.
Now we need to check that all the alphabet translations are valid.
\section{Succinct representation of arbitrary-alphabet strings}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment