Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Suppose that you have the following kind of items: blueberries, raspberries, and blackberries. The weights of the three berries are 10 grams, 20 grams,

1. Suppose that you have the following kind of items: blueberries, raspberries, and blackberries. The weights of the three berries are 10 grams, 20 grams, and 12 grams, respectively. The cost per berry is 20 cents, 110 cents, and 60 cents. Suppose that you want to fill a 96 gram cup with berries such that you have the highest cost. Use a greedy method to solve the problem. Do you get the highest cost? Why or why not?

2. Suppose that you have a collection of compounds numbers 1 through 7. They have volumes W= {5, 20, 30, 10, 50, 35, 80} and costs C = {200, 400, 900, 60, 1000, 700, 2000}. You must fill a jar with volume 3500 with the most costly combination of chemicals. How does the greedy algorithm solve this problem?

3. There are a set of tasks that have the following start ad finish times. Use the greedy algorithm to find the minimum number of machines needed to perform the tasks. How are the tasks distributed among the machines. T = { (1, 10), (10, 18), (26, 32), (15, 19), (24, 20), (3, 12), (20, 25), (9, 28) }

4. Suppose you have the phrase "a black cat has a nasty smile on its face"

Please answer these questions asap

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

Step: 3

blur-text-image

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

Practical Oracle8I Building Efficient Databases

Authors: Jonathan Lewis

1st Edition

0201715848, 978-0201715842

More Books

Students also viewed these Databases questions

Question

7. What are the main provisions of the FMLA?pg 87

Answered: 1 week ago

Question

=+Are they specific or general in nature?

Answered: 1 week ago

Question

=+ What is the nature of the contracts or agreements with unions?

Answered: 1 week ago

Question

=+What is the procedure for labor relations in the workplace?

Answered: 1 week ago