高等计算机演算法AdvancedComputerAlgorithms.pptVIP

  • 18
  • 0
  • 约4.96千字
  • 约 30页
  • 2020-06-05 发布于湖北
  • 举报

高等计算机演算法AdvancedComputerAlgorithms.ppt

高等計算機演算法 Advanced Computer Algorithms 課程內容: Design Methods Analysis Methods The theory of NP-completeness Design Methods Analysis Methods 教科書 Introduction to the Design and Analysis of Algorithms R.C.T Lee R.C. Chang S.S. Tseng Y.T. Tsai Second Edition 旗標代理 分數 期中考 35% 期末考 35% 報告 30% Algorithm A number of rules, which are to be followed in a prescribed order, for solving a specific type of problems A method that can be used by a computer to solve a problem. Computer Algorithm – Five Criteria Input Output Finiteness Definiteness Effectiveness Motivations of studying Algorithms Algorithm is everywhere Use computers efficiently Optimal solution NP-complete problems(Decision problems) NP-hard problems(Optimization problems) next Use computers efficiently Sorting algorithms 11, 7, 14, 1, 5, 9, 10 ↓sort 1, 5, 7, 9, 10, 11, 14 ? Insertion sort Quick sort Comparison with Two Algorithms Implemented on Two Computers The study of Algorithms: How to design algorithms How to validate algorithms How to analyze algorithms How to test a program How to design algorithm The study of algorithm design is almost a study of strategies How to analyze algorithm Measure the goodness of algorithms efficiency?(time/space) asymptotic notations: O( ) worst case average case amortized Measure the difficulty of problems NP-complete undecidable lower bound Is the algorithm optimal? 時間複雜度(time complexity)-worst case executing time 輸入量為n時,演算法的最大執行時間 O(1):常數時間(constant time) O(n):線性時間(linear time) O(log2n):次線性時間(sub-linear time) O(n2):平方時間(quadratic time) O(n3):立方時間(cubic time) O(2n):指數時間(exponential time) ? O(1)O(log2n)O(n)O(nlog2n)O(n2)O(n3)O(2n) Algorithm vs. Program Algorithm的表示方法 *虛擬碼(Pseudo Code) SPARKS, PASCAL-like, Nature Language *流程圖表示法(Flow-chart representation) A program is the expression of an algorithm in a progr

文档评论(0)

1亿VIP精品文档

相关文档