说一个算法是 efficient,是指它有着多项式运行时间,即,能在多项式步骤内终止。
An algorithm $A$ runs in polynomial time if there exists a polynomial $p$ such that, for every input $x \in \{0, 1\}^∗$, the computation of $A(x)$ terminates within at most $p(|x|)$ steps. (Here, $|x|$ denotes the length of the string $x$.)
—- J. Katz and Y. Lindell. Introduction to modern cryptography 2nd. CRC Press, 2014. p48.
与这个概念相关的另一个概念是 PPT(Probabilistic Polynomial Time),是指一个算法既是随机的同时也有着多项式运行时间。概率型是指算法的输出并不仅由输入决定,而是从一个与输入有关的均匀随机分布中抽取的。