7

Is there any NP-hard problem that we can find a mechanical "polynomial time" solution to? For example, suppose we construct a graph out of something physical, e.g. we have have pipes through which we can move water. If this pipe system was suitably built, could we solve say some routing problem by seeing if water flows from one node to another?

So by a mechanical solution, I mean a physical configuration and not a computer program, i.e. I am not looking for a computer algorithm. I also used "polynomial mechanical solution" to describe a solution on a physical device that runs in time polynomial in the order of the input. For example, a piping system could yield the answer in "number of nodes squared" seconds.

babou
  • 19,645
  • 43
  • 77
user34391
  • 81
  • 4

3 Answers3

7

No.

Unless $P=NP$, it's unlikely that any mechanical process can solve an $NP$-hard problem efficiently. Given a mechanical approach to solving a problem, we could run a physics simulation on a computer to get the same result.

Of course this depends on being able to simulate what happens in the real world efficiently. In order for "mechanical polynomial time" to be stronger than "polynomial time" you'd need to find some physical process that can not be simulated efficiently. One possible candidate would be quantum mechanics but that doesn't seem to be what you're asking about (and it is speculated that even quantum computing doesn't allow one to solve $NP$-hard problems efficiently).

Tom van der Zanden
  • 13,493
  • 1
  • 39
  • 56
7

Scott Aaronson examines "mechanical" solutions to NP-complete problems in the odd and entertaining paper "NP-complete Problems and Physical Reality". The paper is mostly theoretical discussions of increasingly exotic physical systems but Aaronson does indulge in a bit of empiricism; he tries to use soap bubbles to find Steiner trees. The results were negative:

In general, the results were highly nondeterministic; I could obtain entirely different trees by dunking the same configuration more than once. Sometimes I even obtained a tree that did not connect all the pegs.

Kyle Jones
  • 8,207
  • 2
  • 30
  • 52
1

I'd say "perhaps", but it depends on what you mean by "polynomial mechanical solution". For example, it is possible to sort in constant time in one sense: Given a collection of pieces of spaghetti of various lengths, one could sort them by length by picking up all of them, holding them vertically, and bringing them down on a flat surface. Having done that, the pieces will be sorted.

Now there are lots of perfectly reasonable objections to this algorithm, but in one sense, it does accomplish sorting in constant time, which we know is not possible, if for no other reason than that in the usual computational model it would take $n$ steps just to inspect $n$ strands to know their lengths.

Frankly, I don't know how one might apply this sort of construction to an NP-hard problem, but at the same time I'm not sure that it would be impossible. My feeling is that if one could come up with a solution like this, it would likely be regarded (as the spaghetti sort example) as nothing but a mildly amusing construction.

Rick Decker
  • 15,016
  • 5
  • 43
  • 54