4
Lecture 6 Problem Solving: Algorithm Design & Analysis

Lecture 6 Problem Solving: Algorithm Design & Analysis

Embed Size (px)

Citation preview

Page 1: Lecture 6 Problem Solving: Algorithm Design & Analysis

Lecture 6Problem Solving: Algorithm Design & Analysis

Page 2: Lecture 6 Problem Solving: Algorithm Design & Analysis

Solving problems with a computer requires a detailed knowledge of a programming language or extensive experience with specific computer applications designed for a particular discipline. Think of the types of programs available to professionals in all types of careers.

Architecture Journalism StockbrokerBanking Kinesiology TeacherChemistry Library Science Urban PlannerDecorating Musician VeterinarianEditing Network Administration Weather ForecasterFirefighting Optometry X-Ray TechnicianGenetics Photography Yoga InstructorHealthcare Quality Assurance ZoologistInsurance Radio Announcer

How are Computers used to Solve Problems?

Page 3: Lecture 6 Problem Solving: Algorithm Design & Analysis

What is an Algorithm?

A set of unambiguous instructions for solving a problem or subproblem in a finite amount of time using a finite amount of data

Abstract Step

An algorithmic step containing unspecified details

Concrete Step

An algorithm step in which all details are specified

Page 4: Lecture 6 Problem Solving: Algorithm Design & Analysis

You Know Many Algorithms

Search an unordered list of n items to find a particular item x.

Search an ordered list of n items to find a particular item x.

Find the smallest value in an unordered list of n items.

Find the largest value in an ordered list of n items.

Determine if an unordered list contains a repeated value.

Find a pair of items x and y in an unordered list that are the most similar.

Find a pair of items x and y in an ordered list that are the most similar.

Find a pair of items in an ordered list that are the least similar.

Let's see how good you are at understanding how some important algorithms work. For each of the following tasks, decide how many steps are needed to perform the task on a set of N items (e.g. numbers)