preview

Case Study: Interval Scheduling

Decent Essays

Assignment #6

Question 1 (a): Is it the case that Interval Scheduling ≤p Vertex Cover?

Yes. The Interval Scheduling problem can be solved in time O(nlogn) without calling a function to solve the Vertex Cover problem. Therefore, the problem can be solved in a number of computations and a number of calls to the function (both polynomial) that returns the result for Vertex Cover problem. Hence, we can conclude that Interval Scheduling ≤p Vertex Cover.

Question 1 (b): Is it the case that Independent Set ≤p Interval Scheduling?

Unknown, because it would resolve the question of whether P = NP. Let’s suppose Y ≤p X. If X requires polynomial time to be constructed, then Y can be also be constructed in similar time. Now, Interval Scheduling can …show more content…

Suppose there is a set of counselors “k”. Now, we can verify in polynomial time that at least one counselor from this subset of counselors is skilled in all of the sports. Suppose a graph G and some number k. We assign every counselor to a node and each sport to some edge. For every sport a counselor is skilled in, the sport edge meets its node. We call the function for Efficient Recruiting to figure out if there exists a subset of counselors k who are qualified for each of the sports.

The function will return true if a subset of counselors skilled in each sport is found. So every sport edge meets one node (at least) in the subset of counselors. This set, therefore, is a vertex cover of k size.

We are aware that the Vertex Cover problem also returns true because a vertex cover with size k is found on the graph G. So, each sport edge meets one node (at least) in the vertex cover for the counselor subset assigned to the nodes within the vertex cover.

We also know that the Vertex Cover problem, in order to build the problem as Efficient Recruiting Problem, takes polynomial time. Hence, Vertex Cover ≤p Efficient Recruiting. We already know that Y ≤p X. If Y is NP-complete, then X is also NP-complete. Therefore, we can conclude that the Efficient Recruiting problem is …show more content…

First, we prove that the problem is in NP. Let’s assume there is a set of processes k, we compute in time O(k2m) (polynomial) that no resource requested by one of the processes is required by any other. We have processes n1 to nk loop over all k2 set of resources. For each of the sets, we say that ni and nj loop over all m resources to make sure that no resource is requested by both ni and nj at the same time. The solution is then correct if there is no such resource spread across all combinations of sets of processes. Otherwise, it is invalid.

Question 4 (b): The special case of the problem when k = 2.

When k = 2, we can solve the given problem with a polynomial time brute-force algorithm. For every set of n2 processes, we loop over m resources to determine if there are any resources in common between them. If they don’t, there are no sets of k = 2 processes with such resources. If they do, then there is a set of k = 2 processes with such resources.

Question 4 (d): The special case of the problem when each resource is requested by at most 2 processes.

This problem is a special case of (a) with each resource being requested by at most two processes. Therefore, the resource that is requested only by the vertices on the graph it is placed on. Hence we can say that it remains the same and problem is

Get Access