r/computerscience • u/NeighborhoodFatCat • Oct 24 '25
Discussion How do you practically think about computational complexity theory?
Computational complexity (in the sense of NP-completeness, hardness, P, PPAD, so and so forth) seems to be quite very difficult to appreciate in real-life the more that you think about it.
On the one hand, it says that a class of problems that is "hard" do not have an efficient algorithm to solve them.
Here, the meaning of "hard" is not so clear to me (what's efficiency? who/what is solving them?) Also, the "time" in terms of polynomial-time is not measured in real-world clock-time, which the average person can appreciate.
On the other hand, for specific cases of the problem, we can solve them quite easily.
For example, traveling salesman problem where there is only two towns. BAM. NP-hard? Solved. Two-player matrix games are PPAD-complete and "hard", but you can hand-solve some of them in mere seconds. A lot of real-world problem are quite low dimensional and are solved easily.
So "hard" doesn't mean "cannot be solved", so what does it mean exactly?
How do you actually interpret the meaning of hardness/completeness/etc. in a real-world practical sense?
View all comments
Show parent comment
0
u/NukeyFox Oct 24 '25
You can think of "time steps" not as a literal measurement of time using clocks, but rather the number of basic operations that you need to do before the program halts.
The prototypical model of computation that complexity theorist use is usually the Turing machine (though there are many others like RAMs or circuits).
If you recall a Turing machine consists of an infinite tape and a finite state machine that controls what the TM does when reading a tape symbol.
Here the basic operation is the updating of this finite state machine.
The choice of finite state machine if the TM determines the complexity class the problem falls under.
So let's say that the number of basic operations (i.e. updates of the finite state machine) needed to solve the problem is polynomial to the input size.
If this finite state machine is: