Skip to main content

What is Huffman coding?

## Huffman coding is a statistical data compression technique, which gives a reduction in the average code length, used to represent the symbols of an alphabet. The Huffman code is an example of a code that is optimal in the case where all symbol probabilities are integral powers of 0.5. A Huffman code can be built in the following manner:
 1. Rank all symbols in order of probability of occurrence. 2. Successively combine the two symbols of the lowest probability to form a new composite symbol; eventually to build a binary tree where each node is the probability of all nodes beneath it.
 3. Trace a path to each leaf, noticing the direction at each node.
 ## For a given probability distribution, there are many possible Huffman codes, but the total compressed length will be the same. This technique is used in most archivers. This is a means of producing a variable length code which has an average length  l close to the average information contained in a message.  l will always be greater than or equal to  H. 
## Thus with known probabilities of occurrence, we can produce an optimum solution using Huffman coding. Huffman coding requires a priori probabilities, which can be a problem in some situations. The Lempel–Ziv algorithm learns the source characteristics whilst coding and is used in situations where the a priori probabilities are not available.

Comments

Popular posts from this blog

Why do the Indian telecom operators offer their services with 28 days validity, not 30 days?😡😡

Here telecom operator are very clever, b ecause telecom operators want to earn money of 13 months instead of 12 months. Let do the calculation and find out why telecom operators are offering 28 days validity. Each month they get 2 days more, therefore in a year they get additional 24 days. There are 7 month which has 31 days so they get additional 7 days.Now in case of February  ,it has only 28 days not 30. So the total number of days they get are=24+7-2=29 days. So if you recharge 12 times then more 29 days are left in a year.🤔🤔 Means for another 29 days you have to recharge from that telecom operator.😫😫 So you have to recharge 13 times in a year instead of 12 times in a year. So telecom operators provide 28 days validity only. First one telecom operator started and then another telecom operators also understood this concept and they also applied 28 days validity both in data packs and voice packs.😱😱😱

20 Interesting science fact (PART 1)

1/ The speed of light is generally rounded down to 186,000 miles per second. In exact terms it is 299,792,458 m/s (metres per second - that is equal to 186,287.49 miles per second). 2/ It takes 8 minutes 17 seconds for light to travel from the Sun's surface to the Earth. 3/ October 12th, 1999 was declared \\"The Day of Six Billion\\" based on United Nations projections. 4/ 10 percent of all human beings ever born are alive at this very moment. 5/ The Earth spins at 1,000 mph but it travels through space at an incredible 67,000 mph. 6/ Every year over one million earthquakes shake the Earth. 7/ When Krakatoa erupted in 1883, its force was so great it could be heard 4,800 kilometres away in Australia. 8/ The largest ever hailstone weighed over 1kg and fell in Bangladesh in 1986. 9/ Every second around 100 lightning bolts strike the Earth. 10/ Every year lightning kills 1000 people. 11/ In October 1999 an Iceberg the size of London broke free...

How Electronic ink works?

Used increasingly in digital products, how does this technology work? Electronic ink (or electrophoretic ink) consists of millions of microcapsules. Each one contains positively charged white particles and negatively charged black particles, all suspended within a clear fluid. When these microcapsules are subjected to a positive or negative electric field, the corresponding particles rise to the top, becoming visible to the eye and colouring that microcapsule.  eBook reader displays coat electronic ink onto a sheet of plastic film, which in turn is laminated to a layer of circuitry. This circuitry forms a pattern of pixels that can be controlled by the display’s software driver, allowing images and text to be displayed in the form of a traditional page of physical paper.   Electronic ink displays differ from LCDs by utilising ambient light to illuminate pixels, with the rays merely reflecting off their surface. This means they have very low power demand, a...