Question: Design and Analysis of Algorithms Chapter 1 0 - - the Greedy Method 1 0 . 5 . 1 Let be a collection of objects
Design and Analysis of Algorithms
Chapter the Greedy Method
Let be a collection of objects with benefitweight values, What is an optimal solution to the fractional knapsack problem for assuming we have a sack that can hold objects with total weight Show your work.
Suppose we are given a set of tasks specified by pairs of the start times and finish times as Solve the task scheduling problem for this set of tasks.
Draw the frequency table and Huffman tree for the following string:
; dogs do not spot hot pots or cats
Describe an efficient greedy algorithm for making change for a specified value using a minimum number of coins, assuming there are four denominations of coins called quarters, dimes, nickels, and pennies with values and respectively. Argue why your algorithm is correct. You must explain your answer, why they work or why not.
Give an example set of denominations of coins so that a greedy change making algorithm will not use the minimum number of coins. You must explain your answer, why they work or why not.
Rumor spreading There are people, each in possession of a different rumor. They want to share all the rumors with each other by sending electronic messages. Assume that a sender includes all the rumors he or she knows at the time the message is sent and that a message may only have one addressee. Design a greedy algorithm that always yields the minimum number of messages they need to send to guarantee that everyone of them gets all the rumors.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
