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

Slides:



Advertisements
Similar presentations
Problems and Their Classes
Advertisements

Time Complexity P vs NP.
1 Chapter 7 Protein and RNA Structure Prediction 暨南大學資訊工程學系 黃光璿 2004/05/24.
Exact algorithms for the minimum latency problem Exact algorithms for the minimum latency problem 吳邦一 黃正男 詹富傑 樹德科大 資工系.
CS420 lecture one Problems, algorithms, decidability, tractability.
1 Chapter 2 Data Searches and Pairwise Alignments 暨南大學資訊工程學系 黃光璿 2004/03/08.
1 Chapter 3 Substitution Patterns 暨南大學資訊工程學系 黃光璿 (HUANG, Guan-Shieng) 2004/03/22.
Chapter 3 Top-Down Design with Functions Dr. J.-Y. Pan Dept. Comm. Eng. Nat. Chung Cheng Univ.
1 Chapter 5 Character–Based Methods of Phylogenetics 暨南大學資訊工程學系 黃光璿 (HUANG, Guan-Shieng) 2004/04/05.
1 高等演算法 Homework One 暨南大學資訊工程學系 黃光璿 2004/11/11. 2 Problem 1.
CS Master – Introduction to the Theory of Computation Jan Maluszynski - HT Lecture 1 Introduction Jan Maluszynski, IDA, 2007
1 Other Models of Computation. 2 Models of computation: Turing Machines Recursive Functions Post Systems Rewriting Systems.
Programming with Alice Advanced topics – Demo. Overview of topics Recursion Random Numbers Variables Arrays.
Algorithmic Complexity 2 Nelson Padua-Perez Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
34.NP Completeness Hsu, Lih-Hsing. Computer Theory Lab. Chapter 34P.2 為何學 NP-Complete 50 年前的電腦 ( 一間房間大 ) 可解的問題的極限 與現在電腦 ( 個人電腦 ) 可解的極限理論上是相 同的, 除非電腦的製程有重大突破.
Fall 2004COMP 3351 Time Complexity We use a multitape Turing machine We count the number of steps until a string is accepted We use the O(k) notation.
Analysis of Algorithms 7/2/2015CS202 - Fundamentals of Computer Science II1.
1 Recombinant DNA 暨南大學資訊工程系 2003/04/29. 2 大綱 Cut — 限制酶 Paste —DNA 接合酶 Copy —PCR Search —Southern Blotting Reading —Sanger Method.
1 Algorithm Design Techniques Greedy algorithms Divide and conquer Dynamic programming Randomized algorithms Backtracking.
Algorithmic Complexity 3 Fawzi Emad Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
Analysis of Algorithms Spring 2015CS202 - Fundamentals of Computer Science II1.
1 Multiple Sequence Alignment 暨南大學資訊工程學系 黃光璿 2004/05/31.
Discrete Mathematics Chapter 4 Induction and Recursion 大葉大學 資訊工程系 黃鈴玲 (Lingling Huang)
1 Complexity Lecture Ref. Handout p
Chapter Complexity of Algorithms –Time Complexity –Understanding the complexity of Algorithms 1.
CMPS 3223 Theory of Computation Automata, Computability, & Complexity by Elaine Rich ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Slides provided.
1 Chapter 24 Developing Efficient Algorithms. 2 Executing Time Suppose two algorithms perform the same task such as search (linear search vs. binary search)
JAVA: An Introduction to Problem Solving & Programming, 5 th Ed. By Walter Savitch and Frank Carrano. ISBN © 2008 Pearson Education, Inc., Upper.
Matt Schierholtz. Method for solving problems with finite steps Algorithm example: Error Check for problem Solve problem Must terminate.
DISCRETE MATHEMATICS I CHAPTER 11 Dr. Adam Anthony Spring 2011 Some material adapted from lecture notes provided by Dr. Chungsim Han and Dr. Sam Lomonaco.
Complexity theory and combinatorial optimization Class #2 – 17 th of March …. where we deal with decision problems, finite automata, Turing machines pink.
Computer Science: A Structured Programming Approach Using C1 6-9 Recursion In general, programmers use two approaches to writing repetitive algorithms.
Chapter 3 (Part 3): Mathematical Reasoning, Induction & Recursion  Recursive Algorithms (3.5)  Program Correctness (3.6)
© by Kenneth H. Rosen, Discrete Mathematics & its Applications, Sixth Edition, Mc Graw-Hill, 2007 Chapter 4 (Part 3): Mathematical Reasoning, Induction.
What is an Algorithm? An algorithm is a sequence of instructions that one must perform in order to solve a well formulated problem.
1 Chapter 1 Automata: the Methods & the Madness Angkor Wat, Cambodia.
Chapter 3 Sec 3.3 With Question/Answer Animations 1.
Suppose you have a problem involving N data points. Recursive solution of such problem is a follows: If the problem can be solved directly for N points.
Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design Second Edition by Tony Gaddis.
Fall 2002CMSC Discrete Structures1 Enough Mathematical Appetizers! Let us look at something more interesting: Algorithms.
資訊工程系智慧型系統實驗室 iLab 南台科技大學 1 A Static Hand Gesture Recognition Algorithm Using K- Mean Based Radial Basis Function Neural Network 作者 :Dipak Kumar Ghosh,
MCA-2012Data Structure1 Algorithms Rizwan Rehman CCS, DU.
Discrete Mathematics Chapter 2 Basic Structures : Sets, Functions, Sequences, and Sums 大葉大學 資訊工程系 黃鈴玲 (Lingling Huang)
LOGO 改善 FP-growth 資料挖掘演算法 在巨大資料庫的效能 CHEN-HUNG Lin 國立高雄大學資訊工程學系 ( 研究所 ) 碩士論文 研究生:黃正男.
The Fundamentals. Algorithms What is an algorithm? An algorithm is “a finite set of precise instructions for performing a computation or for solving.
Chapter 6 Questions Quick Quiz
04/04/13 Algorithms and NP Discrete Structures (CS 173) Derek Hoiem, University of Illinois 1.
Parallel Programming in C for Multiprocessor 多處理機平行程式設計 朱治平 成功大學資訊工程系.
1 CPSC 320: Intermediate Algorithm Design and Analysis July 30, 2014.
Costas Busch - LSU1 Time Complexity. Costas Busch - LSU2 Consider a deterministic Turing Machine which decides a language.
1 Time Complexity We use a multitape Turing machine We count the number of steps until a string is accepted We use the O(k) notation.
HANGMAN OPTIMIZATION Kyle Anderson, Sean Barton and Brandyn Deffinbaugh.
Byzantine Agreement in the Presence of Mixed Faults on Processor and Links Hin-Sing Siu, Yeh-Hao Chin, Wei-Pang Yang Senior Member, IEEE Computer Society,
Questions 4) What type of algorithmic problem-solving technique (greedy, divide-and-conquer, dynamic programming)
Lecture 2 What is a computational problem? What is an instance of a problem? What is an algorithm? How to guarantee that an algorithm is correct? What.
Prof. Busch - LSU1 Time Complexity. Prof. Busch - LSU2 Consider a deterministic Turing Machine which decides a language.
Ch03-Algorithms 1. Algorithms What is an algorithm? An algorithm is a finite set of precise instructions for performing a computation or for solving a.
Why Study Automata Theory and Formal Languages?
Why Study Automata? What the Course is About Administrivia
The Growth of Functions
Time Complexity Costas Busch - LSU.
Chapter 10 Independence, Dominance, and Matchings
Introduction to Computer Science - Alice
Chapter 13 Graph Algorithms
How Hard Can It Be?.
Computational Complexity
Time Complexity We use a multitape Turing machine
CMSC 203, Section 0401 Discrete Structures Fall 2004 Matt Gaston
Presentation transcript:

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

2 A Rock Game Alice vs Bob   Bob can solve 2+2.  How about 20+20? Or, ? 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

4 Alice Move first. Had learned Algorithm CSIE

5 Answer If you had learned Finite Automata…

6 What is an Algorithm? Assignment  a:=1  b:=a

7 Arithmetic  a+b  a-b  (a+b)*c+a/d

8 Conditional  if statement1 then statement2 else statement3

9 for loops  for i =1 to 100 do statement

10 while loops  while statement1 do statement2

11 Array access  a[100]  a[a[ i ]]

12 Biological Algorithms vs Computer Algorithms DNA helicase topoisomerase single-strandbinding protein DNA

13 primase DNA polymerase 5’  3’

14 DNA ligase

15

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

17 Recursive Algorithms Tower of Hanoi Problem

18

19

20 Iterative versus Recursive Algorithms

21

22

23

24 Fast versus Slow Algorithms

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

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

27 Tractable versus Intractable Problems polynomial-time solvable problems nondeterministic polynomial-time solvable problems beyond P P vs NP