Question

What is the worst case runtime for creating a Huffman Tree for N characters, and the...

What is the worst case runtime for creating a Huffman Tree for N characters, and the run time to combine the trees is O(size of resulting tree)?

Homework Answers

Answer #1

Answers:-

Huffman Tree

  • The worst case runtime for creating a Huffman tree is occurred if the probability of the symbol overreach 2(-1) =0.5 , this will make upper limits of the incompetency limitless i.e if the probability of characters are more in the input text then it would produce bad compression.
  • Huffman tree for N characters and the run time to combine the trees is O(nlogn) and also it requires O(logn) to determine the less weight and insert new weight in the iteration of huffmans tree.
Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Fill in the following table, using Big-O notation to give the worst and average-case times for...
Fill in the following table, using Big-O notation to give the worst and average-case times for each of the stack methods for a stack of size N. OPERATION WORST-CASE TIME AVERAGE-CASE TIME constructor empty size push pop peek
A program has runtime proportional to (log n)7 where n is the input size. Suppose we...
A program has runtime proportional to (log n)7 where n is the input size. Suppose we run the program with input size 10 and the runtime is 35 ms. What will the new  runtime be in seconds when we increase the input size to ten billion?.
What is the worst-case time (in Big-O) for building a Min-Heap of N nodes, using bulk...
What is the worst-case time (in Big-O) for building a Min-Heap of N nodes, using bulk insertion (bottom-up construction), assuming comparing two keys takes constant time. Justify your answer. You may assume N = 2h+1 – 1, for simplicity.
what is the best and worst case for o(n^2) ? I need example with explanation. DEEP...
what is the best and worst case for o(n^2) ? I need example with explanation. DEEP explanation and at least 3 example.
Analyze the worst case running time of the following code in “big-Oh” notation in terms of...
Analyze the worst case running time of the following code in “big-Oh” notation in terms of the variable n. a. void fdisp1(int n) { for(int i=0; i < n; i++) { for(int j=0; j < n; j++) { for(int k=0; k < n; k++) { for(int m=0; m < n; m++) { System.out.println("Hi I am Here"); } } } } } b. voidprintAllPossibleOrderedPairs(intarr[], int size) { for (int i = 0; i < size; i++) { for (int j =...
a) Please Select All That Apply: What are the possible applications of Priority Queue?      CPU Scheduling...
a) Please Select All That Apply: What are the possible applications of Priority Queue?      CPU Scheduling All queue applications where priority is involved.               kernel of NT for keep track of process information b) Running Time Analysis: Give the tightest possible big-O upper bound for the worst case running time for each operation listed below in terms of N. Assume no duplicate values and that you can implement the operation as a member function of the class – with access to...
Trees with the most leaves. (a) If T is a tree with n vertices, what is...
Trees with the most leaves. (a) If T is a tree with n vertices, what is the most leaves that it can have? Your answer will be an expression involving the variable n. Explain your reasoning. Be sure to address small values for n (e.g., n = 1 or 2). (b) Draw a tree with eight vertices that has the most number of leaves possible.
You have a sampling plan of n = 55, c = 5. What is the worst...
You have a sampling plan of n = 55, c = 5. What is the worst defect rate that your sampling plan will accept 1/3rd of the time?
1. Given an n-element array A, Algorithm X executes an O(n)-time computation for each even number...
1. Given an n-element array A, Algorithm X executes an O(n)-time computation for each even number in A and an O(log n)-time computation for each odd number in A. What is the best-case running time of Algorithm X? What is the worst-case running time of Algorithm X? 2. Given an array, A, of n integers, give an O(n)-time algorithm that finds the longest subarray of A such that all the numbers in that subarray are in sorted order. Your algorithm...
Labour Relations Case Study- Chapter 3- U n i o n s : O b j...
Labour Relations Case Study- Chapter 3- U n i o n s : O b j e c t i v e s , P r o c e s s e s , S t r u c t u r e , a n d H i s t o r y Licensed practical nurses (LPNs) in British Columbia hospitals are represented by the Hospital Employees’ Union (HEU). There were approximately 5000 LPNs in British Columbia in 2009....