L01-introduction

  • July 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View L01-introduction as PDF for free.

More details

  • Words: 831
  • Pages: 26
Lec‐01 Analysis of Algorithms 

Umar Manzoor 1

Course Title: Analysis of Algorithms (Sec A &  B) Prerequisite: Data Structures, Operating  System

Yahoo Group: http://groups.yahoo.com/group/analysisofalgo/

Name: Umar Manzoor Email: [email protected] Office: N‐111‐A Telephone Extension: 205 Office Hours: Tuesday 12.30 – 2.00 Wednesday 12.30 – 2.00 

ƒ ƒ ƒ ƒ ƒ ƒ

Never miss a class Start working on projects/assignments from  first day. Come prepared in the class Read book (s) Remain attentive during the class Remain interactive and show Class  Participation

ƒ

All people involved in any kind of cheating in  any exam will get zero in that exam

ƒ

Habitual cheaters will get zero in all  assignments/projects. This may lead to a  course failure.

ƒ

Cheating punishment may become more  strict

There will be 4‐5 programming assignments,  related to the topics being studied in course 

ƒ

ƒ

Will require reasonable amount of  programming effort 

ƒ

Also carry decent weight. 

7

ƒ ƒ

ƒ ƒ

A project will be assigned to each group  This involves studying a particular problem,  analyzing its solution, implementing solution,  running simulations and inferring results, Also required is in depth complexity analysis of  solution used. A list of topic will be given in probably second week.

8



Introduction  to  Algorithms,  by  Cormen,  Leiserson and Rivest. Pub MIT Press 1990 • Get the latest edition if possible •

Another book for reference • Data Structures and Algorithms, by Aho, Hopcroft

and Ullman, Pub Addision Wesley, 1983

9

10

Sessional exams

25%

Final exam

40%

Semester Project

20%

Quizzes

10%

Programming Assignments

15%

Lets start the course!

11

ƒ ƒ ƒ

What are algorithms? Why is the study of algorithms worthwhile? What is the role of algorithms relative to  other technologies used in computers?

12

ƒ

An algorithm is any well‐defined computational procedure that takes some value, or set of values,  as input and produces some value, or set of  values, as output.

ƒ

So it is a sequence of computational steps that  transform the input into the output.

ƒ

A tool for solving a well‐specified computational  problem. 13

Input: A sequence of n numbers  ƒ Output: A permutation (re‐ordering)   of the input sequence such  that b1
14

An algorithm is said to be correct if , for every  input instance, it halts with the correct  output. ƒ An incorrect algorithm  ƒ

ƒ might not halt at all on some input instances, or ƒ It might halt with an answer other than desired 

one. ƒ

Can incorrect algorithm be useful? 15

Sorting/searching are by no mean the only  computational problem for which algorithms  have been developed. ƒ Otherwise we wouldn’t have the whole  course on this topic ƒ Practical application of algorithms are  ubiquitous and include the following  examples ƒ

16

The human Genome project Internet world Electronic commerce  Manufacturing and other commercial  settings ƒ Shortest path ƒ Matrices multiplication order ƒ DNA sequence matching ƒ ƒ ƒ ƒ

17

ƒ

There are many candidate solution, most of  which are not what we want, finding one that  we do want can present quite a challenge.

ƒ

There are practical applications (its not just  mathematical exercises to develop  algorithms.)

18

The theoretical study of computer‐program  performance and resource usage. ƒ What’s more important than performance? ƒ

• Modularity • Correctness • Maintainability • Functionality • Robustness • User‐friendliness • Programmer time • Simplicity • Extensibility • Reliability

19

ƒ ƒ ƒ ƒ ƒ ƒ

Algorithms help us to understand scalability. Performance often draws the line between  what  is feasible and what is impossible. Algorithmic mathematics provides a language  for talking about program behavior. Performance is the currency of computing. The lessons of program performance  generalize  to other computing resources.  Speed is fun! 20

A data structure is a way to store and  organize data in order to facilitate access and  modifications. ƒ No single data structure works well for all  purposes ƒ Need to know the strengths and limitations  of several of them. ƒ

21

ƒ ƒ ƒ ƒ

ƒ

Cant get a “cookbook” for algorithms? Many problems you will encounter don’t have any  published algorithm. So need to learn “techniques” of algorithms design  and analysis So you develop algorithms in your own, show that  they give correct answer and understand their  efficiency.  We will learn several such techniques in later part of  this course.

22

Is an algorithm a technology like hardware,  etc? ƒ Total system performance depends on  choosing “efficient” algorithms as much as  choosing fast hardware. ƒ

23

Hardware with high clock rates, pipelining and  superscalar architecture. ƒ Easy to use, intuitive graphical user interface  (GUI’s) ƒ Object oriented systems. ƒ Local‐area and wide‐area networking. ƒ

ƒ

Are algorithms as important as above  technologies? 24

Algorithms are at the core of most technologies  used in contemporary computers ƒ Efficient algorithm can be used to solve larger  problems than ever before. ƒ

25

ƒ

Program Efficiency and Complexity Analysis. ƒ CHP‐2,3 Cormen.

ƒ ƒ

A quick review! Come prepared with lectures from DS course 

26