[转载]freeSwitch基本操作(转载)
2015-12-14 12:03
197 查看
1. Greedy Algorithms : Iteratively make "myopic" decisions, hope everything works out at the end.
Example: Dijkstra's shortest path algorithm (processed each destination once, irrevocably)
2. Contrast with Divide & Conquer
a) Easy to propose multiple greedy algorithms for many problems.
b) Easy running time analysis.
c) Hard to establish correctness. (Most greedy algorithms are NOT correct.)
3. Proofs of Correctness :
a) Induction. ( i.e. correctness proof for Dijkstra's algorithm)
b) "Exchange argument"
-- by Contradiction ( to assume there is some optmial algorithms else )
-- convert the assumed optimial algorithms to the one to be prooved without making it worse
4. The Optimal Caching Algorithm :
Theorem: The "furthest-in-future" algorithm is optimal (i.e., minimizes the number of cache misses).
1. Serves as guideline for practical algorithms (e.g., Least Recently Used (LRU) should do well provided data exhibits locality of reference).
2. Serves as idealized benchmark for caching algorithms.
Example: Dijkstra's shortest path algorithm (processed each destination once, irrevocably)
2. Contrast with Divide & Conquer
a) Easy to propose multiple greedy algorithms for many problems.
b) Easy running time analysis.
c) Hard to establish correctness. (Most greedy algorithms are NOT correct.)
3. Proofs of Correctness :
a) Induction. ( i.e. correctness proof for Dijkstra's algorithm)
b) "Exchange argument"
-- by Contradiction ( to assume there is some optmial algorithms else )
-- convert the assumed optimial algorithms to the one to be prooved without making it worse
4. The Optimal Caching Algorithm :
Theorem: The "furthest-in-future" algorithm is optimal (i.e., minimizes the number of cache misses).
1. Serves as guideline for practical algorithms (e.g., Least Recently Used (LRU) should do well provided data exhibits locality of reference).
2. Serves as idealized benchmark for caching algorithms.
相关文章推荐
- linux怎样使用top命令查看系统状态
- 编译型语言和解释型语言的区别
- React Native 使用问题记录
- [转]向上转型与向下转型
- LeetCode 70:Climbing Stairs
- Matlab矩阵填充--Matlab interp2
- Go 的文件系统抽象 Afero
- 天气预报简单接口的实现
- [转载]ROS下的PPTP配置
- 从收到报文到处理报文
- Spring深入学习:jar包详解
- ArcGIS教程:成本回溯链接 (空间分析)
- JavaScript简介、语法
- Linux配置启动挂载:fstab文件详解
- 向Android源码目录添加新的git目录
- JSTL 核心标签库 使用
- JAVA反射系列之Field,java.lang.reflect.Field使用获取方法
- 安装SQl 2008为SQL Server代理服务提供的凭据无效(转)
- JAVA设计模式之:单例模式
- 图学java基础篇之集合