Upload
michael-cannon
View
225
Download
0
Embed Size (px)
Citation preview
Lecture 6Problem 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?
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
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)