2

The question may be stupid but it really confuses me for a long time.

I read a lot of papers in wireless sensor network. Many researchers model their problems into the form of ILP. However, ILP is NP-Complete so it is not efficient for solving a problem.

So why people write their problems into the form of ILP? Do they do that to make their problem clear to see and easy to understand? Or do I make some mistakes understanding the relations between ILP and NPC?

I am really appreciated that you can help me to solve this question.

Codor
  • 17,447
  • 9
  • 29
  • 56
Ruisong
  • 33
  • 5
  • 1
    One fact about continuous LP: Simplex algorithm is exponential time in worst case scenario ([Klee–Minty cube](https://en.wikipedia.org/wiki/Klee%E2%80%93Minty_cube)), whereas Interior-point method is known to be polynomial time algorithm. Still, Simplex is much faster in practice than interior-point. 'Hard in theory' doesn't imply 'slow in practice', for instance Cplex implements many heuristics, search strategies, pre-processing before getting to the solution process itself. – serge_k Feb 12 '16 at 19:44

2 Answers2

2

Although the question might be considered off-topic, there are basically a few points to address.

  1. You are right that general integer linear programming is NP-hard.
  2. If a specific problem needs to be solved and general integer linear programming is the most specific way to formulate it, then nothing can be done about it; some problems are just hard to solve.
  3. In some cases, it is possible to use the LP relaxation instead, either as a heuristic or some approximation ratio can be proven.

The key point here is that integer linear programming is a widespread formalism for expressing problems. Basically I understand your question as the follwing one.

"Why do people use a model that is algorithmically hard to solve to describe practical problems?"

Well, if that shortcoming could be circumvented in general, it would be a good idea to express every problem there is in terms of sorting, which is algorithmically easy.

Codor
  • 17,447
  • 9
  • 29
  • 56
  • 1
    Hi, Codor. Thanks for your help and your answer really make me gain an even deeper understanding. – Ruisong Feb 12 '16 at 12:12
  • In some paper, people compare the results of their heuristic algorithms with those got from ILP. Do their just want to show their results can approximate to the optimal ones? By the way, what do you mean by sorting? – Ruisong Feb 12 '16 at 12:17
  • 2
    By _sorting_ I mean the rearrangement of entries to satisfy some predefined ordering, as in _Quicksort_. My comment is a bit exaggerated to communicate the point that if the model for representation of a problem could be chosen to be arbitrarily simple, then there would be no problem in the first place. – Codor Feb 12 '16 at 19:17
1

NP-hard refers to the complexity of algorithms in the worst case. For most NP-hard problems, we have effective algorithms (heuristic or exact) that perform well most of the time, even if they do not perform well in the worst case. ILP is therefore a very useful tool in practice, even if there are some problems that it doesn't do well on.

I have a hammer. There are some jobs that my hammer is just no good for, or would take a very long time on. But it's still a very useful tool, because it can do a lot of jobs for me very well.

ILP is, in many ways, the same thing.

LarrySnyder610
  • 2,277
  • 12
  • 24