From 593d15211476d36d3da287a244aba7f181fe2c7f Mon Sep 17 00:00:00 2001 From: Filip Stedronsky <p@regnarg.cz> Date: Sun, 29 Aug 2021 17:53:35 +0200 Subject: [PATCH] Succinct: SOLE: fix redundancy calculations --- fs-succinct/sole_even.asy | 11 ++++++----- fs-succinct/succinct.tex | 24 ++++++++++-------------- 2 files changed, 16 insertions(+), 19 deletions(-) diff --git a/fs-succinct/sole_even.asy b/fs-succinct/sole_even.asy index 69125af..f83aacf 100644 --- a/fs-succinct/sole_even.asy +++ b/fs-succinct/sole_even.asy @@ -1,8 +1,9 @@ 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"); diff --git a/fs-succinct/succinct.tex b/fs-succinct/succinct.tex index e5f4f67..6a4fc08 100644 --- a/fs-succinct/succinct.tex +++ b/fs-succinct/succinct.tex @@ -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} -- GitLab