1. T(n)=10log(n)+10 log(n) 2. T(n)=n+log(n) n 3. T(n)=nlog(n) nlog(n) 4. T(n)=log(10n+100) log(n) 5. T(n)=log10(n) log(n) 6. T(n)=log1.5(n) log(n) 7. T(n)=log(n^2) log(n) 8. T(n)=log^2(n) log^2(n) 9. T(n)=log^2(n)+nlog(n) nlog(n) "Practice" 1. T(n)=3,700,000 1 2. T(n)=10n^2 +2 n^2 3. T (n) = sin(360n/(2π)) 1 4. T(n) = 10n^2 +2log^3(n) n^2 5. T(n)=n^3/10−n^2 n^3 6. T (n) = 25ncos(2π(n mod 100)/100) n 7. T(n)=n^2/2+10nlogn n^2 8. T(n)=10nlog(2n)+5 nlog(n) 9. T (n) = n3 + n2 log(n2) n^3 10. T(n) = 1+π2(logn) log(n) 11. T(n)=n+sin(360n/(2π))logn n 12. T (n) = (10n^2 + 10)/n n Challenge 1. T(n)=n^2log(n)+nlog^2n n^2log(n) 2. T(n)=10√n+logn n^0.5 "computational complexity of Loops" def ones ( n ) : #O(n) res = [ 1 ] # 1= O(1) while len ( res ) < n : # 1 + 1 + ... + 1(n times) = O(n) res = res += [ 1 ] #1 + 1 .. + 1(n times) = O(n) return res # 0 = O(0) print ( ones ( 3 ) ) def ones ( n ) : # O(n^2) res = [ 1 ] # 1 while len ( res ) < n : # 1 + 1 ... + 1 = O(n) res = res + [ 1 ] # 2 + 3 + .... + n = n*(n+1)/2 - 1 = O(n^2) return res #O(0) print ( ones ( 3 ) ) def ones ( n ) : # O(n) res = [ 1 ] # 1 = O(1) while len ( res ) < n : # 1 + 1 + ... (log n times) = O(log n) res = res + res # 2 + 4 + ... + n = O(n) return res # 0 = O(n) print ( ones ( 3 ) ) def ones ( n ) : # O(n) res = [ 1 ] # 1 = O(1) while sum ( res ) < n : # 1 + 2 + ... + n = n*(n+1)/2 = O(n^2) res = res += [ 1 ] # 1 + 1 + ... + 1(n times) = O(n) return res # 0 = O(n) print ( ones ( 3 ) ) """ 11 | computational complexity""""##"表示需要注意"11.1 Big-Oh Notation""Polynomial bounds""""1. T(n)=n+10 O(n) (后面省略O)2. T(n)=2n n3. T(n)=5n+15 n4. T(n)=n^2 n^25. T(n)=2n^2 +n n^26. T(n)=n^2−10n−1 n^27. T(n)
This course introduces the classical mathematical models used to analyse com putat ion , including finite state automata, grammars, and Turing Machines. A com puter scientist should be able to distinguish between what can be com puted and what cannot. This distinct ion can only be made with a good scientific model of com puters and com putat ion . This course introduces the powerful idea of using a mathematical model to analyse com putat ion . This course describes a number of different models of com putat ion which were proposed and analysed over the past century. Many of these models were found to be equivalent, in the sense that they allow exactly the same com putat ion s to be carried out. Other models were shown to be less powerful, but simpler to implement, and so useful for some purposes.
文章目录第一章 计算模型Theorem 1.9 高效通用图灵机Theorem 1.10 不可计算函数的存在性Theorem 1.11 HALT不可计算哥德尔定理第二章 NP和NP完全性Theorem 2.6 NP两种定义的等价性Theorem 参考资料:计算复杂性 现代方法, 中文版 第一章 计算模型 Theorem 1.9 高效通用图灵机 存在图灵机U\mathcal{U}U使得U(x,α)=Mα(x)\mathcal{U}(x,\alpha)=M_{\alpha}(x)U(x,α)=Mα​(x)对于任意
http://download.csdn.net/source/2799218 http://download.csdn.net/source/2799234 http://download.csdn.net/source/2799250 相关资源: ppt课件: http://download.csdn.net/source/2418441 源代码: http://download.csdn.net/source/2419140 习题答案:http://download.csdn.net/source/2419155 *************************************************************** C语言经典之作,被誉为“近10年来最好的一部C语言著作” 哈佛、麻省理工、斯坦福、加州伯克利分校、耶鲁等诸多名校计算机专业教材 内容全面,覆盖C99标准,提供了对所有C99库函数的参考 精心选择的近500道习题,贴近实践 *************************************************************** 下载完,评论的同时,请点击评论框上方的五角星(共5个五角星),这样你的被扣的积分就可以返还了。 如果只评论,不点击小五角星,积分不会返还。 一定要先下载完,再评论。如果先评论后下载,或者在下载的过程中评论,积分同样不会返还。 *************************************************************** 更多linux、ARM和C语言资源请参考: http://blog.csdn.net/arkofnoach/archive/2010/10/23/5960560.aspx P = {problems solvable in polynomial time} Exp = {problems solvable in exponential time} R = {problems solvable in finite time} Halting Problem: Given a com puter program, does it ever halt (s...
本节书摘来自华章计算机《计算复杂性:现代方法》一书中的第1章,习题,作者 [美]桑杰夫·阿罗拉(Sanjeev Arora),博阿兹·巴拉克(Boaz Barak),译 骆吉洲,更多章节内容可以访问云栖社区“华章计算机”公众号查看。 column1 column2 column3 column1 column2 column3 co...
2018-09-06|作者:陈薇 编者按:如何自学机器学习?需要哪些数理基础?怎样从入门到进阶,成就大神之路?对于这些问题,作为毕业后投身机器学习研究的数学博士、微软亚洲研究院机器学习组主管研究员陈薇无疑是最有发言权的。在这篇书单推荐中,她从机器学习综述、算法优化、理论延展、数学基础四大方面入手,为大家提供一份机器学习的“完全指南”。 在这个言必谈“AI”的时代,机器学习是重要的算法内核,而数学是理解和改进机器学习算法的必经之路。因此,我将在这篇文章中梳理机器学习的关键模块和与之联系的数学理论分支,..