1

I am working on a Python package for computing several NP-Hard graph invariants. The current version of the package uses brute force for nearly all of the algorithms, but I am very interested in using integer programming to help speed up the computations for larger graphs.

For example, a simple integer program for solving the independence number of an n-vertex graph is to maximize formula given the constraints formula, where formula.

How do I solve this using PuLP? Is PuLP my best option, or would it be beneficial to use solvers in another language, like Julia, and interface may package with those?

damos
  • 81
  • 7

1 Answers1

0

I don't propose to write your full implementation for you, but to address the final question about PuLP versus other languages.

PuLP provides a Python wrapper over a range of existing LP Solvers.

Once you have specified your problem with a Python syntax, it converts it to another language internally (e.g. you can save .lp files, and inspect them) and passes that to any one of a number of third-party solvers, that generally aren't written in Python.

So there is no need to learn another language to get a better solver.

Oddthinking
  • 24,359
  • 19
  • 83
  • 121