Codeforces Round #296 Dvi2 D. Clique Problem (数学的大YY)

The clique problem is one of the most well-known NP-complete problems. Under some simplification it can be formulated as follows. Consider an undirected graphG. It is required to find a subset of verticesCof the maximum size such that any two of them are connected by an edge in graphG. Sounds simple, doesn’t it? Nobody yet knows an algorithm that finds a solution to this problem in polynomial time of the size of the graph. However, as with many other NP-complete problems, the clique problem is easier if you consider a specific type of a graph.

Considerndistinct points on a line. Let thei-th point have the coordinatexiand weightwi. Let’s form graphG, whose vertices are these points and edges connect exactly the pairs of points(i,j), such that the distance between them is not less than the sum of their weights, or more formally:|xi-xj|≥wi+wj.

Find the size of the maximum clique in such graph.

,只要心中有希望存在,就有幸福存在。

Codeforces Round #296 Dvi2 D. Clique Problem (数学的大YY)

相关文章:

你感兴趣的文章:

标签云: