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

HOW CAN WE MOTIVATE OURSELVES MORE EFFECTIVELY THROUGH REINFORCEMENT?

•We'd all like to be more effective in reaching our goals, and according to behaviorists, the way to improve our effectiveness is by rewarding ourselves for the little steps that take us closer and closer to those desirable outcomes.  •First, find something you really like to do or something you'd like to have that can, realistically, serve as a reward.  •Then, take the goal that you are hoping to achieve that, realistically, you could achieve but just haven't succeeded at yet.  •Next, work backward from that goal to your present state.  •Arrange to give yourself those desired rewards as you inch closer from where you are now to the desired end point.  •As you start to make progress, only give yourself a reward when you've moved forward from where you are now.  •For example, if you'd like to cut back on your television watching and instead read more often, reward yourself by allowing yourself to watch television only when you've read for 20 minu...

WHY DO WE SLEEP AND DREAM?

•We spend about one-third of our lives sleeping.  •Why do we invest so much time in sleep?  •The most straight forward answer is that, sleep is restorative, and it replenishes the body's energy stores.  •However, intense neural activity during rapid eye movement (REM) sleep, the stage in which most dreams occur, suggests there may be more to the story.  •One theory, which by far has the largest body of evidence, is that sleep plays a critical role in learning and consolidating memories.  •It is probably why infants and toddlers need up to 14 hours of sleep a day, with half of it spent in REM sleep.  •In adults, dreams may also play a role in brain plasticity and learning, which is why sleep-deprived adults perform worse in memory tests and tasks. 

Inside an MRI scanner

When doctors need the highest quality images possible they turn to MRI scanners, but how do they work? MRI scan ,MRI test, MRI use in medical field, constitutent of MRI machine. Doctors often plan treatments based on imaging. X-rays, ultrasound and CT scans provide useful pictures, but when the highest quality images are needed, they turn to MRI scanners. While CT scanners use x-rays and therefore expose the patient to radiation, magnetic resonance imaging (MRI) uses powerful magnets and is virtually risk free. MRI scans are obtained for many medical conditions, although since they  are expensive and complicated to interpret, they certainly aren’t as easy as taking a chest x-ray. Examples for which they are used include planning surgery for rectal cancers, assessing bones for infection (osteomyelitis), looking at the bile ducts in detail for trapped gallstones, assessing ligamental damage in the knee joints and assessing the spinal cord for infections, tumours or...