Professional Documents
Culture Documents
Spring 2024 - CS301 - 2 - BC210409720
Spring 2024 - CS301 - 2 - BC210409720
Spring 2024 - CS301 - 2 - BC210409720
02
Total Marks: 20
SEMESTER Spring 2024
Lectures Covered:25-
CS301- Data Structures 26
Due Date: 24th June,
2024
Instructions
Please read the following instructions carefully before solving & submitting assignment:
It should be clear that your assignment will not get any credit (marks) if:
The assignment is submitted after due date.
The submitted assignment file is not in .doc or .docx format.
The submitted assignment file does not open or corrupted.
The assignment is copied (from other student or ditto copy from handouts or internet).
Uploading instructions
Do not wait for grace day. Grace Day is given only if there is problem with LMS on due date. Submit
your solution within due date.
Note that no assignment will be accepted through email if there is any problem in LMS on grace day.
Objective
The objective of this assignment is
To get hands on practice of constructing frequency table and Huffman encoding tree.
Marks: 20
Question. No. 1:
Consider the following string saved into a string type variable. We want to send it over the network to
another computer. Use the given string and answer (solve) the questions given below.
Character
Frequency
Number of
Bits used
without
any
encoding
Huffman
code of
each
character
Number of
Bits used
with
Huffman
encoding
b. Calculate how many bits will be used for the above string: [6 Marks]
Without using any encoding technique
With Huffman encoding technique
What percentage of bits is saved by Huffman encoding scheme?