Science Fair Projects Ideas - Elias omega coding

All Science Fair Projects

      

Science Fair Project Encyclopedia for Schools!

  Search    Browse    Forum  Coach    Links    Editor    Help    Tell-a-Friend    Encyclopedia    Dictionary     

Science Fair Project Encyclopedia

For information on any area of science that interests you,
enter a keyword (eg. scientific method, molecule, cloud, carbohydrate etc.).
Or else, you can start by choosing any of the categories below.

Elias omega coding

Elias omega coding is a universal code encoding the positive integers. Like Elias gamma coding and Elias delta coding, it works by prefixing the integer with a representation of its order of magnitude in a universal code. Unlike those other two codes, however, Elias omega uses itself recursively to encode that prefix; thus, they are sometimes known as recursive Elias codes.

To code a number:

  1. Put a 'group' of "0" at the end of the representation.
  2. If the number to be encoded is 1, stop; if not, add the binary representation of the number as a 'group' to the beginning of the representation.
  3. Repeat the previous step, with the number of digits just written, minus 1, as the new number to be encoded.

The code begins:

 1 0
 2 10 0
 3 11 0
 4 10 100 0
 5 10 101 0
 6 10 110 0
 7 10 111 0
 8 11 1000 0
 9 11 1001 0
10 11 1010 0
11 11 1011 0
12 11 1100 0
13 11 1101 0
14 11 1110 0
15 11 1111 0
16 10 100 10000 0
17 10 100 10001 0

To decode an Elias omega-coded integer:

  1. Start with a variable N, set to a value of 1.
  2. Read the first 'group', which will either be a single "0", or a "1" followed by N more digits. If it is a "0", it means the value of the integer is 1; if it starts with a "1", then N becomes the value of the group interpreted as a binary number.
  3. Read each successive group; it will either be a single "0", or a "1" followed by N more digits. If it is a "0", it means the value of the integer is N; if it starts with a "1", then N becomes the value of the group interpreted as a binary number.

Omega coding is used in applications where the largest encoded value is not known ahead of time, or to compress data in which small values are much more frequent than large values.

See also Elias delta coding, Elias gamma coding

Last updated: 07-13-2005 22:56:55
12-19-2008 14:25:18
The contents of this article is licensed from www.wikipedia.org under the GNU Free Documentation License. Click here to see the transparent copy and copyright details
Science kits, science lessons, science toys, maths toys, hobby kits, science games and books - these are some of many products that can help give your kid an edge in their science fair projects, and develop a tremendous interest in the study of science. When shopping for a science kit or other supplies, make sure that you carefully review the features and quality of the products. Compare prices by going to several online stores. Read product reviews online or refer to magazines.

Start by looking for your science kit review or science toy review. Compare prices but remember, Price $ is not everything. Quality does matter.
Science Fair Coach
What do science fair judges look out for?
ScienceHound
Science Fair Projects for students of all ages
All Science Fair Projects.com Site
All Science Fair Projects Homepage
Search | Browse | Links | From-our-Editor | Books | Help | Contact | Privacy | Disclaimer | Copyright Notice