# CS301 Assignment 3 Solution 2021 - VU Answer

VU Answer Provides a Complete CS301 Assignment 3 Solution Spring 2021. Easy to View CS301 Assignment 3 Solution 2021 and Download PDF File.

CS301 UPDATE ASSIGNMENT 3 SOLUTION SPRING 2021

According to Announcement Section CS301 Assignment format will Be updated you can follow this Correct solution file.

STEP 1:

Count all the letters including space from the given text message.

SOLUTION:

Text Message = “virtual university”

Total No. of Letters = 18

STEP 2:

Draw a table with columns name letter, frequency, original bits, encoded bits

SOLUTION:

 Letter Name Frequency Original Bits Encoded Bits ASCII Code Binary

STEP 3:

Fill the table with letters, frequency and original bits (for original bits get ASCII code of each letter convert the decimal ASCII into 8 bits binary code).

SOLUTION:

 Letters Frequency Original bits Encoding bits ASCII Binary v 2 118 01110110 i 3 105 01101001 r 2 114 01110010 t 2 116 01110100 u 2 117 01110101 a 1 97 01100001 l 1 108 01101100 space 1 32 00100000 n 1 110 01101110 e 1 101 01100101 s 1 115 01110011 y 1 121 01111001

STEP 4:

Draw final Huffman encoding tree with the help of frequency table. (Step by step construction of Huffman encoding tree is not required).

SOLUTION:

Huffman Encoding Tree:

Recommend Draw your diagram using Data Flow Diagram (DLD) Software

STEP 5:

Get the encoded bits from tree and fill code of each letter in last column of table constructed in step 2.

SOLUTION:

 Letters Frequency Original bits Encoding bits ASCII Binary v 2 118 01110110 011 3*2 = 6 i 3 105 01101001 110 3*3 = 9 r 2 114 01110010 010 3*2 = 6 t 2 116 01110100 000 3*2 = 6 u 2 117 01110101 001 3*2 = 6 a 1 97 01100001 11110 5*1 = 5 l 1 108 01101100 11111 5*1 = 5 space 1 32 00100000 1010 4*1 = 4 n 1 110 01101110 1011 4*1 = 4 e 1 101 01100101 1001 4*1 = 4 s 1 115 01110011 1000 4*1 = 4 y 1 121 01111001 1110 4*1 = 4

Total Encoding Bits = 63

STEP 6:

Calculate the efficiency of Huffman encoding technique.

(For efficiency use total original bits, total compressed (encoded) bits and find what percentage of memory is saved with the help of Huffman encoding technique).

SOLUTION:

Total Original bits = 18*8 = 144

Total Encoding bit’s = 63

Percentage of memory bits = 56.25% bit’s memory saved with the help of Huffman Encoding

Make sure you can make some changes to your solution file before submitting copy-paste solution will be marked zero.

If you found any mistake then correct yourself and inform me.

Before submitting an assignment check your assignment requirement file.

If you need some help and question about file and solutions.

MORE ANY ASSIGNMENTS SOLUTION FREE