zoukankan
html css js c++ java
算法分析---主定理
在算法分析中,主定理(英语:master theorem)提供了用渐近符号表示许多由分治法得到的递推关系式的方法。此方法经由经典算法教科书《算法导论》而为人熟知。不过,并非所有递推关系式都可应用主定理。该定理的推广形式包括Akra-Bazzi定理。
假设有递推关系式
,其中
为问题规模,为
递推的子问题数量,
为每个子问题的规模(假设每个子问题的规模基本一样),
为递推以外进行的计算工作。
情形一:
如果存在常数
,有
,并且是多项式的小于
那么
情形二:
如果存在常数
k
≥ 0,有
那么
情形三:
如果存在常数
,有
,并且是多项式的大于
同时存在常数
以及充分大的
,满足
那么
常用算法中的应用:
算法
递推关系式
运算时间
备注
折半搜索
情形二(
k
= 0)
二叉树
遍历
情形一
归并排序
情形二(
k
= 0)
查看全文
相关阅读:
1137 Final Grading (25 分)
1136 A Delayed Palindrome (20 分)
1135 Is It A Red-Black Tree (30 分)
1134 Vertex Cover (25 分)
1133 Splitting A Linked List (25 分)
1074 Reversing Linked List (25 分)
1132 Cut Integer (20 分)
HDU 3342 Legal or Not
IDEA解决JSP页面无法使用EL表达式问题
25. Bootstreap 下拉菜单
原文地址:https://www.cnblogs.com/jiangu66/p/3231157.html
最新文章
一文彻底搞懂MySQL分区
网络排错大讲解~
SVN安装后创建仓库、用户、上传代码
怎么手动升级更新ubuntu系统到最新版
thinkcmf apache rewrite文件
css3媒体查询尺寸
MySQL的ibdata1文件占用过大
急速浏览器怎么直接打开隐身模式
不错的Nginx详解
【总线】CAN总线
热门文章
【概念】垃圾回收机制
【c#】for、foreach
【概念】WMI概念及相关代码
【概念】车载控制器相关概念
【概念】多线程汇总(线程、委托、事件)
【c#】获取枚举的描述属性
【c#】CRC原理及相关代码
【c#】四舍五入
1141 PAT Ranking of Institutions (25 分)
1138 Postorder Traversal (25 分)
Copyright © 2011-2022 走看看