Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I got the first part correct, which asked to build a Huffman tree. I wanted to know how to calculate the total units of time,

image text in transcribed

I got the first part correct, which asked to build a Huffman tree. I wanted to know how to calculate the total units of time, which is the 2nd question. please show steps when to enqueue, dequeue, build a sub tree! It seems the answer is between 29-32. thanks in advance!

(a) Given the following set of character-probability pairs: (C,0.05). (D.0.1). (R0.12). (S.0.13), (E,0.6) Show the final Huffman tree (you don't need to show any of the steps of the tree build process). Svi E: 0 o.4 D 1o1 2 110 .IS 0.25 D R S (b) How many total units of time did it take to build this tree? Count ONLY enqueue, dequeue, creating a leaf node, creating a new tree out of two subtrees, and comparing two probabilities each is unit time. (Ignore all other operations) All queues are initially empty, and must be empty when the process is completed

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

Information Modeling And Relational Databases

Authors: Terry Halpin, Tony Morgan

2nd Edition

0123735688, 978-0123735683

More Books

Students also viewed these Databases questions

Question

How do Excel Pivot Tables handle data from non OLAP databases?

Answered: 1 week ago