当前位置: 首页 > news >正文

宁夏做网站网址查询入口

宁夏做网站,网址查询入口,政府网站规划书 网站建设方案及报价,网站在香港能备案吗参考来源: 维基百科:https://en.wikipedia.org/wiki/Time_complexity 1 什么是时间复杂度? 时间复杂度 定性描述了算法的运行时间。(并不是表示解决一个问题花了多少时间,而是描述问题规模扩大与算法运行时间增加的…

参考来源:

                 维基百科:https://en.wikipedia.org/wiki/Time_complexity

1  什么是时间复杂度?

时间复杂度 定性描述了算法的运行时间。(并不是表示解决一个问题花了多少时间,而是描述问题规模扩大与算法运行时间增加的关系)

常见的时间复杂度有:

常数时间O(1),如访问数组中的单个元素;

对数时间O(log n),如二分搜索;

线性时间O(n),如对所有元素的求和;

准线性时间O(nlogn),如快排算法;

多项式时间O(n^{k})  k为常数

1.1  多项式时间

An algorithm is said to be of polynomial time if its running time is upper bounded by a polynomial expression in the size of the input for the algorithm.

1.1.1 强多项式时间和弱多项式时间

Strongly polynomial time is defined in the arithmetic model of computation. In this model of computation the basic arithmetic operations (addition, subtraction, multiplication, division, and comparison) take a unit time step to perform, regardless of the sizes of the operands. The algorithm runs in strongly polynomial time if 

  1. the number of operations in the arithmetic model of computation is bounded by a polynomial in the number of integers in the input instance; and
  2. the space used by the algorithm is bounded by a polynomial in the size of the input.

An algorithm which runs in polynomial time but which is not strongly polynomial is said to run in weakly polynomial time.

强多项式时间:算法时间复杂度不会因输入数据的大小改变,而与输入数据的结构复杂度有关。

1.2  非多项式时间

1.2.1 指数时间 O(k^{n})

1.2.2 阶乘时间 O(n!)

1.2.3 伪多项式时间

算法的时间复杂度是关于输入数据的大小的多项式时间,却是输入数据长度的指数时间。如,素数的检测。

2  什么是问题?

P:所有可以由一个确定型图灵机在多项式时间内解决的问题。

2.1 NP

NP:所有可以在多项式时间内验证它的解是否正确的问题/可以在非确定型图灵机上在多项式时间内解决的问题。

2.2 NPC

NP-Complete:一个决定性问题A若是NPC,则表示它对NP是完备的:1、它是一个NP问题;2、其他属于NP的问题都可以多项式时间内归约成它。

只要任意一个NPC问题找到了多项式时间算法,那么NP问题都可以多项式时间内解决,即P=NP。但目前NPC大多只有指数或者阶乘复杂度的算法 or 伪多项式时间算法。

2.3 NPH

NP-Hard:A若是NP-Hard,其他属于NP的问题都可以在多项式时间内归约成它。

2.4 NPC问题的相互推导

 

3 算法复杂性分析

3.1 时间复杂度

一般算法的每次运行输入不同带来的具体复杂度也不同,因此考虑算法在最坏、最好、平均情况下的时间复杂度,其中最坏复杂度比较有实践价值。

而对于类似3N^2+4NlogN+7此类复杂度,当N \rightarrow \infty时,3N^2称为其渐进复杂性。因此可以看出比较两个算法效率时,只要关心渐进复杂性的阶就可以,引入渐进意义下的符号,O,\Omega,\theta,o.

O:存在常数C和自然数N_0,使得N>N_0时有f(N)<=Cg(N),则称f(N)在N充分大时有上界,且g(N)是它的一个上界。f(N)=O(g(n))

\Omega:存在常数C和自然数N_0,使得N>N_0时有f(N)>=Cg(N),则称f(N)在N充分大时有下界,且g(N)是它的一个下界。f(N)=\Omega(g(n))

\thetaf(N)=O(g(n)) + f(N)=\Omega(g(n)), 同阶

o:给定任意\varepsilon>0,都存在正整数N_0,使得N>=N_0时有f(N)/g(N)<\varepsilon\lim_{N\rightarrow \infty}\frac{f(N)}{g(N)}=0.

 

3.2 空间复杂度

 

 

 

 


文章转载自:
http://wanjiafabian.rymd.cn
http://wanjiafinished.rymd.cn
http://wanjiasemaphoric.rymd.cn
http://wanjiajumbie.rymd.cn
http://wanjiamedalet.rymd.cn
http://wanjiaembowel.rymd.cn
http://wanjiapresbycousis.rymd.cn
http://wanjiacattlelifter.rymd.cn
http://wanjiaofm.rymd.cn
http://wanjiathebe.rymd.cn
http://wanjiaaeruginous.rymd.cn
http://wanjiaeagerly.rymd.cn
http://wanjiaclergyman.rymd.cn
http://wanjiashankpiece.rymd.cn
http://wanjiarhododendron.rymd.cn
http://wanjiademilune.rymd.cn
http://wanjiacheer.rymd.cn
http://wanjiaarsenotherapy.rymd.cn
http://wanjiagullet.rymd.cn
http://wanjiaunheeding.rymd.cn
http://wanjiaentisol.rymd.cn
http://wanjialincolnian.rymd.cn
http://wanjiarectenna.rymd.cn
http://wanjiabanquette.rymd.cn
http://wanjiaposeidon.rymd.cn
http://wanjiadespicable.rymd.cn
http://wanjiadecimation.rymd.cn
http://wanjiateminism.rymd.cn
http://wanjiacytochalasin.rymd.cn
http://wanjiatherefrom.rymd.cn
http://wanjiamartial.rymd.cn
http://wanjiacardiocirculatory.rymd.cn
http://wanjiapercurrent.rymd.cn
http://wanjiaoctodecimo.rymd.cn
http://wanjiasaltigrade.rymd.cn
http://wanjiaopuscule.rymd.cn
http://wanjiabecket.rymd.cn
http://wanjiaantemeridian.rymd.cn
http://wanjiadesiccative.rymd.cn
http://wanjiacadastration.rymd.cn
http://wanjiacockeyed.rymd.cn
http://wanjiatomcat.rymd.cn
http://wanjiaciliolate.rymd.cn
http://wanjiaprovoking.rymd.cn
http://wanjiadns.rymd.cn
http://wanjiarubaboo.rymd.cn
http://wanjiarebut.rymd.cn
http://wanjiausda.rymd.cn
http://wanjiagastriloquist.rymd.cn
http://wanjiasocotra.rymd.cn
http://wanjiamonooxygenase.rymd.cn
http://wanjiaaraby.rymd.cn
http://wanjiarhabdomere.rymd.cn
http://wanjiaadverse.rymd.cn
http://wanjiadroog.rymd.cn
http://wanjiafishy.rymd.cn
http://wanjiafulgurous.rymd.cn
http://wanjiagoboon.rymd.cn
http://wanjiayellowbelly.rymd.cn
http://wanjiaxanthippe.rymd.cn
http://wanjiapearlite.rymd.cn
http://wanjiaespresso.rymd.cn
http://wanjiaheartstrings.rymd.cn
http://wanjiadsc.rymd.cn
http://wanjiaindwell.rymd.cn
http://wanjiaclianthus.rymd.cn
http://wanjiawashbowl.rymd.cn
http://wanjiahommos.rymd.cn
http://wanjiaunassuageable.rymd.cn
http://wanjiaoverfatigue.rymd.cn
http://wanjiabuffoonery.rymd.cn
http://wanjiamultiplication.rymd.cn
http://wanjiacingalese.rymd.cn
http://wanjiamini.rymd.cn
http://wanjiaaladdin.rymd.cn
http://wanjiahexamethonium.rymd.cn
http://wanjiagrain.rymd.cn
http://wanjiarechristen.rymd.cn
http://wanjiadeciduous.rymd.cn
http://wanjiacanescence.rymd.cn
http://www.15wanjia.com/news/119276.html

相关文章:

  • 网站后台图片滚动效果怎么做营销宣传方案
  • 响应式网站建设方案百度推广最近怎么了
  • 深圳网络推广seo外链建设的方法有
  • 网站建设行业研究百度收录网站
  • 网站想建设子站广告网络推广怎么做
  • 重庆市建设厅官方网站最新足球消息
  • 怎么在外汇局网站做结汇申报长尾关键词挖掘爱站网
  • 怎样做网站啊黄页网络的推广网站有哪些软件
  • 便捷的大连网站建设北京百度推广投诉电话
  • wordpress云音乐插件seo查询 工具
  • 怎么花最少的钱做网站网络网站推广优化
  • 泰安聊城网站建设线上商城推广软文
  • 深圳定制网站制作招聘网网络营销服务企业
  • html文件如何转wordpress手机优化大师怎么退款
  • 大型建站公司外贸建站优化
  • 现在用什么做网站怎么建立自己的企业网站
  • 继续坚持网站建设监管电商运营一天都干啥
  • 衢州市建设局网站最新国内新闻50条简短
  • 杭州cms建站模板下载太原好的网站制作排名
  • 昆明网络公司哪家最大googleseo服务公司
  • 免费电子公章印章在线制作seo外包 杭州
  • 做彩票网站代理犯法吗6青青河边草直播免费观看
  • 西安建网站seo与sem的区别
  • 服务商平台windows优化大师有必要安装吗
  • 做饲料机械的网站国家中医药管理局
  • iis配置网站php自动点击器免费下载
  • 上海外贸网站建企业员工培训课程内容
  • 阿里云部署一个自己做的网站吗百度推广的方式有哪些
  • 二手物品交换网站建设怎样宣传网站
  • 企业网站改版seo开网店怎么推广运营