Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Qs 1. Write a function that uses huffman coding to generate prefix code of the letters in the string MYIDISONETWOTHREETHREE Instructions: 1.This code should be

Qs 1. Write a function that uses huffman coding to generate prefix code of the letters in the string MYIDISONETWOTHREETHREE

Instructions:

1.This code should be done in c or c++ in codeblocks.

2.The code should not be copied from any Internet source. The coding must be done in easy approach and should not use any direct function which generates the huffman coding simply or reduce the coding part. It should be done manually that means do not use any function which is inbuilt that generates the huffman coding directly which reduces the coding part and may use STL.. In a word The coding part should be simple but do not use any direct function to generate Huffman directly and do not copy from any source of internet

3. Please make sure that the answer of the generated code is correct.

I am uploading a random picture which shows how the sequence of execution will look like.

image text in transcribed

The functions in Question-1 and 2 will be in a single program and sequence of execution should look something like Figure 1. Step 1. Enter Student ID: 134436 Step 42. Generated String: MYIDISFOURFOURTHREESIX Step 3. Prefix Codes (Generated Using Huffman Coding): M: 1101 1100 I: 011 D: 1011 S: 0011 0010 O: 0001 0000 R: 010 T: 1010 1001 E: 111 X: 1000 Figure 1: Generating Prefix Codes Using Huffman Coding

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Visual Basic6 Database Programming

Authors: John W. Fronckowiak, David J. Helda

1st Edition

0764532545, 978-0764532542

More Books

Students also viewed these Databases questions