An Average Time Analysis of Backtracking
暂无分享,去创建一个
Formulas are given for the expected number of nodes in the backtrack tree that is generated while searching for all the solutions of a random predicate. The most general formulas apply to selection from any set of predicates that obeys the following conditions. Each predicate is the conjunction of t terms selected from a set of terms T. For any subset $T' \leqq T$, the probability that the predicate contains only terms from $T'$ depends only on the size of $T'$. The set T must remain unchanged if each variable $x_i $ is replaced by $p_i (x_i )$, where $p_i $ is a permutation function. The time needed to evaluate the general formulas is proportional to v, the number of variables in the predicate. More detailed consideration is given to predicates whose terms are random disjunctive clauses with s literals, $t = v^\alpha $ for some $1 < \alpha < s$, and the random selections are done with repetition. For this case the expected number of nodes is $\exp [O(v^{(s - \alpha )/(s - 1)} )]$. (Complete enumeration r...