Question
Qs 1. Write a function that generates a string considering the string MYIDISONETWOTHREETHREE Qs 2. Write a function that uses huffman coding to generate prefix
Qs 1. Write a function that generates a string considering the string MYIDISONETWOTHREETHREE
Qs 2. Write a function that uses huffman coding to generate prefix code of the letters in the string MYIDISONETWOTHREETHREE
For question 1 and 2 I am uploading a random picture which shows how the sequence of execution will look like.
(Instructions For question 1 and 2) This coding for question 1,2 should be done in c or c++ in codeblocks and both questions 1 and 2 should be in a single program.
2.Should not use any direct function which generates the huffman coding simply or reduce the coding part. It should be done manually that means don't use any function which is inbuilt that generates the huffman coding directly which reduces the coding part.
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 CodingStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started