2

I know that there are some problems that are very hard to solve in general, but become much easier and asymptotically faster if restricted to only integer values.

One such example would be sorting which can be done in O(n+M) if only integer values are allowed.

Another example (I think) is the undirected single source shortest path problem which seems to be solvable in linear time if all weights are positive integers.

My question now is which problems are significantly easier to solve if restricted to integer values (and why?)

Note: I obviously don't expect a complete listing, I just want to understand the general principle behind the speed up by restricting the problem space to integers.

JeD
  • 198
  • 6
  • 2
  • When you say "restricted to only integer values", do you really mean "restricted to only small integer values"? None of your examples actually works for arbitrary integers; the claimed speed-up is only possible if it's known that the values are small integers. 2. Despite your qualification, I'm not sure this question will have a good answer; it seems like it might be too broad to answer. I'm not sure you're going to get a single answer/principle that explains all instances of this phenomenom, as different algorithms may be fast for different reasons. I guess we'll see.
  • – D.W. Jun 27 '16 at 19:37
  • 1
    @D.W. Actually the single source algorithm by Thorup I linked is mostly independent on Integer size (assuming constant time multiplication). But yes, I expect most answers, if I get any, to be restricted to small integers. And yes, I probably won't get a grand theory of Integer restriction in the answers, but I find restricted cases interesting and hope to get some food for thought at least. – JeD Jun 27 '16 at 20:03