<< Chapter < Page Chapter >> Page >

To do so, we outline an approach by Elias  [link] . Let n be a natural number, and let b ( n ) be the binary form for n . For example, b ( 0 ) = 0 , b ( 1 ) = 1 , b ( 2 ) = 10 , b ( 3 ) = 11 , and so on. Another challenge is that the length of this representation, | b ( n ) | , is unknown. Let u ( k ) = 0 k - 1 1 , for example u ( 4 ) = 0001 . We can now define e ( n ) = u ( | b ( | b ( n ) | ) | ) b ( | b ( n ) | ) b ( n ) . For example, for n=5, we have b ( n ) = 101 . Therefore, | b ( n ) | = 3 , b ( | b ( n ) | ) = 11 , | b ( | b ( n ) | ) | = 2 , u ( | b ( | b ( n ) | ) | ) = 01 , and e ( n ) = 0111101 . We note in passing that the first 2 bits of e ( n ) describe the length of b ( | b ( n ) | ) , which is 2, the middle 2 bits describe b ( | b ( n ) | ) , which is 3, and the last 3 bits describe b ( n ) , giving the actual number 5. It is easily seen that

| e ( n ) | = 2 | b ( | b ( n ) | ) | + | b ( n ) | 2 log log ( n + 1 ) + 1 + l o g n + 1 .

Sliding window universal coding

Having described an efficient way to encode an index, in particular a large one, we can employ this technique in sliding window codingas developed by Wyner and Ziv  [link] .

Take a fixed window of length n w and a source that generates characters. Define the history as x 1 n w , this is the portion of the data x that we have already processed and thus know.Our goal is to encode the phrase y 1 = x n w + 1 n w + L 1 , where L 1 is not fixed. The length L 1 is chosen such that there exists

y 1 = x n w + 1 n w + L 1 = x n w - m n w - m + L 1

for some m { 0 , 1 , . . . , n w - 1 } . For example, if x = a b c b a b a b c and we have processed the first 5 symbols a b c b a , then L 1 = 3 and m 1 = 1 , where a b c b a is the history and we begin encoding after that part.

The actual encoding of the phrase y 1 sends | f ( y 1 ) | bits, where

| f ( y 1 ) | = log ( n w ) + | e ( L 1 ) | , log ( n 2 ) < L 1 log ( α ) L 1 log ( α ) + | e ( L 1 ) | , e l s e .

First we encode L 1 ; then either the index m into history is encoded or y 1 is encoded uncompressed; finally, the first L 1 characters x 1 L 1 are removed from the history database, and y 1 is appended to its end. The latter process gives this algorithm a sliding window flavor.

This rather simple algorithm turns out to be asymptotically optimal in the limit of large n w . That is, it achieves the entropy rate.To see this, let us compute the compression factor. Consider x 1 N where N > > n w , R ¯ ( N ) = E ( l ( x 1 N ) ) N , N = i = 1 C | y i | , and | y i | = L 1 , where C is the number of phrases required to encode x 1 N . The number of bits l ( x 1 N ) needed to encoded x 1 N using the sliding window algorithm is

l ( x 1 N ) = n w log ( α ) + i = 1 C | e ( L i ) | + 1 + min { log ( n w ) , L i log ( α ) } .

Therefore, the compression factor R ¯ ( N ) satisfies

R ¯ ( N ) = n w log ( α ) N + 1 N i = 1 C m i n { log ( n w ) + 1 + r 1 log ( L i ) , r 2 log ( L i ) } .

Claim 3 [link] As lim n w and lim N , the compression factor R ¯ ( N ) converges to the entropy rate H .

A direct proof is complicated, because the location of phrases is a random variable, making a detailed analysis complicated. Let us try to simplify the problem.

Block partitioning in analysis of sliding window algorithm
Block partitioning in analysis of sliding window algorithm  [link] .

Take l 0 that divides n w + N to create n w + N l 0 intervals, where l 0 = log ( n w ) H + 2 ϵ , which is related to the window size in the algorithm from [link] . This partition into blocks appears in [link] . Denote by w l 0 ( x ) > 0 the smallest value for which x 1 l 0 = x - w l 0 - l 0 + 1 - w l 0 . Using Kac's lemma  [link] ,

Pr ( w l 0 ( x ) > n | x 1 l 0 = z ) 1 n Pr ( x 1 l 0 = z ) .

Claim 4 [link] We have the following convergence as l increases,

P r ( w l 0 ( x ) > 2 l ( H + 2 ϵ ) ) l 0 .

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Universal algorithms in signal processing and communications. OpenStax CNX. May 16, 2013 Download for free at http://cnx.org/content/col11524/1.1
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Universal algorithms in signal processing and communications' conversation and receive update notifications?

Ask