01 - Introduction

01 - Introduction - COMP271: Design and Analysis of...

Info iconThis preview shows pages 1–10. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: COMP271: Design and Analysis of Algorithms Lecture 1: Introduction Lecture 1: Introduction COMP271: Design and Analysis of Algorithms Outline What is this course about? What are algorithms? What does it mean to analyze an algorithm? Comparing time complexity Thoughts on algorithm design Lecture 1: Introduction COMP271: Design and Analysis of Algorithms What is this course about? There are usually more than one algorithm for solving a problem. Some algorithms are more efficient than others. Lecture 1: Introduction COMP271: Design and Analysis of Algorithms What is this course about? Example (Chain Matrix Multiplication) A = C = 1 1 0 1 . B = D = 1 1 1 . Want: ABCD =? Method 1: ( AB )( CD ) Method 2: A (( BC ) D ) Method 1 is much more efficient than Method 2. (Expand the expression on board) Lecture 1: Introduction COMP271: Design and Analysis of Algorithms What is this course about? If we have two algorithms, we need to find out which one is more efficient. To do so, we need to analyze each of them to determine their efficiency. Lecture 1: Introduction COMP271: Design and Analysis of Algorithms What is this course about? In this course, we will discuss fundamental techniques for : 1 Analyzing the running times of algorithms , 2 Designing efficient algorithms , 3 Showing efficient algorithms do not exist for some problems 4 Proving the correctness of algorithms , Notes: Analysis and design go hand in hand: By analyzing the running times of algorithms, we will know how to design fast algorithms. In COMP 171, you have learned techniques for 1, 2, 4 w.r.t sorting and searching . In COMP 271, we will discuss ALL in the contexts of other problems . Lecture 1: Introduction COMP271: Design and Analysis of Algorithms Outline What is this course about? What are algorithms? What does it mean to analyze an algorithm? Comparing time complexity Thoughts on algorithm design Lecture 1: Introduction COMP271: Design and Analysis of Algorithms Computational Problem Definition A computational problem is a specification of the desired input-output relationship Example (Computational Problem) Sorting Input : Sequence of n numbers h a 1 , ··· , a n i Output : Permutation (reordering) h a 1 , a 2 , ··· , a n i such that a 1 ≤ a 2 ≤ ··· ≤ a n Lecture 1: Introduction COMP271: Design and Analysis of Algorithms Instance Definition An instance of a problem is all the inputs needed to compute a solution to the problem Example (Instance of Problem) h 8 , 3 , 6 , 7 , 1 , 2 , 9 i Lecture 1: Introduction COMP271: Design and Analysis of Algorithms Algorithm...
View Full Document

Page1 / 27

01 - Introduction - COMP271: Design and Analysis of...

This preview shows document pages 1 - 10. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online