Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Fake Hospital with Real Issues The Great Fake Hospital ( TGFH ) wants its doctors to work over the holidays, but wants them to have
Fake Hospital with Real Issues
The Great Fake Hospital TGFH wants its doctors to work over the holidays, but wants them
to have a choice in the matter. So they ask each doctor to let them know on which holidays
they are available to work.
For the next holidays, TGFH has determined the exact number of doctors they want on duty.
Thus, on holiday they have a requirement that exactly doctors be present. Note that they
do not want more than or less than number of doctors, it must be exactly equal to If
the number of doctors present is less than the requirement, they will have to turn away some
patients and lose money If the number of doctors present is more than the requirement,
they have to pay extra salaries!
TGFH has a total of doctors. Each doctor is asked to provide a list of holidays on which
they are willing to work. Thus, doctor provides a set of days on which they are willing
to work.
TGFH has collected all this information. But they don't know what to do with it Nobody on
their team ever took a course on Intro. Algorithms
So they ask you for help!!
You need to take these lists and try to return to each doctor a list with the following
properties:
A is a subset of so that doctor only works on days that they find acceptable.
B If we consider the whole set of lists it causes exactly doctors to be
present on day i for dotsn.
a Design a polynomialtime algorithm that implements this system.
points
Specifically, give a polynomialtime algorithm that takes the numbers dots, and
the lists dots, and does one of the following two things:
Return lists dots, satisfying conditions A and B; or
Report correctly that there is no set of lists dots, that satisfy both proper
ties and
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started