Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem 3 . Tatte Like Latte Part One ( 1 0 points ) You have $ D to spend on pastries at Tatte. In the

Problem 3. Tatte Like Latte Part One (10 points)
You have $D to spend on pastries at Tatte. In the bakery display, you see exactly one of each item -
each has a price listed next to it, and you've personally assigned a rating of 1-10 as well. You want
to spend your money in an optimal way, i.e., you want to maximize the sum of ratings on your
items without going over $D.
Here are the items you can buy, along with their prices and your individual ratings:
(a) What would an optimal solution be if you have $10 to spend? What is the value of that solution
(i.e., what is the sum of all the ratings)?
Solution:
(b) Going by ratings (largest to smallest), what would a Greedy solution be assuming you have
$10 to spend? Is it an an optimal solution?
Solution:
(c) In some versions of this problem, we compute the ratio of value (ranking) to weight (price), as
shown in the table below. Using the rating-per-dollar as the way each item is evaluated, what
would a Greedy solution be assuming you have $10 to spend? Is it an an optimal solution?
Solution:
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases And Python Programming MySQL MongoDB OOP And Tkinter

Authors: R. PANNEERSELVAM

1st Edition

9357011331, 978-9357011334

More Books

Students also viewed these Databases questions