lec1 - Introduction • Administrivia – Instructors,...

Info iconThis preview shows pages 1–5. 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
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Introduction • Administrivia – Instructors, lecture times, office hours – IAs, office hours – Course website, useful resources – Course newsgroup, email contact – Assignments, submission • Marks – Assignments: 30%, 6% for each – Assignment 0: 2% bonus towards to final mark – Midterm: 25% – Final: 45% – Must pass the weighted exams to pass the course 1 A Motivation Example: Which One Is Better? Selection Sort or Merge Sort ? SelectionSort(A) for i from 0 to n − 1 min ← i for j from i + 1 to n − 1 if (A[min] > A[j ]) min ← j exchange A[i] and A[j ] return A Example: Input 1, 5, 4, 10, 15, 20, 8, 7, 3, 6 2 Merge Sort MergeSort(A) if size(A) ≤ 1 return A Al ← A[0.. n ] 2 n + 1..n − 1] Ar ← A[ 2 Als ← MergeSort(Al ) Ars ← MergeSort(Ar ) As ← Merge(Als, Ars) return As Example: Input 1, 5, 4, 10, 15, 20, 8, 7, 3, 6 3 Which one is better? What should we consider? • Which one runs faster? • Which one uses less memory? • ... • But how to analyze? 4 Course Objectives • Manage data efficiently • Prove the efficiency mathematically • Introduction to limits of computation and lower bounds • String matching and text compression 5 ...
View Full Document

This note was uploaded on 07/17/2010 for the course CS 240 taught by Professor Ortiz during the Spring '09 term at Waterloo.

Page1 / 5

lec1 - Introduction • Administrivia – Instructors,...

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

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