Skip to main content
QUICK REVIEW

[论文解读] Most Programs Stop Quickly or Never Halt

Cristian S. Calude, Michael Stay|ArXiv.org|Oct 26, 2006
Computability, Logic, AI Algorithms参考文献 11被引用 4
一句话总结

本文通过将概率空间扩展至程序空间和时间,对停机问题提出了一种概率分析,采用一种先验可计算的运行时间分布。证明了对于任意 k > 0,可以有效计算出一个时间界限 T,使得在程序未在 T 前停机的条件下,其在 T 之后停机的概率小于 2^{-k},表明长运行时间在实际上极为罕见。

ABSTRACT

Since many real-world problems arising in the fields of compiler optimisation, automated software engineering, formal proof systems, and so forth are equivalent to the Halting Problem--the most notorious undecidable problem--there is a growing interest, not only academically, in understanding the problem better and in providing alternative solutions. Halting computations can be recognised by simply running them; the main difficulty is to detect non-halting programs. Our approach is to have the probability space extend over both space and time and to consider the probability that a random $N$-bit program has halted by a random time. We postulate an a priori computable probability distribution on all possible runtimes and we prove that given an integer k>0, we can effectively compute a time bound T such that the probability that an N-bit program will eventually halt given that it has not halted by T is smaller than 2^{-k}. We also show that the set of halting programs (which is computably enumerable, but not computable) can be written as a disjoint union of a computable set and a set of effectively vanishing probability. Finally, we show that ``long'' runtimes are effectively rare. More formally, the set of times at which an N-bit program can stop after the time 2^{N+constant} has effectively zero density.

研究动机与目标

  • 通过将概率扩展至程序和时间,提供一种非量子的概率停机问题分析。
  • 证明对于任意 k > 0,可以有效计算出一个时间界限 T,使得在未于 T 前停机的条件下,程序在 T 之后停机的概率小于 2^{-k}。
  • 表明停机程序的集合可分解为一个可计算集合与一个概率实际上可忽略的集合的不相交并集。
  • 论证对于 N 位程序,显著长于 2^{N+constant} 的运行时间实际上密度为零。

提出的方法

  • 假设所有可能运行时间上存在一种先验可计算的概率分布,以定义程序与时间的联合概率空间。
  • 使用均匀程序分布与所选运行时间分布的乘积测度,计算条件停机概率。
  • 建立在未于 T 前停机的条件下,程序在 T 之后停机的概率被限制在 2^{-k} 以内,且 T 可有效计算。
  • 利用算法随机性表明,非随机的长运行时间实际上极为罕见。
  • 证明停机程序的集合是可计算集合与概率小于 2^{-k} 的集合的不相交并集。
  • 证明在时间 2^{N+constant} 之前未停机的程序,无法在之后某个算法非随机的时间点停机,这是由于此类运行时间的算法非随机性。

实验结果

研究问题

  • RQ1我们能否有效计算出一个时间界限 T,使得未于 T 前停机的 N 位程序在 T 之后停机的概率小于 2^{-k}?
  • RQ2停机程序的集合能否分解为一个可计算部分与一个概率实际上可忽略的部分?
  • RQ3对于 N 位程序,远长于 2^{N+constant} 的运行时间是否实际上极为罕见?
  • RQ4在极限情况下,运行时间分布的选择是否重要?若所有可计算分布均导致长运行时间的稀有性相似,则选择是否无关紧要?

主要发现

  • 对于任意 k > 0,可以有效计算出一个时间界限 T,使得在未于 T 前停机的条件下,程序在 T 之后停机的条件概率小于 2^{-k}。
  • 停机程序的集合可表示为一个可计算集合与一个概率实际上小于 2^{-k} 的集合的不相交并集,对任意 k > 0 均成立。
  • 对于 N 位程序,运行时间长于 2^{N+constant} 的情况实际上密度为零,无论选择何种可计算的运行时间分布。
  • 随着 N 增大,N 位程序在收敛图灵机上永不停机的概率趋于 1。
  • 在时间 2^{N+constant} 之前未停机的程序,无法在之后某个算法非随机的时间点停机。
  • 只要大多数长运行时间实际上极为罕见,该结果与可计算运行时间分布的具体选择无关。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。