`
leonzhx
  • 浏览: 793632 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论
阅读更多

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.

 

分享到:
评论

相关推荐

    Introduction to algorithm(Third edition)Solutions

    4. **Chapter 11: Greedy Algorithms** - 贪心算法在每一步选择局部最优解,期望达到全局最优。本章可能讨论了活动安排、哈夫曼编码、网络流等问题的贪心策略。 5. **Chapter 13: Graph Search, Shortest Paths, ...

    Introduction to Algorithm, Instructor's Manual and Answers

    ##### 贪心算法(Chapter 16:Greedy Algorithms) - **贪心选择**:在每一步选择中都采取局部最优的选择。 - **证明正确性**:如何证明贪心算法能够得到全局最优解。 - **典型例子**:最小生成树、霍夫曼编码等。 ...

    算法导论习题答案(introduction to algorithms)

    **贪心算法** (Greedy Algorithms) 贪心算法在每个步骤中都做出局部最优的选择,希望这样能够导致全局最优解。这一章讨论了贪心算法的适用条件和设计原则,以及如何分析和证明贪心算法的正确性和效率,如霍夫曼...

    Introduction to bioinformatics algorithms(ppt)

    3. **贪心算法(Greedy Algorithm)**:在处理部分最优解可以组合成全局最优解的问题时,贪心算法很有用。例如,构建最小覆盖基因集或最短路径问题。 4. **图论算法**:生物网络,如蛋白质相互作用网络和代谢网络,...

    算法导论--Introduction.to.Algorithms

    原名: Introduction to Algorithms 作者: Thomas H. Cormen Ronald L. Rivest Charles E. Leiserson Clifford Stein 资源格式: PDF 版本: 文字版 出版社: The MIT Press书号: 978-0262033848发行时间: 2009年09月30...

    华南理工大学计算机全英班算法设计实验

    1.Introduction to the Greedy algorithm (1)Suppose that a problem can be solved by a sequence of decisions. (2)The greedy method has that each decision is locally optimal. (3)These locally optimal ...

    Algorithms Design and Analysis (Oxford)(pdf)

    Chapter 1 Introduction to Algorithms Chapter 2 Growth of Functions Chapter 3 Recursion Chapter 4 Analysis of Algorithms SECTION II Data Structures Chapter 5 Basic Data Structures Chapter 6 Trees ...

    Introduction to Algorithms Solution

    - 第十六章:贪心算法(Greedy Algorithms) - 第十七章:摊还分析(Amortized Analysis) - 第二十一章:不相交集合的数据结构(Data Structures for Disjoint Sets) - 第二十二章:基础图算法(Elementary Graph ...

    Hw c++ 1-3.zip

    提取码: ft34 1.Hw c++ 开始 Begining 2.Introduction 堆与贪心 Heap and greedy algorithm 3.Introduction 贪心陷阱 Trap of Greed algorithm

    Problem.Solving.in.Data.Structures.and.Algorithms.Using.Cplusplus.epub

    Designing an efficient algorithm to solve a computer science problem is a skill of Computer programmer. This is the skill which tech companies like Google, Amazon, Microsoft, Adobe and many others ...

    Problem Solving in Data Structures & Algorithms Using Java

    Designing an efficient algorithm to solve a computer science problem is a skill of Computer programmer. This is the skill which tech companies like Google, Amazon, Microsoft, Adobe and many others ...

    [算法导论].[Introduction.to.Algorithms].Third Edition

    书中还讲述了如何设计有效的算法,涉及多种算法设计技巧,如分治法(Divide-and-Conquer)、贪心法(Greedy algorithm)、动态规划(Dynamic programming)等。这些算法设计技巧是解决复杂问题的关键。此外,书中还...

    np难问题近似算法(绝版好书)

    3.7.3 A greedy algorithm for independent set in unweighted graphs 3.7.4 A local-ratio theorem and subgraph removal 3.7.5 Additional algorithms without preprocessing 3.7.6 Summary of approximations for...

    IntroductiontoAlgorithms,.Edition Solutions

    ### Introduction to Algorithms – Edition Solutions Overview The provided document offers solutions for exercises from the _Second Edition_ of _Introduction to Algorithms_, authored by Cormen, ...

    mastering.java

    We learn how to write an algorithm, what asymptotic analysis and notation are and the definition of a greedy algorithm. We learn how data structures and algorithms mesh together, the different ...

    graph theory

    图论与组合优化的紧密联系在“matroids”(拟阵)理论中得到了体现,拟阵是一类比图更加抽象的结构,但仍然继承了图的很多性质,如贪心算法(Greedy Algorithm)在这个框架下依然适用。拟阵理论在多个领域有重要应用...

    C++ Data Structures and Algorithms

    We begin with an introduction to C++ data structures and algorithms while also covering essential language constructs. Next, we will see how to store data using linked lists, arrays, stacks, and ...

Global site tag (gtag.js) - Google Analytics