1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Nonamiya [84]
3 years ago
8

g Suppose we want to compress a text consisting of 6 characters,a, b, c, d, e, fusingthe Huffman Algorithm. Give an example for

which the algorithm produces at least onecodeword of length 5. In other words, you are being asked to give a set of the characterfrequencies that results in the deepest tree.

Computers and Technology
1 answer:
Papessa [141]3 years ago
3 0

Answer:

e(a) = 0

e(b) = 10

e(c) = 110

e(d) = 1110

Explanation:

The Worst case will happen when f(a) > 2*f(b) ; f(b) > 2*f(c) ; f(c) > 2*f(d) ; f(d) > 2*f(e) and f(e) > 2*f(f).

Where f(x) is frequency of character x.

Lets consider the scenario when

f(a) = 0.555, f(b) = 0.25, f(c) = 0.12, f(d) = 0.05, f(e) = 0.02 and f(f) = 0.005

Please see attachment for image showing the steps of construction of Huffman tree:- see attachment

From the Huffman tree created, we can see that endcoding e() of each character are as follows:-

e(a) = 0

e(b) = 10

e(c) = 110

e(d) = 1110

e(e) = 11110

e(f) = 11111

So we can see that maximum length of encoding is 5 in this case.

You might be interested in
Create a TicTacToe class that initializes a 3x3 board of "-" values. We will use this class in future exercises to fully build o
kap26 [50]

Answer:

public class TicTacToe //Defining TicTacToe class

{

char board[3][3] ; //Creating a 2D array instance variable

TicTacToe() //Constructor to initialize the array with " - "

{

for( int i = 0;i<3;i++) //Loop for the row of array

{

for(int j = 0;j<3;j++) //Loop for the column of array

{

Board[i][j] = '-'; //Assigning "-" in each cell

}

}

}

public char getter() //Defining getter() method to return the array

{

return Board; //returning the array

}

}

8 0
3 years ago
Which is a connectionless protocol in the transport layer? What are the small chunks of data called?
xeze [42]

Answer:

User Datagram Protocol (UDP) , transport-layer segment.

Explanation:

The User Datagram Protocol is popularly known as UDP. It is defined as the communication protocol which is used across the internet for any time sensitive transmission like the DNS lookup or the video playback.

The UDP provides a unreliable and connectionless service to a invoking application.

The transport layers on sending side converts the application $\text{layer }$ messages which it $\text{receives}$ from the $\text{sending application process}$ into a transport layer segment called as the transport layer segments. This is achieved by breaking down the application messages into a smaller chunks and then adding the transport layer header into each chunk so as to create a transport layer segment.

6 0
3 years ago
Read 2 more answers
Which of the following statements about meta tags is TRUE?
Iteru [2.4K]

Answer:

I guess c no. is the answer

6 0
3 years ago
Read 2 more answers
Today's consoles and games have audio features that rival cinematic audio.<br> True or False?
Angelina_Jolie [31]

Answer:

true

Explanation:

4 0
3 years ago
Read 2 more answers
I need help making a rap song of my own !! Ty
Veronika [31]
What are u making it about?
6 0
3 years ago
Read 2 more answers
Other questions:
  • You can encrypt individual files, but microsoft recommends encrypting at what level?
    9·1 answer
  • Manuel is working on a project in Visual Studio. He wants to keep this program showing on the entire desktop, but he also needs
    7·1 answer
  • Who is responsible for customer service?
    14·1 answer
  • Differentiate between the broadcasting and telecommunication
    5·1 answer
  • Write a program that displays the following menu:
    8·1 answer
  • Being nice take the points​
    9·1 answer
  • What necessarily happens when a photographer chooses to give either the aperture or the shutter speed priority?
    10·1 answer
  • Write, in your own words, a one-two paragraph summary on the Running Queries and Reports tutorials. Apply critical thinking and
    10·1 answer
  • A. Why are the data known as raw facts? Explain.​
    14·2 answers
  • HELPPPPP 20 POINTS CORRECT ANSWER GETS BRAINLIEST<br>sorry wrong amount of points ;-;
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!