Questions tagged [np-complete]

NP-Complete refers to the hardest known problems within the complexity class NP. The "Traveling salesman problem" is one of the most widely known NP-Complete problems.

The classic method of attacking NP-complete problems is to try and prove that P = NP. Once a PTIME solution has been proven to exist for at least one NP-complete problem, that could be used to solve all of the others via reduction.

This is an active area of research. Communications of the ACM Volume 52, Number 9 (2009), Pages 78-86: The Status of the P vs NP Problem gives a good overview of the problem and current approaches to resolving it. (The article is freely available here.)

Apart from that, there are some approaches that can be used to get useful—although not optimal—solutions to NP-complete problems in practice:

  • Brute force
  • Heuristics that produce "reasonably good" results most of the time
  • Arbitrary approximation algorithms that can produce increasingly better solutions the longer they are allowed to run
  • Genetic algorithms, which try to find multiple "reasonably good" solutions and then "mutate" these solutions to get even better solutions.
340 questions
0
votes
1 answer

When NP complete becomes NP hard

Generally, assuming we have a NPC problem. Adding more constraint to it (making it more difficult), is it possible that problem become NPH? I know the difference between NPC and NPH but I don't know how to show that adding new constraints to…
Sara
  • 2,308
  • 11
  • 50
  • 76
0
votes
1 answer

Np completeness - Need some clarification in reduction

I wanted some clarification in a concept. For proving that a problem is NP complete, we use reductions. Now suppose I have L<=L'. has the reduction to be from L to L' or can I do it it the reverse way also? i.e Can I show that if L can be solved…
Aakash Anuj
  • 3,773
  • 7
  • 35
  • 47
0
votes
2 answers

Can it be proven no polynomial algorithm exists for an NP-Complete prob.?

I can't really seem to grasp what it really means to say a problem is NP-Complete. Could anyone help me with the following question? An NP-complete problem is a problem for which one can prove that an algorithm for solving it in polynomial time does…
StayPuff
  • 201
  • 1
  • 6
  • 13
0
votes
2 answers

Which metaheuristics are appropriate for building a Minesweeper solver?

I have to build a Minesweeper solver, but don't really know where to start. The problem is, I have to utilize some metaheuristic algorithm, like ant colony optimization, simulated annealing, genetic programming etc. I have found some related…
iCanLearn
  • 336
  • 1
  • 4
  • 17
0
votes
1 answer

graph coloring and NP completeness

I am having trouble understanding the NP completeness of graph coloring. If I assume a greedy coloring strategy (http://en.wikipedia.org/wiki/Graph_coloring#Greedy_coloring) with DFS, then I seem to be able to color graphs optimally. Could anyone…
0
votes
1 answer

Graph partitioning based on nodes and edges weights

I have a graph G=(V,E) that both edges and nodes have weights. I want to partition this graph to create equal sized partitions. The definition of the size of partition is sum(vi)-sum(ej) where vi is a node inside that partition and ej is an edge…
Masood_mj
  • 1,144
  • 12
  • 25
-1
votes
2 answers

What's the most efficient way to write a course timetabling system in PHP?

Problem: Given a set of obligatory and optional courses each being available only in certain time slots (there are 7 time slots) generate all possible timetables. Example: For obligatory courses: MAT101 - 1, 2, 5 HIS102 - 2, 4, 6 ENG105 - 3, 6,…
glithc
  • 135
  • 4
-1
votes
1 answer

3 partition np completeness

I want to know how 3 partition problem is NP complete ? We have to find triplets in set which sums to target. So isn't time complexity will be O(n^3) which is polynomial ? solution:…
user
  • 25
  • 7
-1
votes
1 answer

proof of SAT np completeness

I know if we want to prove the np completeness of some problem we must show these : there is a nondeterministic polynomial solution for the problem all other np problems are reducible to the problem in the case of sat problem it's easy to show…
-1
votes
1 answer

Classifying NP Completeness and Hardness

Choose the correct statement(s): (A) If X is an NP-complete problem, then X is an NP problem (B) If X is an NP-complete problem, then X is an NP-hard (C) Let X be an NP-complete problem. If X can polynomial reduce to a problem Y, then Y is an…
-1
votes
1 answer

Prove specific decision problem is NP-complete

Given: graph G Input: k Return: "YES" if there exists a set of k nodes, such that no two nodes are connected and no two nodes are connected to the same node. For example if (A,B) and (B,C) then A and C are not allowed in the set of k nodes. How…
lazycamper
  • 107
  • 1
  • 8
-1
votes
1 answer

A smarter function to decide if C is an exact cover of S?

The code works so far, but all these functions of split, new-list, and map just make it harder. Is there a mixture of set comparisons/differences to be able to do the same function that my code is doing? Edit: All these functions such as new_list is…
Travis Wells
  • 321
  • 1
  • 2
  • 11
-1
votes
1 answer

Prove that the reduction of HAM-CYCLE to TSP is polynomial-time?

This is a question that our professor uploaded yesterday, to prepare for our exam tomorrow. My problem with the question is part b (in boldface below); I'm not sure what I should do exactly. The Traveling Salesman Problem consists of a salesman and…
Faisal
  • 159
  • 9
-1
votes
2 answers

Np class of problems

Are All problems in NP are known to be reducible to one another. I know if a problem X is in NP and any NP problem Y in NP is reducible to X then X is NP-complete. So by this assumption can we state that all NP problems are reducible to one another?
-1
votes
1 answer

In complexity class P, accepts=decides. Why not NP?

Suppose some problem L is in the complexity class P. Then there is some polynomial time algorithm A that decides the problem. We have the following theorem: if A accepts L, then A decides L. The proof works by noting that if A runs in polynomial…
1 2 3
22
23