Professional Documents
Culture Documents
Manolis Christodoulakis
Kings College London
Joint work with
Our Goal
What makes Fibonacci strings a best case input for the Burrows-Wheeler Transform (BWT)? Relationship between different rotations of a Fibonacci string What is their lexicographic order? Side effect: we can deduce the symbol stored at any position of any Fibonacci string in constant time (without using , provided that the fn values are known)
SOFSEM 2006 2
n2 n2
f2 = 2
f3 = 3 f4 = 5
3
Notation
The i-th rotation of a string
x = 0 1 i-1 i n-1 Ri(x) = 0 1 i-1 i n-1 where i is taken modulo n.
SOFSEM 2006
M.Burrows and D.J.Wheeler. 1994 Purpose: to make a string more compressible BWT Algorithm:
1. 2. 3. 4.
Create list of all rotations Sort them Output last symbol of every rotation Output the rank of the 0-th rotation
SOFSEM 2006
SOFSEM 2006
SOFSEM 2006
Similarities in Rotations
R0(Fn) differs from Rfn-2(Fn) in 2 symbols Proof:
R0(Fn) Rfn-2(Fn) R0(Fn) = = = = Fn-2Fn-3F1un Fn-3F1unFn-2 Fn-1Fn-2 Fn-3F1un-1Fn-2 (1) (2)
Similarly,
Ri(Fn) > Ri+fn-2(Fn) for n even, i fn-1-1
SOFSEM 2006 9
Proof: (constructive)
Start at i=fn-1 and construct the partial list Ri Ri+fn-2 Ri+2fn-2 Ri+3fn-2 Ri+kfn-2 for as long as i+kfn-2 fn-1-1 (mod fn) kfn-1 I.e. the list is complete!
SOFSEM 2006 10
SOFSEM 2006
11
n even
rank(i,Fn) = ((i+1)fn-2-1) mod fn
SOFSEM 2006
12
In the sorted list of rotations, the first fn-1 rotations start with a, the rest with b Thus Fn[i] can be deduced from rank(i,Fn) If rank(i,Fn) fn-1 then Fn[i]=a else b.
SOFSEM 2006
13
The next fn-1 symbols of BWT are a Proof: Consequence of previous lemma
SOFSEM 2006 14