Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem 4: There are n animals who are sick and need to see a doctor. These animals are of different species: there are some horses,

image text in transcribed

Problem 4: There are n animals who are sick and need to see a doctor. These animals are of different species: there are some horses, some dogs, some cats, some goats, etc. Each animal ai must be seen for a total of hours: for example, one animal might require surgery that takes 10 hours, while another animal just has a cold and only needs to be seen for 1 hour. It is ok to spli s as you need: for instance, in the 10 hour surgery, one doctor can do 1 hour of the surgery, another could do 7, and a third could do 2 t this time between as many docto here are m doctors, and each doctor is able to treat certain species of an- imals, but not necessarily all (for example, some doctors might be able to treat dogs and cats, but not horses, goats, or elephants). Additionally, each doctor Dj has a cap C. on the total number of hours that she is able to work Assume all hi and Cj values are positive integers. Design an algorithm to determine how to assign doctors to animals so that each animal is seen for the required number of hours Problem 4: There are n animals who are sick and need to see a doctor. These animals are of different species: there are some horses, some dogs, some cats, some goats, etc. Each animal ai must be seen for a total of hours: for example, one animal might require surgery that takes 10 hours, while another animal just has a cold and only needs to be seen for 1 hour. It is ok to spli s as you need: for instance, in the 10 hour surgery, one doctor can do 1 hour of the surgery, another could do 7, and a third could do 2 t this time between as many docto here are m doctors, and each doctor is able to treat certain species of an- imals, but not necessarily all (for example, some doctors might be able to treat dogs and cats, but not horses, goats, or elephants). Additionally, each doctor Dj has a cap C. on the total number of hours that she is able to work Assume all hi and Cj values are positive integers. Design an algorithm to determine how to assign doctors to animals so that each animal is seen for the required number of hours

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

Database Basics Computer EngineeringInformation Warehouse Basics From Science

Authors: Odiljon Jakbarov ,Anvarkhan Majidov

1st Edition

620675183X, 978-6206751830

More Books

Students also viewed these Databases questions