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

  Create a program using c++

Create a program using C++ or Java that will automatically generate x numbers between a range provided by the user? For purposes of this project, the range can be 1-20 and store them in an array.

  Write a c++ program that creates and populate a tree

Write a C++ program that creates and populate a tree for an arithmetic expression. Then it should perform an in-order and a post-order traversal on the tree. The input of the program will be a text file with the arithmetic expressions in RPN.

  Write a context-free grammar for arithmetic expressions

Transform the context-free grammar obtained in Activity 5 to a pushdown automaton using the algorithm in Section 12.2.2. Turn in your solution by the date when Section 12.3 is finished.

  Complete binary tree

Think about an n-node complete binary tree T, where n=2^d - 1 for some d. Each node v of T is labeled with a real number x_v.

  Definitions and discussion on best-average-worst case

Definitions and discussion (0-complexity of algorithms discussed: best-average-worst case, doubly linked list, trees, binary trees, binary search trees, AVL, and b-tree.

  Show state of memory after processes by best fit algorithm

Using the best fit algorithm, show the state of memory after processes of 212K, 417K, 112K and 350K (in request order) arrive.

  A sorting algorithm is described as stable

A sorting algorithm is described as stable if equal elements are in the same relative order in the sorted sequence as in the original sequence.

  Determine the benefits of data mining to the businesses

Determine the benefits of data mining to the businesses when employing - Predictive analytics to understand the behavior of customers

  Create list of major steps to follow to get input

Create a list of major steps to follow to get input, process, and output desired information (software requirements). Refine the list to include individual refined steps (algorithm).

  Explain compression algorithms are often used in forensics

"Compression algorithms are often used in forensics. Suppose you are involved in a case and have been asked by the lawyer to explain, in general terms.

  Show how the following values would be stored by machines

Show how the following values would be stored by machines with 32-bit words, using little endian and big endian format. Assume each value starts at address 016. Draw a diagram of memory for each, placing the appropriate values in the correct (and ..

  Algorithm to produce a list of customers

Draw an algorithm to produce a list of customers from the Glad Rags Clothing Company's customer master file.

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