Skip to content
Snippets Groups Projects
Commit 593d1521 authored by Filip Stedronsky's avatar Filip Stedronsky
Browse files

Succinct: SOLE: fix redundancy calculations

parent acb06725
Branches
No related tags found
No related merge requests found
import sole_common; import sole_common;
blocks(0, "...", "B", "B", "EOF"); blocks(0, "...", "B", "B", "EOF");
mixarrow(0, 1); thruarrows(0, 1, 3);
thruarrow(0,3); blocks(1, "...", "B+1", "B+1", "B+1", "0");
blocks(1, "...", "B+i", "B-i", "B+j"); mixarrows(1, 1, 4);
mixarrows(1, 0, 4); blocks(2, "...", "B-i", "B+j", "B-j", "B+k", "0");
blocks(2, "...", "B", "B", "B"); 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 ...@@ -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 pass runs phase shifted by one block and converts the variable-alphabet blocks
into blocks with alphabet $[B]$. into blocks with alphabet $[B]$.
What is the redundancy of this scheme? That depends on whether the original What is the redundancy of this scheme?
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}
Now we can finally analyze redundancy. Let us count how the number of blocks 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} \tightlist{o}
\: If the original length was a multiple of $b$, we must add one block to complete padding. \: 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. \: We always add one block with EOF character.
\: In the first pass, number of blocks does not increase. \: Before the first pass, we may need to add an extra padding block to make number of blocks even.
\: In the second pass, we may need to add an extra padding block to make number of blocks odd. \: Before the second pass, we always add an extra padding block to make number of blocks odd.
\endlist \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. 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} \section{Succinct representation of arbitrary-alphabet strings}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment