0% found this document useful (0 votes)
90 views

CS65: Assignment 1 Mulitmedia Communication Due Date: May 13 To 15

This document provides instructions for Assignment 1 which involves implementing Huffman coding. Students must write three programs: buildtree to generate a Huffman coding tree and bit-code file from character frequencies, encode to encode a message into binary using the bit-codes, and decode to decode an encoded binary message back into text using the Huffman tree. The programs are due between May 13 to 15.

Uploaded by

bandishti
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
90 views

CS65: Assignment 1 Mulitmedia Communication Due Date: May 13 To 15

This document provides instructions for Assignment 1 which involves implementing Huffman coding. Students must write three programs: buildtree to generate a Huffman coding tree and bit-code file from character frequencies, encode to encode a message into binary using the bit-codes, and decode to decode an encoded binary message back into text using the Huffman tree. The programs are due between May 13 to 15.

Uploaded by

bandishti
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

CS65: Assignment 1

Mulitmedia Communication
Due Date : May 13 to 15
Huffman coding is a scheme that assigns variable-length bit-codes to characters, such that
the lengths of the codes depend on the frequencies of the characters in a typical message.
As a result, encoded messages take less space (as compared to fixed-length encoding)
since the letters that appear more frequently are assigned shorter codes. This is performed
by first building a Huffman coding tree based on a given set of frequencies. From the tree,
bit-codes for each character are determined and then used to encode a message. The tree
is also used to decode an encoded message as it provides a way to determine which bit
sequences translate back to a character.

Refer to the text for a more detailed discussion on Huffman coding trees.

Assignment:
For this assignment, you will write three programs:

buildtree. Given a file that contains the frequency distribution for all 26 letters of the
alphabet plus four special characters (space, period, new-line, and end-of-message),
buildtree will generate two files: a huffman coding tree file and a file containing bit-code
assignments.

encode. Given the bit-code file generated by buildtree, and a text file containing a
message, encode will produce a binary _le that contains the encoded message.

decode. Given the huffman coding tree file generated by buildtree, and an encoded
message generated by encode, decode will reproduce the original message and output that
message to a text file.

You might also like