Draw the human encoding tree of these six characters

Assignment Help Data Structure & Algorithms
Reference no: EM13328720

1. Suppose we want to nd the minimum spanning tree of the graph above.
(a) Suppose Prim's algorithm is run on this graph; whenever there is a choice of nodes, always use alphabetic ordering (i.e., V 1 to V 9, then V A; V B; V C). In what order are the edges added to MST?
(b) Suppose Kruskal's algorithm is run on the same graph. Edges of same length are ordered alphabetically. In what order are the edges added to MST?
2. Show how to nd the maximum spanning tree of a graph, that is, the spanning tree of largest total weight.
3. Given two sets A and B, each containing n positive integers, your goal is to reorder the value in each set such that

343_pie.pngis maximized, where ai and bi are the i-th value in each set after reordering. Design a greedy algorithm and show that it is optimal.
4. A long string consists of the six characters A, B, D, D, E, F; they appear with frequency 14%, 6%, 19%, 17%, 21%, and 23%, respectively.
(a) Draw the Hu man encoding tree of these six characters.
(b) What is the Hu man encoding of these six characters?
(c) If this encoding is applied to a string consisting of 1,000,000 characters with the given frequencies, what is the length of the encoded string in bits?

Reference no: EM13328720

Questions Cloud

Find the speed of one object with respect to the other : A person in Inertial system S sees two objects moving parallel to one another on a straight path. Find the speed of one object with respect to the other
How fast did the cat run : A cat is being chased by a dog. Both are running in a straight line at constant speeds. How fast did the cat run
Explain what concentration of sulfuric acid remains : Write the balanced neutralization reaction between H2SO4 and KOH in aqueous solution. .150 L of .430 M H2SO4 is mixed with 0.100 L of .230 M KOH. What concentration of sulfuric acid remains after neutralization
Calculate the magnitude of vector : A carnival merry-go-round rotates about a vertical axis at a constant rate. A man standing on the edge has a constant speed of 3.26 m/s, What is the magnitude of r vector
Draw the human encoding tree of these six characters : Show how to nd the maximum spanning tree of a graph, that is, the spanning tree of largest total weight.
Explain the balanced cell reaction : A galvanic cell is constructed with a silver-silver chloride electrode, and a nickel strip immersed in a beaker containing 1.56 x 10-2 M solution of NiCl2. Determine the balanced cell reaction and calculate the potential of the cell. Enter in Volt..
Determine the magnetic field at the center of the arc : A very long straight wire carries current 44 A. In the middle of the wire a right-angle bend is made. Determine the magnetic field at the center of the arc
Determine what coupon rate should aj pharmaceuticals set : AJ Pharmaceuticals would like to issue 20-year bonds to obtain the remaining funds for the new, Mexico plant. The company currently has 6.5% semiannual coupon bonds in the market that sell for $1,040 and mature in 20 years.
Define a solution is prepared by combining : A solution is prepared by combining .025 mole CaCl2 and .015 mol Pb (NO3)2 and adding water to make 1L of solution. Will a precipitate of PbCl2 form in this solution

Reviews

Write a Review

Data Structure & Algorithms Questions & Answers

  How to use depth-first search to find out in time

Illustrate how to use depth-first search to find out in time O(|E|+|V |) whether undirected graph is 2-colorable. Describe and explain your strategy.

  Design a circular double linked list

Design a circular double linked list, for which the following operations should be implemented

  Algorithm for locating nth successor in circlar linked list

Write algorithm or code segment for locating nth successor of an item in circlar linked list (the nth item that follows the given item in the list).

  Determine algorithm for cs curriculum consists of n courses

Determine an algorithm which works directly with this graph representation, and calculates minimum number of semesters necessary to complete the curriculum.

  Implement a method to delete every node

Call the structure for the nodes of the tree WordNode, and call the references in this structure left and right. Use Strings to store words in the tree. Call the class implementing the binary search tree WordTree.

  Postorder traversal print a heap in sorted order?

Will preorder, inorder, or postorder traversal print a heap in sorted order? why or why not? use the following numbers to prove your point 85 86 88 89 90 91 92

  Creating an idef1x diagram

Construct an IDEF1X diagram that demonstrate only entities and relationships. Name each relationship and specify its cardinalities.

  Prepare a japplet with a jbutton

Prepare a JApplet with a JButton labeled Who is number one and when the user clicks on button, display your favorite sports team. Save the document as JNumberOne.java.

  Learning for numeric prediction

Write down the output (class) values and number of instances that appear in each of the leaf nodes A, B and C of the tree - Learning for Numeric Prediction

  Identify the most important facts about the diet

Identify the most important facts about the diet. State your opinion about the diet.Support your opinion with relevant facts or research

  Opens an output file with the external name

Design an algorithm that does the following: opens an output file with the external name number_list.dat, uses a loop to write the numbers 1 through 100 to the file and then closes the file.

  Cloud computing assignment

WSDL service that receives a request for a stock market quote and returns the quote

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd