Questions tagged [np-hard]

NP-hard problems (Non-deterministic Polynomial-time hard problems) are those problems which are not easier than any problem in NP; in other words, an algorithm for an NP-hard problem can be used to solve any problem in NP by transforming the input in polynomial time. Problems which are in both NP-Hard and NP are known as NP-Complete.

178 questions
3
votes
2 answers

Partition a binary tree into k parts with similar sizes

I was trying to split a binary-tree into k similar-sized parts (by removing k-1 edges). Is there any efficient algorithm for this problem? Or is it NP-hard? Any pointers to papers, problem definitions, etc? -- One reasonable metric for evaluating…
jojer
  • 71
  • 1
  • 4
3
votes
2 answers

If A is NP-complete and if there is a reduction from A to B, does it imply that B is also NP-complete?

Suppose that A, B, and C are decision problems. Suppose also that A is polynomial-time reducible to B and that B is polynomial-time reducible to C. If both A and C are NP-complete, then does it imply that B is also NP-complete? I know that, if A is…
hugoinperson
  • 83
  • 2
  • 8
3
votes
1 answer

Complexity measurement of NP-complete

For example, the set-cover decision problem is known to be a NP-complete problem. The input of this problems is a universe U, a family S of subsets of U, and an integer k (). One thing that I'm confused with is that if we let k=1, then obviously…
kostio
  • 33
  • 4
3
votes
1 answer

Does anyone know if this is polynomially solvable?

Hi, I'm dealing with the following problem. You are given a matrix of size M x N with positive coefficients. The goal is to choose P columns such that maximal sum of all elements in each row of the resulting M x P matrix is minimized. For example,…
3
votes
1 answer

How to schedule different types of planks to form bridges

Suppose we want to walk from place $A$ to place $B$, but there are several rivers between them. In order to walk from place $A$ to place $B$, we need to build a bridge for each river. We have several types of planks. Different types of planks have…
wzb5210
  • 735
  • 2
  • 9
  • 16
3
votes
2 answers

Does Integer Linear Programming give optimal solution?

I am trying to implement a solution to a problem using Integer linear programming (ILP). As the problem is NP-hard , I am wondering if the solution provided by Simplex Method would be optimal ? Can anyone comment on the optimality of ILP using…
Shan
  • 5,054
  • 12
  • 44
  • 58
3
votes
2 answers

How is TSP NP-Hard?

I read the following in one of the answer on SO : The Traveling Salesman Problem, as normally posed, is to find the cheapest route connecting all cities. That isn't a decision problem, and we can't verify any proposed solution directly. We can…
Suhail Gupta
  • 22,386
  • 64
  • 200
  • 328
3
votes
1 answer

Need input on a potentially NP-hard maximal edge-weighted multi-cycle graph

Sorry for the complex name - it's kind of well-deserved. Let me present the problem. Context: I have a type of location network that I want to do some partitioning with. Definition of Problem: I have an undirected weighted graph G = {V,E,w} with a…
Some Newbie
  • 1,059
  • 3
  • 14
  • 33
2
votes
0 answers

How do we, or can we, show many-one reduction of 3-SAT to a decision problem X when X takes an input that itself is exponentially long?

This is the first question I ask in this forum concerning the NP-hardness proof of a decision problem X when some input to X is already exponentially long. Let's say we have a decision problem DECIDE and it takes as its input a boolean algebra along…
kerl_japan
  • 21
  • 2
2
votes
1 answer

Make the assumption that P = NP

Suppose P = NP, would that mean that Hamiltonian-Cycle is no longer NP-Hard? Hamiltonian-Cycle is a language where a given graph G contains a Ham-Cycle.
user7821248
2
votes
2 answers

Finding all possible simple path in an undirected graph is NP hard/ NP complete

The proof is needed: Finding all possible simple path in an undirected graph is NP hard/ NP complete. The graph may contain multiple edges between same pair of nodes, and loops. I have searched over, got some idea or discussion. But I need a direct…
2
votes
1 answer

Multiple Depot Vehicle Routing Problem Optaplanner

I am trying to customize Optaplanner for my particular use-case. I have been successful so far but now I am struck at the point where I need to have multiple depot and multiple location. Their main use-case seems to be under the assumption that all…
2
votes
1 answer

Maximally set-covering set of k elements

Given a universe of elements U={e_1....e_n}, I have a collection of subsets of these elements C={s_1...s_m}. Now given a positive integer k, I want to find a solution of k elements which cover a maximal number of subsets. A concrete example: I have…
o17t H1H' S'k
  • 2,541
  • 5
  • 31
  • 52
2
votes
1 answer

DAG & Graph: Simple path from s to t that goes via as many colored vertices as possible

I have two seperate problems both revolving around graphs and determining an approach to find a simple path from s to t that goes via as many blue vertices as possible. Additionally I have to determine which one of the two problems that is NP-Hard.…
2
votes
2 answers

Is longest possibly non-simple path in NP?

I know that the following problem is in NP-HARD: Given a simple graph G=(V,E), two vertices v, v' in V, an integer B, and a non-negative length function len: E-> Z+, is there a simple path from v to v' with length less than B? My question is: Given…
1 2
3
11 12