Home / Expert Answers / Computer Science / derive-a-greedy-strategy-solving-the-following-problem-we-have-a-company-with-n-workers-worker-wi-pa634

(Solved): Derive a greedy strategy solving the following problem: We have a company with n workers. Worker wi ...



Derive a greedy strategy solving the following problem: We have a company with n workers. Worker wi works a shift [si , fi ], where si is that worker’s start time and fi the finish time. (We will also refer to a shift as an interval, and you can assume 0 ≤ si < fi are integers.) We need to make an announcement over a loudspeaker and wish to repeat it as few times as possible, but still we need to ensure that all workers are present to hear it at least once. A worker hears an announcement if it falls between their start time s and their finish time f - this is inclusive in the sense they will also hear it if it occurs right at time s or f. For example, if we have worker intervals [1, 3], [2, 4], and [3, 5], a single announcement at time t = 3 will be heard by all three workers. The problem here is to find the smallest possible set A of announcement times such that all workers hear at least one announcement. This will be the case if for every worker w there exists a time t ∈ A such that s ≤ t ≤ f (where [s, f] is the shift of w).



We have an Answer from Expert

View Expert Answer

Expert Answer


We have an Answer from Expert

Buy This Answer $5

Place Order

We Provide Services Across The Globe