HOME

TheInfoList



OR:

In
computer science Computer science is the study of computation, automation, and information. Computer science spans theoretical disciplines (such as algorithms, theory of computation, information theory, and automation) to Applied science, practical discipli ...
, online codes are an example of
rateless erasure codes In coding theory, fountain codes (also known as rateless erasure codes) are a class of erasure codes with the property that a potentially limitless sequence of encoding symbols can be generated from a given set of source symbols such that the origin ...
. These codes can encode a message into a number of symbols such that knowledge of any fraction of them allows one to recover the original message (with high probability). ''Rateless'' codes produce an arbitrarily large number of symbols which can be broadcast until the receivers have enough symbols. The online encoding
algorithm In mathematics and computer science, an algorithm () is a finite sequence of rigorous instructions, typically used to solve a class of specific Computational problem, problems or to perform a computation. Algorithms are used as specificat ...
consists of several phases. First the message is split into ''n'' fixed size message blocks. Then the ''outer encoding'' is an
erasure code In coding theory, an erasure code is a forward error correction (FEC) code under the assumption of bit erasures (rather than bit errors), which transforms a message of ''k'' symbols into a longer message (code word) with ''n'' symbols such that th ...
which produces auxiliary blocks that are appended to the message blocks to form a composite message. From this the inner encoding generates check blocks. Upon receiving a certain number of check blocks some fraction of the composite message can be recovered. Once enough has been recovered the outer decoding can be used to recover the original message.


Detailed discussion

Online codes are parameterised by the block size and two
scalar Scalar may refer to: *Scalar (mathematics), an element of a field, which is used to define a vector space, usually the field of real numbers * Scalar (physics), a physical quantity that can be described by a single element of a number field such ...
s, ''q'' and ''ε''. The authors suggest ''q''=3 and ε=0.01. These parameters set the balance between the complexity and performance of the encoding. A message of ''n'' blocks can be recovered,
with high probability In mathematics, an event that occurs with high probability (often shortened to w.h.p. or WHP) is one whose probability depends on a certain number ''n'' and goes to 1 as ''n'' goes to infinity, i.e. the probability of the event occurring can be ma ...
, from (1+3ε)''n'' check blocks. The probability of failure is (ε/2)q+1.


Outer encoding

Any erasure code may be used as the outer encoding, but the author of online codes suggest the following. For each message block,
pseudo-random A pseudorandom sequence of numbers is one that appears to be statistically random, despite having been produced by a completely deterministic and repeatable process. Background The generation of random numbers has many uses, such as for rando ...
ly choose ''q'' auxiliary blocks (from a total of 0.55''q''ε''n'' auxiliary blocks) to attach it to. Each auxiliary block is then the XOR of all the message blocks which have been attached to it.


Inner encoding

The inner encoding takes the composite message and generates a stream of check blocks. A check block is the
XOR Exclusive or or exclusive disjunction is a logical operation that is true if and only if its arguments differ (one is true, the other is false). It is symbolized by the prefix operator J and by the infix operators XOR ( or ), EOR, EXOR, , ...
of all the blocks from the composite message that it is attached to. The ''degree'' of a check block is the number of blocks that it is attached to. The degree is determined by sampling a random distribution, ''p'', which is defined as: :F=\left\lceil\frac\right\rceil :p_1=1-\frac :p_i=\frac{(F-1)i(i-1)} for 2\le i\le F Once the degree of the check block is known, the blocks from the composite message which it is attached to are chosen uniformly.


Decoding

Obviously the decoder of the inner stage must hold check blocks which it cannot currently
decode Decoding or decode may refer to: is the process of converting code into plain text or any format that is useful for subsequent processes. Science and technology * Decoding, the reverse of encoding * Parsing, in computer science * Digital-to-analog ...
. A check block can only be decoded when all but one of the blocks which it is attached to are known. The graph to the left shows the progress of an inner decoder. The x-axis plots the number of check blocks received and the dashed line shows the number of check blocks which cannot currently be used. This climbs almost linearly at first as many check blocks with degree > 1 are received but unusable. At a certain point, some of the check blocks are suddenly usable, resolving more blocks which then causes more check blocks to be usable. Very quickly the whole file can be decoded. As the graph also shows the inner decoder falls just shy of decoding everything for a little while after having received ''n'' check blocks. The outer encoding ensures that a few elusive blocks from the inner decoder are not an issue, as the file can be recovered without them.


External links


Original paper

Rateless Codes and Big Downloads
(A more accessible paper by the same author)


A Ruby project hosted at RubyForge containing a Ruby library for Online Coding
Coding theory