Question: For a given n, a sum tree for n is a full binary tree whose root is labeled n, whose leaves are labeled 1, and

 For a given n, a sum tree for n is a

For a given n, a sum tree for n is a full binary tree whose root is labeled n, whose leaves are labeled 1, and in which the children of a node labeled j have labels that sum to j. Every node should have a label >0. Given a cost table c[i], the cost of a node labeled i is c[i], and the cost of the tree is the sum of the cost of its nodes. a. What is the cost of a sum tree for 1? (in terms of cll) Vhat is the cost of a sum tree for 2? (in terms of c[1 and c2) c. An optimal sum tree for i is a sum tree for i of minimum cost. What to c7 are 1, 3, 11,20, 20, 21,26, 27? is an optimal sum tree for 8 if c d. Write down a formula that expresses the cost of an optimal sum tree in terms of the cost of smaller optimal sum trees. (Hint: In an optimal sum tree, the trees rooted at the left and right children of the root form optimal sum trees.) finds the cost of the optimal sum tree for n, given n and clil, for i

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!