0% found this document useful (0 votes)
52 views3 pages

Source Encoder and Decoder Overview

The document outlines an experiment involving source encoding and decoding using Huffman coding to minimize the size of transmitted information. It explains the theory behind symbol transmission, the Huffman coding algorithm, and provides a practical procedure for observing the encoding and decoding process. The aim is to demonstrate the efficiency of Huffman coding by comparing the bit usage in normal and coded modes using the example word 'ABRAKADABRA'.

Uploaded by

k.b.kirankengam
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
52 views3 pages

Source Encoder and Decoder Overview

The document outlines an experiment involving source encoding and decoding using Huffman coding to minimize the size of transmitted information. It explains the theory behind symbol transmission, the Huffman coding algorithm, and provides a practical procedure for observing the encoding and decoding process. The aim is to demonstrate the efficiency of Huffman coding by comparing the bit usage in normal and coded modes using the example word 'ABRAKADABRA'.

Uploaded by

k.b.kirankengam
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

SOURCE ENCODER AND DECODER

Aim:
To select an information having in-equal probability of occurrence of each symbol or
having redundancy in the information and applying a source code using one of the
techniques i.e., Huffman coding, observing the size of the coded information, sending the
minimized packet, decoding at the receiving end getting back the full information sent.
Apparatus:

1. Source encoder and decoder kit

2. power supply

Theory:
when we have to transmit asset of symbols over a communication channels, normally
choose no. of bits to accommodate all the symbols for example 8 symbols can be coded using
3 bits, because 3 bits give us 2^3=8 combinations. With this type of normal binary
representation we can transfer any combination of symbols in any order. However if our
information to be transmitted has a set of symbols but the occurrence of symbols with
different frequencies we can employ a coding technique whereby we choose less number of
bits for the frequently occurring symbol and more bits for the less occurring symbol. This
way we can represent our information which is a sequence of symbols with less no. of bits
i.e., reduced size.

Huffman coding:

Huffman coding is based on the frequency of occurrence of a data item(pixel in images).


The principle is to use a lower number of bits to encode the data that occurs more frequently.
Codes are stored in a code book which may be constructed for each image or a set of images.
In all cases the code book plus the encoded data must be transmitted to enable decoding.

The Huffman algorithm is now briefly summarized:


A bottom up approach
1. Initialization: Put all the nodes in an open list,keep it stored at all times(e.g., ABCDE).
2. Repeat until the OPEN list has one node left:
(a) From OPEN pick two nodes having the lowest probabilities, create a parent node of them.
(b) Assign the sum of the childern’s probabilities to the parent node and insert it into OPEN.
(c) Assign code 0,1 to the two branches of the tree, and delete the children from OPEN.
Let us take an example that we wish to transmit a word ABRAKADABRA, Which has 5 types
of symbols A,B,R,K,D.
In normal coding to represent one of the 5 symbols we need 3 bits.
To transmit this 11 characters we will need 11*3=33 bits.
However by employing Huffman coding as below we can transmit the information using only
23 bits.
Circuit diagram:

Procedure:
1. Student has to observe the signal chain.

2. Then verify how many bits are taken to transmit ABRAKADABRA in normal and source
coded mode.
3. To send an input symbol, push any one of the input symbol keys, to transmit a letter A,
student has to press the key marked A.
4. Observe how many bits are being transmitted for this key. And the bit code for the same
and noted down the bits being transmitted on the LEDs.
5. Observe if the corresponding output LED is glows corresponding to the symbol pressed
at the input.
6. Pushing the demo mode switch will give a brief description of implementation of kit.

Observations:
Result:
Encoding and decoding operations of source encoding and decoding was observed using
HUFFMAN CODING technique.

Common questions

Powered by AI

To verify Huffman coding, a student should first observe the normal transmission bit length for a set of symbols. By inputting these symbols using the kit, they should note the number of bits used per symbol in encoded form and compare it to the normal bit length to identify reduction. Checking illuminated LEDs illustrates successful code transmission, and using the demo mode can provide further clarity on Huffman coding operation .

The source encoder and decoder kit demonstrates Huffman coding by allowing users to input symbols and observe how they are encoded with varying bit lengths based on their frequency of occurrence. This is evidenced by observing the number of bits transmitted for each symbol and verifying the corresponding output illumination on LEDs. The kit shows the reduction in data size compared to normal encoding by reducing transmitted bits .

Changes in symbol frequency directly impact the Huffman code construction. Increased frequency for a particular symbol will shorten its corresponding Huffman code, as it should require fewer bits. Conversely, if a symbol becomes less frequent, its code length increases as more bits are required. This adaptation allows Huffman coding to minimize the overall data size effectively in response to frequency variations .

Huffman coding reduces the size of transmitted data by assigning fewer bits to more frequently occurring symbols and more bits to less frequent ones. In normal binary representation, every symbol gets the same number of bits, regardless of its frequency. For instance, to transmit the word 'ABRAKADABRA' using normal coding requires 33 bits, but using Huffman coding, only 23 bits are needed because frequently occurring symbols like 'A' are encoded with fewer bits .

The bottom-up approach in the Huffman algorithm starts with placing all nodes, each representing a symbol with a given frequency, into an open list. Nodes are picked two at a time with the lowest probabilities to create a parent node, which is then given the sum of these probabilities. This process continues until a single node remains, forming a binary tree where branches are labeled with 0s and 1s to represent each symbol. This effectively structures the encoding process based on symbol frequencies .

The code book in Huffman encoding holds the mappings of symbols to their respective coded bits. It is crucial because both the encoded data and the code book need to be transmitted to enable decoding at the receiving end. The existence of the code book ensures that each unique symbol has a definitive bit representation, impacting the transmission by potentially increasing overhead if the code book is large, but ensuring accurate reconstruction of data .

Constructing a Huffman tree involves first placing all symbols in an open list with their respective probabilities. Repeatedly pick the two nodes with the lowest probabilities, create a parent node for them, and assign it the sum of their probabilities. This parent node is then inserted back into the list. The tree construction is complete when only one node is left in the list. Codes are assigned along the tree's branches to the symbols, typically with 0 and 1 .

The initialization step in the Huffman algorithm involves placing every symbol into an open list with their respective probabilities. This step is crucial because it sets up the starting point for the iterative process of node pairing and tree building, eventually yielding an efficient encoding scheme. Proper initialization ensures that all symbols are accounted for, facilitating accurate subsequent steps in the tree construction .

Huffman coding has limitations such as not always being optimal for small data sets, particularly if symbol probabilities are not very differentiated. It can also be inefficient if the code book size adds significant overhead to the transmission, especially when transmitting very short messages. Furthermore, it cannot exploit symbol relations across large datasets, as other compression algorithms (e.g., LZW) might .

Normal binary representation might be more efficient when the symbols in the data have an equal probability of occurrence. In such scenarios, Huffman coding does not provide a size reduction advantage because it thrives on frequency discrepancies among symbols. Additionally, the overhead of transmitting a code book in Huffman could outweigh its compression benefits if all symbols occur with equal probability .

You might also like