摘要:
循环不变式就是在进行循环时,在每次循环都保持不变的逻辑表达式,相当于数学归纳法证明的“断言”。算法导论第二章中关于循环不变式原文如下:We state these properties ofA[1 ‥j-1] formally as aloop invariant。We use loop invariants to help us understand why an algorithm is correct. We must show three things about a loop invariant:Initialization:It is true prior to the first 阅读全文
posted @ 2012-11-15 20:33
笨鸟阿拉
阅读(338)
评论(0)
推荐(1)

浙公网安备 33010602011771号