Is this MSP an instance of TSP?

In his book, Algorithm Design Guide, Stephen S. Lösen creates the following problem:

enter image description here

Now consider the following planning task. Imagine that you are a highly inflationary actor who has been presented with proposals to play a major role in the development of various film projects. Each offer comes with the first and last day of filming. To complete this work, you must record its availability throughout this period. Thus, you cannot simultaneously accept two tasks, the intervals between which overlap.

For an artist like you, the criteria for hiring are clear: you want to make as much money as possible. Since each of these films pays the same fee per film, this means that you are looking for the maximum possible set of tasks (intervals), so that none of them conflict with each other.

For example, consider the available projects in Figure 1.5 [above]. We can play no more than four films, namely “discrete” mathematics, programming, settlement bets and one of the “Horizontal state” or “Steiners Tree” states.

You (or your agent) must solve the following algorithmic planning problem:

Problem: Movie Scheduling Problem

Input: Set i of n intervals on a line.

Conclusion:. What is the largest subset of mutually non-overlapping intervals that can be selected from I?

Interestingly, this is an instance of TSP (possibly simplified)?

+1
source share
2 answers

This problem can be solved by simply selecting a movie with the earliest end date and, based on this, the O(n^2) process (there may be even faster solutions). Since we found a solution with polynomial time, this is not an instance of TSP if: (1) P = NP and (2) there is no embarrassing simple proof (1).

+1
source

Here's how to approach this problem:

  • Create a tree with the vertices being the films, and the edges will overlap. That is, two vertices are connected by an edge if their schedule overlaps. Thus, the problem can be reformulated as follows: "Let the graph G find the maximum subset of unconnected vertices."

  • Now this problem can be connected with the well-known NP-hard problem. In particular, create a graph G 'with the same vertices and auxiliary edges. That is, G 'has an edge between the vertices if the original graph G did not have it. Now the problem can be reformulated as follows: "Given the graph G," find the maximum clique, where the clique is a subset of vertices, all of which are connected to each other. "

Clique is a well-known NP-hard issue. Because your planning task is equivalent to Clique-voila! He is also NP-hard.

-2
source

Source: https://habr.com/ru/post/953742/


All Articles