Consider the following computer game: you have found some items of distinct values. On turn you take one of these items while the values of the remaining items are multiplied by a f D where D>1. On the next turn, you take one of the remaining items and also the other item multiplied by D, this continues until no items are remaining. Find an optimal greedy strategy gets the maximum score you can get. Write a pseudecode for a greedy strategy that get: maximum score. What is the complexity of your algorithm?? What is the output of your algor if the input values are {your birth day, your birth month, last two digits of your birth year}, a = 2. For example if the values are {2, 5, 3}, D=2 and you choose to get them in the given order score will be like this: • After the first iteration your score is 2 and the remaining values are {10, 6}. • After the second iteration your score is 12 and the remaining values are {12} After the last iteration your score is 24 and there are no remaining values.

Operations Research : Applications and Algorithms
4th Edition
ISBN:9780534380588
Author:Wayne L. Winston
Publisher:Wayne L. Winston
Chapter14: Game Theory
Section14.3: Linear Programming And Zero-sum Games
Problem 5P
icon
Related questions
Question
Consider the following computer game: you have found some items of distinct values. On each
turn you take one of these items while the values of the remaining items are multiplied by a factor
D where D>1. On the next turn, you take one of the remaining items and also the other items are
multiplied by D, this continues until no items are remaining. Find an optimal greedy strategy that
gets the maximum score you can get. Write a pseudecode for a greedy strategy that gets the
maximum score. What is the complexity of your algorithm?? What is the output of your algorithm
if the input values are {your birth day, your birth month, last two digits of your birth year}, and D
= 2.
For example if the values are {2, 5, 3}, D=2 and you choose to get them in the given order your
score will be like this:
• After the first iteration your score is 2 and the remaining values are {10, 6}.
• After the second iteration your score is 12 and the remaining values are {12}
• After the last iteration your score is 24 and there are no remaining values.
Your algorithm must be smart enough to get more than 24 for this example.
Transcribed Image Text:Consider the following computer game: you have found some items of distinct values. On each turn you take one of these items while the values of the remaining items are multiplied by a factor D where D>1. On the next turn, you take one of the remaining items and also the other items are multiplied by D, this continues until no items are remaining. Find an optimal greedy strategy that gets the maximum score you can get. Write a pseudecode for a greedy strategy that gets the maximum score. What is the complexity of your algorithm?? What is the output of your algorithm if the input values are {your birth day, your birth month, last two digits of your birth year}, and D = 2. For example if the values are {2, 5, 3}, D=2 and you choose to get them in the given order your score will be like this: • After the first iteration your score is 2 and the remaining values are {10, 6}. • After the second iteration your score is 12 and the remaining values are {12} • After the last iteration your score is 24 and there are no remaining values. Your algorithm must be smart enough to get more than 24 for this example.
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Linear Programming Concepts
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Operations Research : Applications and Algorithms
Operations Research : Applications and Algorithms
Computer Science
ISBN:
9780534380588
Author:
Wayne L. Winston
Publisher:
Brooks Cole