Question: DYNAMIC PROGRAMMING OPTIMIZATION 3 Several coins lined up. You and a friend are splitting them. You take turns, taking one coin at a time. You

 DYNAMIC PROGRAMMING OPTIMIZATION 3 Several coins lined up. You and a

DYNAMIC PROGRAMMING OPTIMIZATION 3 Several coins lined up. You and a friend are splitting them. You take turns, taking one coin at a time. You can only take a coin from one of the two ends. How do you maximize your total value? following questions refer to the same example line of coins at the bottom. One strategy is called the greedy algorithm. It is to always take the largest coin available. For example, if the coins at the ends are 5 and 7, you would take 7, regardless of what the inside coins are. Use this strategy for the coins provided and determine what is the total value of your coins at the end. (Assume your friend applies the same strategy.) The greedy algorithm does not always give the most value. As your first move, what can you take so that you can guarantee that a 10 will be available for you on your second move? Assuming your friend is being really nice and wants you to have as much money as possible (within the confines of the rules), what is the most value that you can take? Assuming your friend is much more interested in money than in your friendship and wants as much money for themselves as possible, what do you think is the most value that you can take? [1, 2, 10, 3, 10, 5] DYNAMIC PROGRAMMING OPTIMIZATION 3 Several coins lined up. You and a friend are splitting them. You take turns, taking one coin at a time. You can only take a coin from one of the two ends. How do you maximize your total value? following questions refer to the same example line of coins at the bottom. One strategy is called the greedy algorithm. It is to always take the largest coin available. For example, if the coins at the ends are 5 and 7, you would take 7, regardless of what the inside coins are. Use this strategy for the coins provided and determine what is the total value of your coins at the end. (Assume your friend applies the same strategy.) The greedy algorithm does not always give the most value. As your first move, what can you take so that you can guarantee that a 10 will be available for you on your second move? Assuming your friend is being really nice and wants you to have as much money as possible (within the confines of the rules), what is the most value that you can take? Assuming your friend is much more interested in money than in your friendship and wants as much money for themselves as possible, what do you think is the most value that you can take? [1, 2, 10, 3, 10, 5]

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!