虽然NP-hard问题在计算理论中被认为在最坏情况下难以求解,但在现实应用中这类问题往往能被有效处理。[1]依赖关系解析、类型检查、调度、旅行商问题和布尔可满足性问题等NP-hard问题在实践中很少遇到最坏情况,而是能在99.9%的实际输入上获得快速解决。[1]
从1991年至2015年间,算法加速相比硬件提升超过4500亿倍,这种算力的飞速发展使得原本被认为不可行的问题逐渐变成可解的。[1]即便是比布尔可满足性问题更复杂的SMT(满足模理论)问题也已在大规模生产环境中应用,亚马逊每天求解十亿个SMT问题,充分说明理论与实践之间的巨大差异。[1]
While NP-hard problems are theoretically considered intractable, they are frequently solved with efficiency in real-world applications, according to a discussion on Hacker News [1]. The article challenges the widespread misconception that such problems are fundamentally unsolvable by demonstrating their practical effectiveness across multiple domains [1].
The author argues that NP-hard problems rarely encounter worst-case scenarios in actual use [1]. Despite their computational complexity in theory, these problems—including dependency parsing, type checking, scheduling, the traveling salesman problem, and Boolean satisfiability (SAT) problems—are routinely resolved quickly on 99.9% of real-world inputs [1]. Even more complex Satisfiability Modulo Theories (SMT) problems, which represent a harder class than standard SAT, are deployed at scale; Amazon processes approximately one billion SMT problems daily [1].
The gap between theory and practice has narrowed significantly over recent decades [1]. Between 1991 and 2015, algorithm improvements accelerated solutions by over 450 billion times relative to hardware improvements alone [1]. This substantial progress underscores that theoretical computational hardness does not preclude practical utility for NP-hard problems in contemporary applications [1].