Question: we have a huffman coding dictionary for typical English. With help of any programing language, please apply the dictionary to encode the following poem and

we have a huffman coding dictionary for typical English. With help of any programing language, please apply the dictionary to encode the following poem and calculate the number of bits needed (for simplicity, please ignore punctuation). Please also apply fixed length coding to the same poem and calculate the number of bits needed as well. Show your calculation, if needed.

A Prayer in Spring

BY ROBERT FROST

Oh, give us pleasure in the flowers today;

And give us not to think so far away

As the uncertain harvest; keep us here

All simply in the springing of the year.

Oh, give us pleasure in the orchard white,

Like nothing else by day, like ghosts by night;

And make us happy in the happy bees,

The swarm dilating round the perfect trees.

And make us happy in the darting bird

That suddenly above the bees is heard,

The meteor that thrusts in with needle bill,

And off a blossom in mid air stands still.

For this is love and nothing else is love,

The which it is reserved for God above

To sanctify to what far ends He will,

But which it only needs that we fulfil.

Number of bits with Huffman Coding

Number of bits with Fixed Length Coding

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!