module1 - CS 240 Module 1 Introduction and Analysis of...

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

View Full Document Right Arrow Icon
CS 240 Module 1 Introduction and Analysis of Algorithms Douglas R. Stinson David R. Cheriton School of Computer Science University of Waterloo Fall 2011 8 / 46
Background image of page 1

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

View Full DocumentRight Arrow Icon
Course Objectives: What is This Course About? In a nutshell, the objective of the course is to study efficient methods of storing, accessing, and performing operations on large collections of data. We will consider various abstract data types (ADTs) and how to implement them efficiently using appropriate data structures . Typical operations include: inserting new data items, deleting data items, searching for specific data items, sorting. There is a strong emphasis on mathematical analysis in the course. Algorithms are presented using pseudocode and analyzed using order notation (big-oh, etc.). 9 / 46
Background image of page 2
Course Topics priority queues and heaps sorting, selection binary search trees, AVL trees, B-trees skip lists hashing quadtrees, kd-trees range search tries string matching data compression 10 / 46
Background image of page 3

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

View Full DocumentRight Arrow Icon
CS Background arrays, linked lists strings stacks, queues abstract data types recursive algorithms binary trees sorting binary search binary search trees 11 / 46
Background image of page 4
Problems (terminology) Problem: Given a problem instance, carry out a particular computational task. Problem Instance: Input for the specified problem. Problem Solution: Output (correct answer) for the specified problem instance. Size of a problem instance: Size ( I ) is a positive integer which is a measure of the size of the instance I (informally, this corresponds to the amount of input to a program solving the given problem). 12 / 46
Background image of page 5

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

View Full DocumentRight Arrow Icon
Sorting Problem Problem Instance: An instance I consists of collection (list) of n integers. Problem Solution: A list of the n given integers which is sorted in increasing (or decreasing) order. Size of the problem instance: Size ( I ) = n . 13 / 46
Background image of page 6
Algorithms and Programs Algorithm: An algorithm is a step-by-step process (e.g., described in pseudocode) for carrying out a series of computations, given an arbitrary problem instance I . Algorithm solving a problem: An Algorithm A solves a problem Π if, for every instance I of Π, A finds a valid solution for the instance I in finite time. Program: A program is an implementation of an algorithm using a specified computer language. In this course, our emphasis is on algorithms (as opposed to programs or programming). 14 / 46
Background image of page 7

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

View Full DocumentRight Arrow Icon
Efficiency of Algorithms/Programs How do we decide which algorithm or program is the the best or most efficient solution to a given problem? In this course, we are primarily concerned with the amount of time a program takes to run. We also may be interested in the amount of memory the program requires. The amount of time and/or memory required by a program will depend on the amount of input used to specify the given problem instance I (recall that we denote this by Size ( I )).
Background image of page 8
Image of page 9
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/21/2012 for the course PSYCH 101 taught by Professor Ennis during the Winter '09 term at Waterloo.

Page1 / 39

module1 - CS 240 Module 1 Introduction and Analysis of...

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

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