Question
fast Consider a hospital that has employed n nurses. You are given the job of assigning duties to them. The week is divided into m
fast Consider a hospital that has employed n nurses. You are given the job of assigning duties to them. The week is divided into m time slots, and you are required to assign a subset of time slots to each nurse. Each nurse i has specified a subset Ai of slots when he / she is available. The hospital has specified a number ci for each nurse i, which is an upper bound on the number of slots that can be assigned to him / her. Finally, the hospital has also specified a number dj for each slot, which is the number of nurses that are required to be present in slot j. From this input, you are required to output the set Bi of slots assigned to each nurse i, satisfying the following constraints. Each nurse is only assigned slots in which he / she is available. That is, Bi Ai for each i. Each nurse i is assigned at most ci slots. That is, |Bi| ci for all i. In each slot j, at least dj nurses are present. That is, for every j, at least dj sets out of A1,...,An contain slot j. Design an algorithm that outputs an assignment of slots to nurses satisfying the above constraints if such an assignment exists, and otherwise outputs NO. Prove that your algorithm is correct. Your algorithm must run in time polynomial in n and m.
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