1 / 27

Chapter 1 -- Introduction Chapter 2 -- Algorithms and Complexity

Chapter 1 -- Introduction Chapter 2 -- Algorithms and Complexity. 暨南大學資訊工程系 黃光璿 (Guan-Shieng Huang) 2005/02/21. A Rock Game. Alice vs Bob 10+10 Bob can solve 2+2. How about 20+20? Or, 10+10+10? The rule is: you can remove one rock from each pile or both of them.

jbrenna
Download Presentation

Chapter 1 -- Introduction Chapter 2 -- Algorithms and Complexity

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Chapter 1 -- IntroductionChapter 2 -- Algorithms and Complexity 暨南大學資訊工程系 黃光璿 (Guan-Shieng Huang) 2005/02/21

  2. A Rock Game • Alice vs Bob • 10+10 • Bob can solve 2+2. • How about 20+20? Or, 10+10+10? • The rule is: you can remove one rock from each pile or both of them. • The player who takes the last rock(s) wins the game.

  3. Alice • Move first. • Had learned Algorithm CSIE210022.

  4. Answer • If you had learned Finite Automata…

  5. What is an Algorithm? • Assignment • a:=1 • b:=a

  6. Arithmetic • a+b • a-b • (a+b)*c+a/d

  7. Conditional • if statement1 then statement2else statement3

  8. for loops • for i=1 to 100 do statement

  9. while loops • while statement1 dostatement2

  10. Array access • a[100] • a[a[i]]

  11. Biological Algorithms vs Computer Algorithms DNA DNA helicase topoisomerase single-strandbinding protein

  12. primase DNA polymerase 5’  3’

  13. DNA ligase

  14. Correct versus Incorrect Algorithms • Soundness • 所考慮到的情況都正確的處理 • Completeness • 考慮到所有可能的情況

  15. Recursive Algorithms • Tower of Hanoi Problem

  16. Iterative versus Recursive Algorithms

  17. Fast versus Slow Algorithms

  18. Big-O Notation • A function f(x) is O(g(x)) if there are positive real constants c and x0 such that f(x)≤g(x) for all values of x≧x0.

  19. Algorithm Design Techniques • Exhaustive Search • Branch-and-Bound Algorithms • Dynamic Programming • Divide-and-Conquer Algorithms • Machine Learning • Randomized Algorithms

  20. Tractable versus Intractable Problems • polynomial-time solvable problems • nondeterministic polynomial-time solvable problems • beyond P • P vs NP

More Related