Введение
Класс сложности
a gentler introduction
In computational complexity theory, a computational problem H is called NP hard if, for every problem L which can be solved in non deterministic polynomial time, there is a polynomial time reduction from L to H. That is, assuming a solution for H takes 1 unit time, Hs solution can be used to solve L in polynomial time. As a consequence, finding a polynomial time algorithm to solve a single NP hard problem would give polynomial time algorithms for all the problems in the complexity class NP. As it is suspected that P≠NP, it is unlikely that such an algorithm exists. It is suspected that there are no polynomial time algorithms for NP hard problems, but that has not been proven. A simple example of an NP hard problem is the subset sum problem. Informally, if H is NP hard, then it is at least as difficult to solve as the problems in NP. However, the opposite direction is not true: some problems are undecidable, and therefore even more difficult to solve than all problems in NP, but they are provably not NP hard (unless P=NP).
более мягкое введение
a gentler introduction
In computational complexity theory, a computational problem H is called NP hard if, for every problem L which can be solved in non deterministic polynomial time, there is a polynomial time reduction from L to H. That is, assuming a solution for H takes 1 unit time, Hs solution can be used to solve L in polynomial time. As a consequence, finding a polynomial time algorithm to solve a single NP hard problem would give polynomial time algorithms for all the problems in the complexity class NP. As it is suspected that P≠NP, it is unlikely that such an algorithm exists. It is suspected that there are no polynomial time algorithms for NP hard problems, but that has not been proven. A simple example of an NP hard problem is the subset sum problem. Informally, if H is NP hard, then it is at least as difficult to solve as the problems in NP. However, the opposite direction is not true: some problems are undecidable, and therefore even more difficult to solve than all problems in NP, but they are provably not NP hard (unless P=NP).
В теории вычислительной сложности вычислительная задача H называется NP-трудной, если для любой задачи L, разрешимой за полиномиальное время с недетерминизмом, существует полиномиальное сведение от L к H. Иными словами, если предположить, что решение для H занимает единицу времени, то решение H можно использовать для решения L за полиномиальное время. Следовательно, нахождение алгоритма за полиномиальное время для решения одной NP-трудной задачи привело бы к алгоритмам за полиномиальное время для всех задач в классе сложности NP. Поскольку предполагается, что P≠NP, существование такого алгоритма маловероятно. Предполагается, что алгоритмов за полиномиальное время для NP-трудных задач не существует, но это не доказано. Простым примером NP-трудной задачи является задача о сумме подмножеств. Неформально, если H является NP-трудной, то она как минимум не легче задач из NP. Однако обратное неверно: некоторые задачи неразрешимы и, следовательно, еще сложнее, чем все задачи в NP, но при этом они не являются NP-трудными (если P=NP).
a gentler introduction
In computational complexity theory, a computational problem H is called NP hard if, for every problem L which can be solved in non deterministic polynomial time, there is a polynomial time reduction from L to H. That is, assuming a solution for H takes 1 unit time, Hs solution can be used to solve L in polynomial time. As a consequence, finding a polynomial time algorithm to solve a single NP hard problem would give polynomial time algorithms for all the problems in the complexity class NP. As it is suspected that P≠NP, it is unlikely that such an algorithm exists. It is suspected that there are no polynomial time algorithms for NP hard problems, but that has not been proven. A simple example of an NP hard problem is the subset sum problem. Informally, if H is NP hard, then it is at least as difficult to solve as the problems in NP. However, the opposite direction is not true: some problems are undecidable, and therefore even more difficult to solve than all problems in NP, but they are provably not NP hard (unless P=NP).
Определение
Задача принятия решений H является NP-трудной, если для любой задачи L из NP существует полиномиально-временное приведение от L к H.
Примеры
Все NP-полные задачи также NP-трудны (см. Список NP-полных задач). Например, задача оптимизации нахождения маршрута минимальной стоимости, проходящего через все вершины взвешенного графа, обычно известная как задача коммивояжёра, является NP-трудной. Другой пример – задача о сумме подмножеств: дано множество целых чисел, существует ли непустое подмножество, сумма элементов которого равна нулю? Это задача принятия решения, которая, к тому же, является NP-полной. Существуют задачи принятия решения, которые NP-трудны, но не NP-полны, такие как проблема останова. Эта проблема заключается в следующем: для заданной программы и её входных данных, завершится ли программа когда-нибудь или будет выполняться бесконечно? Это вопрос, на который можно ответить «да» или «нет», то есть это задача принятия решения. Легко доказать, что проблема останова NP-трудна, но не NP-полна. Например, задачу булевой выполнимости можно свести к проблеме останова, преобразовав её в описание машины Тьюринга, которая перебирает все возможные назначения значений истинности и останавливается, когда находит такое назначение, при котором формула истинна, а в противном случае зацикливается. Также очевидно, что проблема останова не принадлежит классу NP, поскольку все задачи в NP разрешимы за конечное число операций, а проблема останова, в общем случае, неразрешима. Существуют также NP-трудные задачи, которые не являются ни NP-полными, ни неразрешимыми. Например, язык истинных квантифицированных булевых формул разрешим за полиномиальное пространство, но не за недетерминированное полиномиальное время (если NP = PSPACE).