Question: Could help me solve for question number 7 please, thanks This is the exercise 1 of this assignment More challenging question (hint will be given
More challenging question (hint will be given in class) 7. [10pts) Design a greedy algorithm to solve the optimal merge pattern problem. In this problem, we have n sorted files of lengths fo, fi....-., and we wish to merge them into a single file by a sequence of merges of pairs of files. To merge two files of lengths m and m takes mi + m2 operations. Describe your algorithm in general, and illustrate it for files of lengths 10.7,3,5,9,2,3,2. (Can you make a connection with Huftiman codes and Exercise I of this assignment?)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
