16
08/24/22 COT 5407 1 COT 5407: Introduction to Algorithms Tao Li ECS 318; Phone: x6036 [email protected] http://www.cs.fiu.edu/~taoli/class/COT5407/ index.html

COT 5407: Introduction to Algorithms

Embed Size (px)

DESCRIPTION

COT 5407: Introduction to Algorithms. Tao Li ECS 318; Phone: x6036 [email protected] http://www.cs.fiu.edu/~taoli/class/COT5407/index.html. Self-Introduction. Ph.D. in Computer Science from University of Rochester, 2004 - PowerPoint PPT Presentation

Citation preview

Page 1: COT 5407: Introduction to Algorithms

04/19/23 COT 5407 1

COT 5407: Introduction to Algorithms

Tao LiECS 318; Phone: x6036

[email protected]://www.cs.fiu.edu/~taoli/class/COT5407/

index.html

Page 2: COT 5407: Introduction to Algorithms

04/19/23 COT 5407 2

Self-Introduction

• Ph.D. in Computer Science from University of Rochester, 2004– Research Interests: data mining, machine learning, information

retrieval, bioinformatics and more ?

• Assistant Professor in the School of Computer Science at Florida International University

• Industry Experience:– Summer internships at Xerox Research (summer 2001, 2002)

and IBM Research (Summer 2003, 2004)

Page 3: COT 5407: Introduction to Algorithms

04/19/23 COT 5407 3

My Research Projects • You can find on http://www.cis.fiu.edu/~taoli

• Data Mining research group meeting– http://taoli.cs.fiu.edu/group/meeting/meeting.htm– 4:30pm -- 6:00pm every Friday – Brainstorm research ideas, discuss our research progress,

review recent and interesting research papers, and formulate research problems

Page 4: COT 5407: Introduction to Algorithms

04/19/23 COT 5407 4

Student Self-Introduction

• Name– I will try to remember your names. But if you have a Long

name, please let me know how should I call you

• Major and Academic status

• Programming Skills– Java, C/C++, VB, Matlab, Scripts etc.

• Research Interest

• Anything you want us to know– e.g., I am a spurs fan.

Page 5: COT 5407: Introduction to Algorithms

04/19/23 COT 5407 5

What this course is about• Introduction to Algorithms

• Analysis of Algorithms• How does one design programs and ascertain

their efficiency? • Divide-and-conquer techniques, string

processing, graph algorithms, mathematical algorithms. Advanced data structures such as balanced tree schemes.

Page 6: COT 5407: Introduction to Algorithms

04/19/23 COT 5407 6

Course Logistics

• Meeting Time and Location: Tuesday and Thursday 17:00pm-18:15pm, ECS136

• Office Hours: Tuesday and Thursday 14:30pm-15:30pm

• TA: TBA

• Textbook: Introduction to Algorithms,  (Second Edition) Thomas Cormen, Charles Leiserson, Ronald Rivest, and Clifford Stein. MIT Press.

Page 7: COT 5407: Introduction to Algorithms

04/19/23 COT 5407 7

Evaluation

• Class participation and Quizzes: 10% • Midterm Exam: 25%• Final Exam: 30%• Assignments:35%

• You may work with one other person on homeworks, but you must each write up your solutions separately. If you work with another person, indicate who you worked with on your solution.

• Please start a new page for each problem on your solutions, and include your name on each page, so the TA can choose the problems for grading. Exams are closed book.

Page 8: COT 5407: Introduction to Algorithms

04/19/23 COT 5407 8

Analysis Of Algorithms

Criteria for selecting algorithms

• 1. Correctness• 2. Amount of work done• 3. Amount of space used• 4. Simplicity, clarity• 5. Optimality

Page 9: COT 5407: Introduction to Algorithms

04/19/23 COT 5407 9

Correctness

Proving correctness is dreadful for large algorithms. A strategy that can be used is: divide the algorithm into smaller pieces, and then clarify what the preconditions and postconditions are and prove correct assuming everything else is correct.

Page 10: COT 5407: Introduction to Algorithms

04/19/23 COT 5407 10

Amount of Work Done

Rather than counting the total number of instructions executed, we'll focus on a set of key instructions and count how many times they are executed. Use asymptotic notation and pay attention only to the largest growing factor in the formula of the running time.

Two major types of analysis: worst-case analysis and average-case analysis

Page 11: COT 5407: Introduction to Algorithms

04/19/23 COT 5407 11

More• Amount of space used: The amount of space used can be

measured similarly. Consideration of this efficiency is often important.

• Simplicity, clarity: Sometimes, complicated and long algorithms can be simplified and shortened by the use of

recursive calls.

• Optimality: For some algorithms, you can argue that they are the best in terms of either amount of time used or

amount of space used. There are also problems for which you cannot hope to have efficient algorithms.

Page 12: COT 5407: Introduction to Algorithms

04/19/23 COT 5407 12

Asymptotic Growth Rates of Functions

• Big O• Big Omega• Little O• Little Omega• Theta Notation

Page 13: COT 5407: Introduction to Algorithms

04/19/23 COT 5407 13

Notations

Page 14: COT 5407: Introduction to Algorithms

04/19/23 COT 5407 14

Other mathematical background• The ceiling function• The floor function• The exponentials and logarithms• Fibonacci number• Summations and Series

Page 15: COT 5407: Introduction to Algorithms

04/19/23 COT 5407 15

Search

• You are asked to guess a number X that is known to be an integer lying between integers A and B. How many guesses do you need in the worst case?– Number of guesses = log2(B-A)

• You are asked to guess a positive integer X. How many guesses do you need in the worst case? – NOTE: No upper bound B is known for the number.

– X is between B/2 and B. So log2(B/2) < log2X

– Number of guesses < 2log2X - 1

Page 16: COT 5407: Introduction to Algorithms

04/19/23 COT 5407 16

Polynomials

• Given a polynomial– p(x) = a0 + a1 x + a2 x2 + … + an-1 xn-1 + an xn

compute the value of the polynomial for a given value of x.

• How many additions and multiplications are needed?– Simple solution:

• Number of additions = n• Number of multiplications = 1 + 2 + … + n = n(n+1)/2

– Improved solution using Horner’s rule:• p(x) =• Number of additions = n• Number of multiplications = n