Earth's magnetic field: Difference between revisions

From formulasearchengine
Jump to navigation Jump to search
en>Eregli bob
m It is the (possibly unfortunate) reality that both gauss and tesla are in widespread actual usage.
 
en>K6ka
m Reverted edits by Jrocker99 (talk) to last version by K6ka
Line 1: Line 1:
This initial white patchappearance can be followed by stable period without any progression. Treatment:   The treatment of vitiligo depends on many factors, including: the location of the disease, the age of the patient and how much of the body surface is affected and is best done by a Dermatologist. Appearance of color changes inside mouth, nose, genital and rectal areas. Others believe it is due to some inherited conditions leading to melanocytes injury. "The improvement of quality of life after total and even partial successful repigmentation has been documented. <br><br>While walnuts purify blood, figs have healing properties to cure leucoderma. Patients are advised to take 1 gram of the powder with fresh milk for 40 days, and the ground seeds must be applied to the white spots. Leucoderma is a loosely applied terminology used to express depigmented skin lesions. There are some more treatment options available that may show positive result on your patches. after being afflicted by the condition which causes the cells responsible for pigmentation of the skin to die causing the skin to lose color in patches. <br><br>For complete [http://discover-prague.info/sitemap/ vitiligo cure], this is an excellent herbal product. Vitiligo is a Latina language word whose indicating is calf. The areas of minor injury or sunburn are more prone to it. Gray or white hair can be restored, reversed, and remedied with a topical application known as a "proprietary treatment. Otherwise, the condition is completely asmptomatis with no structural change or loss of sensation in the affected areas. <br><br>5- A Pinguecula or a Pterygium both growths on the eye, may be caused by UV light exposure. Generalized melanosis may also be seen with advanced, widespread melanoma, in which case the color is due to the direct production of pigmented compounds by the malignant cells. Human skin acquires melanocytes cells in skin whose function is the production of melanin cells in skin. a centros ya ofrecen maquillaje permanente los procedimientos con el fin de atraer a nuevos pacientes. Underneath there are several key methods of conservative treatment. <br><br>An additional theory is that melanocytes obliterate themselves. Advise patients to use corrective cosmetics to help hide skin lesions, and to use a sunblock because hypopigmented areas may sunburn easily. Vitiligo is that the loss of skin pigmentation in patches. Different treatments are discovered by medical science that can be played melanin cells in the skin. Transplantation is mostly a strategy by which it practical to transplant Melanocytes cells from several other component of shape towards the influenced skin place. <br><br>After three months of house decoration should be ventilated after the relocation, after the arrival of regular ventilation should be maintained. Therefore, Vitiligo causes because of the depigmentation of the cells as the dysfunctional of the melanocyte has been affected and the melanin cells are destroyed. Sleep is very important for your body to heal and rejuvenate. The product is guaranteed with no side effects and made of pure natural herbal product and free from any chemicals. Vitiligo happens when your own body attacks the cells that produce your skin color.
'''Golomb coding''' is a [[lossless data compression]] method using a family of [[data compression]] codes invented by [[Solomon W. Golomb]] in the 1960s.  Alphabets following a [[geometric distribution]] will have a Golomb code as an optimal [[prefix code]], making Golomb coding highly suitable for situations in which the occurrence of small values in the input stream is significantly more likely than large values.
 
'''Rice coding''' (invented by [[Robert F. Rice]]) denotes using a subset of the family of Golomb codes to produce a simpler (but possibly suboptimal) prefix code.  Rice used this set of codes in an [[adaptive coding]] scheme; "Rice coding" can refer either to that adaptive scheme or to using that subset of Golomb codes.  Whereas a Golomb code has a tunable parameter that can be any positive integer value, Rice codes are those in which the tunable parameter is a power of two. This makes Rice codes convenient for use on a computer, since multiplication and division by 2 can be implemented more efficiently in [[binary arithmetic]].
 
Rice coding is used as the [[entropy encoding]] stage in a number of lossless [[image compression]] and [[audio data compression]] methods.
 
== Overview ==
 
===Construction of codes===
 
Golomb coding uses a tunable parameter <math>M</math> to divide an input value into two parts: <math>q</math>, the result of a division by <math>M</math>, and <math>r</math>, the remainder.  The quotient is sent in [[unary coding]], followed by the remainder in [[truncated binary encoding]].  When <math>M=1</math> Golomb coding is equivalent to unary coding.
 
[[Image:golomb rice code.svg]]
 
Golomb–Rice codes can be thought of as codes that indicate a number by the position of the ''bin'' (''q''), and the ''offset'' within the bin (''r''). The above figure shows the position ''q'', and offset ''r'' for the encoding of integer ''N'' using Golomb–Rice parameter ''M''.
 
Formally, the two parts are given by the following expression, where <math>x</math> is the number being encoded:
<math>q = \left \lfloor \frac{\left (x-1 \right )}{M} \right \rfloor</math> and <math>r = x-qM-1</math>
The final result looks like: <math>\left (q+1 \right ) r</math>
 
Note that <math>r</math> can be of a varying number of bits, and is specifically only ''b'' bits for Rice code,
and switches between ''b''-1 and ''b'' bits for Golomb code (i.e. ''M'' is not a power of 2): Let <math>b = \lceil\log_2(M)\rceil</math>.  If <math>0 \leq r < 2^b-M</math>, then use ''b''-1 bits to encode ''r''.  If <math>2^b-M \leq r < M</math>, then use ''b'' bits to encode ''r''. Clearly, <math>b=\log_2(M)</math> if ''M'' is a power of 2 and we can encode all values of ''r'' with ''b'' bits.
 
The parameter ''M'' is a function of the corresponding [[Bernoulli process]], which is parameterized by <math>p=P(X=0)</math> the probability of success in a given [[Bernoulli trial]]. <math>M</math> is either the median of the distribution or the median +/− 1. It can be determined by these inequalities:
 
: <math>(1-p)^M + (1-p)^{M+1} \leq 1 < (1-p)^{M-1} + (1-p)^M.</math>
 
Golomb states that, for large M, there is very little penalty for picking <math>M = \left\lfloor \frac{-1}{\log_2(1-p)}\right\rfloor</math>.
 
The Golomb code for this distribution is equivalent to the [[Huffman code]] for the same probabilities, if it were possible to compute the Huffman code.
 
===Use with signed integers===
 
Golomb's scheme was designed to encode sequences of non-negative numbers. However it is easily extended to accept sequences containing negative numbers using an ''overlap and interleave'' scheme, in which all values are re-assigned to some positive number in a unique and reversible way. The sequence begins: 0, -1, 1, -2, 2, -3, 3, -4, 4 ... The n<sup>th</sup> negative value (i.e., -n) is mapped to the n<sup>th</sup> odd number (2n-1), and the m<sup>th</sup> positive value is mapped to the m<sup>th</sup> even number (2m). This may be expressed mathematically as follows: a positive value <math>x</math> is mapped to (<math>x^\prime=2|x|=2x, x\ge0</math>), and a negative value <math>y</math> is mapped to (<math>y^\prime=2|y|-1=-2y-1, y<0</math>). This is an optimal prefix code only if both the positive and the magnitude of the negative values follow a geometric distribution with the same parameter.
 
== Simple algorithm ==
 
Note below that this is the Rice–Golomb encoding, where the remainder code uses simple truncated binary encoding, also named "Rice coding" (other varying-length binary encodings, like arithmetic or Huffman encodings, are possible for the remainder codes, if the statistic distribution of remainder codes is not flat, and notably when not all possible remainders after the division are used). In this algorithm, if the ''M'' parameter is a power of 2, it becomes equivalent to the simpler Rice encoding.
 
# Fix the parameter ''M'' to an integer value.
# For ''N'', the number to be encoded, find
##  quotient = ''q'' = int[''N''/''M'']
##  remainder = ''r'' = ''N''  modulo ''M''
# Generate Codeword
##  The Code format : <Quotient Code><Remainder Code>, where
##  Quotient Code (in [[unary coding]])
###  Write a ''q''-length string of 1 bits
###  Write a 0 bit
##  Remainder Code (in [[truncated binary encoding]])
###  If ''M'' is power of 2, code remainder as binary format. So <math>\log_2(M)</math> bits are needed.  (Rice code)
###  If ''M'' is not a power of 2, set <math>b = \lceil\log_2(M)\rceil</math>
####    If <math>r < 2^b-M</math> code ''r'' as plain binary using ''b''-1 bits.
####    If <math>r \ge 2^b-M</math> code the number <math>r+2^b-M</math> in plain binary representation using ''b'' bits.
 
== Example ==
 
Set ''M'' = 10.  Thus <math>b = \lceil\log_2(10)\rceil = 4</math>.  The cutoff is <math>2^b-M = 16-10 = 6</math>
 
{|border="0" cellspacing="8" cellpadding="0"
|-valign="top"
|
{|border="1" class="wikitable"
|-
!colspan="2"|Encoding of quotient part
|-
!''q''||output bits
|-
|0||0
|-
|1||10
|-
|2||110
|-
|3||1110
|-
|4||11110
|-
|5||111110
|-
|6||1111110
|-
|<math>\vdots</math>||<math>\vdots</math>
|-
|N||<math>\underbrace{111\cdots111}_N 0</math>
|}
|
{|border="1" class="wikitable"
|-
!colspan="4"|Encoding of remainder part
|-
!''r''||offset||binary||output bits
|-
|0||0||0000||000
|-
|1||1||0001||001
|-
|2||2||0010||010
|-
|3||3||0011||011
|-
|4||4||0100||100
|-
|5||5||0101||101
|-
|6||12||1100||1100
|-
|7||13||1101||1101
|-
|8||14||1110||1110
|-
|9||15||1111||1111
|}
|}
 
For example, with a Rice–Golomb encoding of parameter ''M'' = 10, the decimal number 42 would first be split into ''q'' = 4,''r'' = 2, and would be encoded as qcode(''q''),rcode(''r'') = qcode(4),rcode(2) = 11110,010 (you don't need to encode the separating comma in the output stream, because the 0 at the end of the ''q'' code is enough to say when ''q'' ends and ''r'' begins ; both the qcode and rcode are self-delimited).
 
== Use for run-length encoding ==
 
[[Image:GolombCodeRedundancy.svg|300px|This image shows the redundancy of the Golombcode, when M is chosen optimally for ''p''&nbsp;&ge;&nbsp;1/2.|thumb|right]]
 
Given an alphabet of two symbols, or a set of two events, ''P'' and ''Q'', with probabilities ''p'' and (1&nbsp;&minus;&nbsp;''p'') respectively, where ''p''&nbsp;≥&nbsp;1/2, Golomb coding can be used to encode runs of zero or more ''P''<nowiki>'</nowiki>s separated by single ''Q''<nowiki>'</nowiki>s. In this application, the best setting of the parameter ''M'' is the nearest integer to <math> \frac{-1}{\log_{2}p}</math>. When ''p'' = 1/2, ''M'' = 1, and the Golomb code corresponds to unary (''n''&nbsp;≥&nbsp;0 ''P'''s followed by a ''Q'' is encoded as ''n'' ones followed by a zero).
 
== Applications ==
 
Numerous signal codecs use a Rice code for [[prediction]] residues.
In predictive algorithms, such residues tend to fall into a two-sided [[geometric distribution]], with small residues being more frequent than large residues, and the Rice code closely approximates the Huffman code for such a distribution without the overhead of having to transmit the Huffman table.
One signal that does not match a geometric distribution is a [[sine wave]], because the differential residues create a sinusoidal signal whose values are not creating a geometric distribution (the highest and lowest residue values have similar high frequency of occurrences, only the median positive and negative residues occur less often).
 
Several lossless [[audio data compression|audio codecs]], such as [[Shorten (file format)|Shorten]],<ref>[http://www.etree.org/shnutils/shorten/support/doc/shorten.txt man shorten]</ref> [[FLAC]],<ref>[http://flac.sourceforge.net/documentation_format_overview.html FLAC documentation: format overview]</ref> [[Apple Lossless]], and [[MPEG-4 ALS]], use a Rice code after the [[Linear predictive coding|linear prediction step]] (called "adaptive FIR filter" in Apple Lossless).
Rice coding is also used in the [[FELICS]] lossless image codec.
 
The Golomb–Rice coder is used in the entropy coding stage of [[Rice Algorithm]] based ''lossless image codecs''. One such experiment yields a compression ratio graph given below. See other entries in this category at the bottom of this page. in those compression, the progressive space differential data yields an alternating suite of positive and negative values around 0, which are remapped to positive-only integers (by doubling the absolute value and adding one if the input is negative), and then Rice–Golomb coding is applied by varying the divisor which remains small.{{Citation needed|date=December 2008}}
 
[[Image:Golomb coded Rice Algorithm experiment Compression Ratios.png|frame|center|Golomb coded Rice Algorithm experiment compression ratios]]
 
In those results, the Rice coding may create very long sequences of one-bits for the quotient; for practical reasons, it is often necessary to limit the total run-length of one-bits, so a modified version of the Rice–Golomb encoding consists of replacing the long string of one-bits by encoding its length with a recursive Rice–Golomb encoding; this requires reserving some values in addition to the initial divisor ''k'' to allow the necessary distinction.
 
== References ==
 
* Golomb, S.W. (1966). [http://urchin.earth.li/~twic/Golombs_Original_Paper/ , Run-length encodings. IEEE Transactions on Information Theory, IT--12(3):399--401 ]
* R. F. Rice (1971) and R. Plaunt, [http://dx.doi.org/10.1109/TCOM.1971.1090789 , "Adaptive Variable-Length Coding for Efficient Compression of Spacecraft Television Data, " IEEE Transactions on Communications, vol. 16(9), pp.&nbsp;889–897, Dec. 1971.]
* R. F. Rice (1979), "Some Practical Universal Noiseless Coding Techniques, " Jet Propulsion Laboratory, Pasadena, California, JPL Publication 79—22, Mar. 1979.
* Witten, Ian  Moffat, Alistair  Bell, Timothy.  "Managing Gigabytes: Compressing and Indexing Documents and Images."  Second Edition.  Morgan Kaufmann Publishers, San Francisco CA.  1999  ISBN 1-55860-570-3
* David Salomon. "Data Compression",ISBN 0-387-95045-1.
* S. Büttcher, C. L. A. Clarke, and G. V. Cormack. [http://www.ir.uwaterloo.ca/book/ Information Retrieval: Implementing and Evaluating Search Engines]. MIT Press, Cambridge MA, 2010.
 
{{reflist}}
 
{{Compression Methods}}
 
{{DEFAULTSORT:Golomb Coding}}
[[Category:Lossless compression algorithms]]

Revision as of 03:05, 2 February 2014

Golomb coding is a lossless data compression method using a family of data compression codes invented by Solomon W. Golomb in the 1960s. Alphabets following a geometric distribution will have a Golomb code as an optimal prefix code, making Golomb coding highly suitable for situations in which the occurrence of small values in the input stream is significantly more likely than large values.

Rice coding (invented by Robert F. Rice) denotes using a subset of the family of Golomb codes to produce a simpler (but possibly suboptimal) prefix code. Rice used this set of codes in an adaptive coding scheme; "Rice coding" can refer either to that adaptive scheme or to using that subset of Golomb codes. Whereas a Golomb code has a tunable parameter that can be any positive integer value, Rice codes are those in which the tunable parameter is a power of two. This makes Rice codes convenient for use on a computer, since multiplication and division by 2 can be implemented more efficiently in binary arithmetic.

Rice coding is used as the entropy encoding stage in a number of lossless image compression and audio data compression methods.

Overview

Construction of codes

Golomb coding uses a tunable parameter to divide an input value into two parts: , the result of a division by , and , the remainder. The quotient is sent in unary coding, followed by the remainder in truncated binary encoding. When Golomb coding is equivalent to unary coding.

Golomb–Rice codes can be thought of as codes that indicate a number by the position of the bin (q), and the offset within the bin (r). The above figure shows the position q, and offset r for the encoding of integer N using Golomb–Rice parameter M.

Formally, the two parts are given by the following expression, where is the number being encoded: and The final result looks like:

Note that can be of a varying number of bits, and is specifically only b bits for Rice code, and switches between b-1 and b bits for Golomb code (i.e. M is not a power of 2): Let . If , then use b-1 bits to encode r. If , then use b bits to encode r. Clearly, if M is a power of 2 and we can encode all values of r with b bits.

The parameter M is a function of the corresponding Bernoulli process, which is parameterized by the probability of success in a given Bernoulli trial. is either the median of the distribution or the median +/− 1. It can be determined by these inequalities:

Golomb states that, for large M, there is very little penalty for picking .

The Golomb code for this distribution is equivalent to the Huffman code for the same probabilities, if it were possible to compute the Huffman code.

Use with signed integers

Golomb's scheme was designed to encode sequences of non-negative numbers. However it is easily extended to accept sequences containing negative numbers using an overlap and interleave scheme, in which all values are re-assigned to some positive number in a unique and reversible way. The sequence begins: 0, -1, 1, -2, 2, -3, 3, -4, 4 ... The nth negative value (i.e., -n) is mapped to the nth odd number (2n-1), and the mth positive value is mapped to the mth even number (2m). This may be expressed mathematically as follows: a positive value is mapped to (), and a negative value is mapped to (). This is an optimal prefix code only if both the positive and the magnitude of the negative values follow a geometric distribution with the same parameter.

Simple algorithm

Note below that this is the Rice–Golomb encoding, where the remainder code uses simple truncated binary encoding, also named "Rice coding" (other varying-length binary encodings, like arithmetic or Huffman encodings, are possible for the remainder codes, if the statistic distribution of remainder codes is not flat, and notably when not all possible remainders after the division are used). In this algorithm, if the M parameter is a power of 2, it becomes equivalent to the simpler Rice encoding.

  1. Fix the parameter M to an integer value.
  2. For N, the number to be encoded, find
    1. quotient = q = int[N/M]
    2. remainder = r = N modulo M
  3. Generate Codeword
    1. The Code format : <Quotient Code><Remainder Code>, where
    2. Quotient Code (in unary coding)
      1. Write a q-length string of 1 bits
      2. Write a 0 bit
    3. Remainder Code (in truncated binary encoding)
      1. If M is power of 2, code remainder as binary format. So bits are needed. (Rice code)
      2. If M is not a power of 2, set
        1. If code r as plain binary using b-1 bits.
        2. If code the number in plain binary representation using b bits.

Example

Set M = 10. Thus . The cutoff is

Encoding of quotient part
q output bits
0 0
1 10
2 110
3 1110
4 11110
5 111110
6 1111110
N
Encoding of remainder part
r offset binary output bits
0 0 0000 000
1 1 0001 001
2 2 0010 010
3 3 0011 011
4 4 0100 100
5 5 0101 101
6 12 1100 1100
7 13 1101 1101
8 14 1110 1110
9 15 1111 1111

For example, with a Rice–Golomb encoding of parameter M = 10, the decimal number 42 would first be split into q = 4,r = 2, and would be encoded as qcode(q),rcode(r) = qcode(4),rcode(2) = 11110,010 (you don't need to encode the separating comma in the output stream, because the 0 at the end of the q code is enough to say when q ends and r begins ; both the qcode and rcode are self-delimited).

Use for run-length encoding

This image shows the redundancy of the Golombcode, when M is chosen optimally for p ≥ 1/2.

Given an alphabet of two symbols, or a set of two events, P and Q, with probabilities p and (1 − p) respectively, where p ≥ 1/2, Golomb coding can be used to encode runs of zero or more P's separated by single Q's. In this application, the best setting of the parameter M is the nearest integer to . When p = 1/2, M = 1, and the Golomb code corresponds to unary (n ≥ 0 P's followed by a Q is encoded as n ones followed by a zero).

Applications

Numerous signal codecs use a Rice code for prediction residues. In predictive algorithms, such residues tend to fall into a two-sided geometric distribution, with small residues being more frequent than large residues, and the Rice code closely approximates the Huffman code for such a distribution without the overhead of having to transmit the Huffman table. One signal that does not match a geometric distribution is a sine wave, because the differential residues create a sinusoidal signal whose values are not creating a geometric distribution (the highest and lowest residue values have similar high frequency of occurrences, only the median positive and negative residues occur less often).

Several lossless audio codecs, such as Shorten,[1] FLAC,[2] Apple Lossless, and MPEG-4 ALS, use a Rice code after the linear prediction step (called "adaptive FIR filter" in Apple Lossless). Rice coding is also used in the FELICS lossless image codec.

The Golomb–Rice coder is used in the entropy coding stage of Rice Algorithm based lossless image codecs. One such experiment yields a compression ratio graph given below. See other entries in this category at the bottom of this page. in those compression, the progressive space differential data yields an alternating suite of positive and negative values around 0, which are remapped to positive-only integers (by doubling the absolute value and adding one if the input is negative), and then Rice–Golomb coding is applied by varying the divisor which remains small.Potter or Ceramic Artist Truman Bedell from Rexton, has interests which include ceramics, best property developers in singapore developers in singapore and scrabble. Was especially enthused after visiting Alejandro de Humboldt National Park.

Golomb coded Rice Algorithm experiment compression ratios

In those results, the Rice coding may create very long sequences of one-bits for the quotient; for practical reasons, it is often necessary to limit the total run-length of one-bits, so a modified version of the Rice–Golomb encoding consists of replacing the long string of one-bits by encoding its length with a recursive Rice–Golomb encoding; this requires reserving some values in addition to the initial divisor k to allow the necessary distinction.

References

43 year old Petroleum Engineer Harry from Deep River, usually spends time with hobbies and interests like renting movies, property developers in singapore new condominium and vehicle racing. Constantly enjoys going to destinations like Camino Real de Tierra Adentro.

Template:Compression Methods