2012年2月21日

loop invariant for Iterative algorithm {make progress: i-1 --> i?}

摘要: Repetition is an opportunity.Reconsidering Simple ExamplesA good martial arts student will attentively repeat each fundamental technique many times.In contrast, many college students tune out when a concept (eg. depth first search) is taught more than once.The better students listen carefully in ord 阅读全文

posted @ 2012-02-21 19:45 grepp 阅读(333) 评论(0) 推荐(0) 编辑

Math basic

摘要: Constant5Poly logarithmetic(logn)5Polynomialn5Exponential25nExp2n5Double Exp225nlinearO(n)QuadraticO(n2)CubicO(n3)高斯求和 wiki link12345......n=n(n+1)/2nn-1n-2n-3n-4......1=几何求和wiki link1248...2n=2(n+1)-11qq2q3...qn=(qn+1-1)/(q-1):proof:1+q+q2+q3+...+qn = Sn q+q2+q3+...+qn+qn+1 = qSn-qn+1 - 1 = (... 阅读全文

posted @ 2012-02-21 12:54 grepp 阅读(115) 评论(0) 推荐(0) 编辑

导航