Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You are managing a company, and your employees are mostly working part - time, on different shifts. For example, you may have someone working from

You are managing a company, and your employees are mostly working part-time,
on different shifts. For example, you may have someone working from 9am to
11am, another one working from 10am to noon, and another one working from 1pm to 4pm. Up to now, you trusted them to always be at work during the shifts
allocated to them, so you never really went to see them at work. However, you
heard rumors that you have one (or more) employee who manages to sign in for the work shift (perhaps through a friend doing that for him/her) but who is actually not physically there. You decide that for one day, you will go check a few times, to see if everybody is there as expected. However, because you are quite busy, you want to limit the number of times you will go there. Still, you need to make sure that you cover everyone during their shift. For the example above, you could go check at
10am, and this would cover the first 2 employees, and then you could go again at 2pm to cover the last one (it is not possible to check them all at once...twice is the smallest number of times you need here). Note that you just want to check their
actual presence, not that they are truly there for their entire shift.
Give a greedy algorithm that would get as input the work time for each employee, and return a list of times that you would need to go check on them. You should
provide the following:
- Formal proof that the algorithm always returns a correct answer, using a stay ahead argument

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

Data Mining Concepts And Techniques

Authors: Jiawei Han, Micheline Kamber, Jian Pei

3rd Edition

0123814790, 9780123814791

More Books

Students also viewed these Databases questions

Question

3. Describe the strategic training and development process.

Answered: 1 week ago

Question

10. Microsoft Corporation

Answered: 1 week ago