Question: Problem 1 . Your coding club is organizing a long hackathon in a computer lab and you want to organize it in such a way
Problem Your coding club is organizing a long hackathon in a computer lab and you
want to organize it in such a way that for every point during a time window
at least one person is hacking in the lab.
Say you have coders and each person's availability to help out is
given by a continuous time interval, and that if they are going to code at all, they will
be coding for that entire interval. Formally, coder is available to help out in the time
interval and if they work at all, they will be in the lab from time to time
where iindots, Assume that you already know that you have enough volunteers
so that at each point in the time window there is at least one person able to
code. You therefore decide to solve the following coder selection problem: choose a
minimum number of volunteer coders to participate in the hackathon, to ensure there
will always be at least one person in the lab during the whole time window
a points Let be the set of coders that are able to code in a time window that
includes Written formally, this means
:
Let be the person in this group with the latest finish time among all
members of Prove that there exists an optimal solution to the coder selection
problem that uses as one of the coders.
b points Algorithm is pseudocode for a greedy procedure for choosing coders,
which takes in start times and finish times for the coders and the time window
that needs to be "covered". You can assume that for each time in there
is at least one coder whose shift "covers" that time
This code continuously updates and Explain what each of these represents.
Then prove whether this code will produce the optimal solution to the coder selection
problem.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
