Announcements

Instructor

Course Description

Textbooks

Evaluation

Homework assignments

Coursework (Summary notes and PDF slides are posted here)

Resources

Accommodations

Student Conduct

Academic Honesty

 


Announcements

<
Date Announcement
9/4/2024 Please make sure you were added to Piazza and Gradescope If not - contact me ASAP.
10/2/2024 The first midterm exam will take place on Wed. October 16. Part of the October 9 class will be a review.
10/2/2024 HW2 is now due on Oct. 8.
10/5/2024 Practice exam for the first midterm is available here.
10/16/2023 A solved midterm practice is available here.
10/28/2024 HW4 is now due on Nov. 7.
11/3/2024 A second midterm practice is available here.
11/6/2024 A solved second midterm practice is available here.

Instructor  

Nurit Haspel
M03-201-04
Office Hours: Mo We 2:30 - 3:50pm or by appointment
e-mail: nurith@cs.umb.edu or nurit.haspel@umb.edu
Homepage: http://www.cs.umb.edu/~nurith
TA: Kattayun Ensafitakaldani (kattayun.ens@gmail.com).


Course Description

Basic techniques for designing algorithms: divide and conquer, the greedy method, dynamic programming, etc. Applications to searching and sorting algorithms. Complexity of parsing. The fast Fourier transform and its applications (evaluation of polynomials and arithmetical problems). Lower bound theory. NP-hard and NP-complete problems. Probabilistic estimates of algorithms.

See the course syllabus for a detailed list of topics.

The prerequisite is CS220 (Applied discrete math, formerly CS/Math320) or permission from the instructor.

This prerequisite is important. If you have not had it, and done well in it, you may struggle with this course.


Textbook

Required:

Introduction to Algorithms, Fourth Edition
by Cormen, Leiserson, Rivest, and Stein
MIT press, 2009 (2022)

Recommended:

The Algorithm Design Manual, Second Edition
by Steven S. Skiena
Springer-Verlag, 2008


Grade Evaluation

Homework assignments: 20% (6-7 homework assignments will be given)
Two Midterm Exams: 20% each
Final Exam: 40%

It should go without saying - the very best way to prepare for the exams is to do the homework. You will have to pass the final in order to pass the entire course.
It is a graduate course, so the minimum passing grade is C. See the syllabus for conversion from a number to a letter grade.


Homework assignments

Assignment (PDF) Posted/Given on Due Date Suggested solution
Assignment 1 Sep. 5, 2024 Sep. 21, 2024 Solution
Assignment 2 Sep. 21, 2024 Oct. 8, 2024 (ext.) Solution
Assignment 3 Oct. 9, 2024 Oct. 21, 2024 Solution
Assignment 4
Oct. 22, 2024 Nov. 7, 2024 Solution
Assignment 5 Nov. 18, 2024 Nov. 30, 2024 Solution

 


Syllabus

Week

Topic

Book Chapters (4th ed.)

Session Dates

Session Info

Slides/notes

1

Introduction, basic concepts

--

Wednesday,
September 4

Introduction

[PDF - Introduction]

[Lecture notes 1]

2

Intro
Runtime

Ch. 3 (order of growth)
Ch. 4 (divide and conquer)

Monday,
September 9

Introduction (cont.)

Same notes

Wednesday,
September 11

Intro
Intro to runtime

[PDF - runtime]

[Lecture notes 2]

3

Generating functions
heaps

Ch. 3,4

Monday,
September 16

Runtime
Generating Functions

Ch. 6

Wednesday,
September 18

Generating functions
Heaps

[PDF - heaps]

[Lecture notes 3]

4

Heapsort
Quicksort

Ch. 6, 7

Monday,
September 23

Heapsort
Quicksort

Same

Wednesday,
September 25

Quicksort

[PDF]

[Lecture notes 4]

5

Sorting

Sorting: Ch. 7-8
Medians: Ch. 9

Monday,
September 30

Quicksort
Linear sorting

[Stirling]

[Lecture notes 5]

[Stirling]

Wednesday,
October 2

Linear Sorting
Medians

[PDF - medians and order statistics]

[Lecture notes 6]

6

Medians
BST

BST: Ch. 12

Monday,
October 7

Finish Medians
Start BST

Wednesday,
October 9

BST
Midterm review

[PDF - BST]

[Lecture notes 7]

[Practice midterm (solved)]

7

BST
Midterm I

Chapter 14

Monday,
October 14

Columbus/Indigenous
People's day

Practice midterm

Wednesday,
October 16

Midterm I

8

BST
Dynamic Programming

BST: Ch. 12

Monday,
October 21

BST
Dynamic Programming

Dynamic prog: Ch. 14

Wednesday,
October 23

Dynamic Programming

[PDF - DP]

[notes 8 - DP]

9

Dynamic Programming
Greedy Algorithms

Ch. 14-15

Monday,
October 28

Dynamic Programming

Wednesday,
October 30

Greedy algorithms

[PDF - greedy]

[notes 9 - Huffman]

10

Greedy

Ch. 15

Monday,
November 4

Huffman
Scheduling

Solved practice Midterm

Wednesday,
November 6

Greedy
Midterm review

11

2nd midterm

Monday,
November 11

Veterans day

Wednesday,
November 13

Midterm II

12

Graph Walks

Ch. 20

Monday,
November 18

BFS

[PDF - graphs]

[notes 12 - graphs]

Wednesday,
November 20

DAG
Strong components

[DFS]

 


Resources

Writing Proofs:

This course does not involve any programming per se, although without a doubt your experiences in building serious programs will help you understand many of the issues we deal with.

In fact, the course could well be regarded as a mathematics course. I will be proving things in class, and you will be expected to write formal proofs in your assignments and on exams. If this is something you are not ready to come to grips with, you should wait until you are ready to take this class.

There is a style to writing proofs. In fact, there are several styles. Your goal should be to write proofs that are easy to read and that illuminate the reason why something is true. This is not easy to do. Good writing of any kind is difficult, and we will work hard at it all term.

Probably the single most important proof technique in this area is mathematical induction. I will assume not only that you are familiar with this, but are comfortable using it. I will not teach it, but I will expect to see inductive proofs written out clearly and well.

I also expect you to be familiar with standard mathematical notations such as summations (and of course, integrals). Some of this is reviewed in Appendix A of the text. I will not review this in class. I expect you to know it, and we will be using it a lot.

One thing is very important to bear in mind: like any other kind of writing, a proof must be understandable. If I can't understand what you are writing, then it can't be correct. And I'm not going to try to guess what you had in mind. If you are uncertain how to express something, please just talk to me or send me email, and I'll try to help. But don't even bother writing something that can't be understood.

Think of this like you would when writing a computer program. If the compiler or interpreter can't understand it, it's wrong. And you have to be really careful with your use of language and terms. For instance, one thing beginning programmers often get mixed up about is the correct use of "or" and "and". The meaning in computer languages is not the same as in English (or any other natural language, so far as I know). The same is true in proofs. We use language in very precise and fixed ways in proofs, and we do this so that what we write can be understood in its exact meaning by anyone at any time, anywhere in the world.

Just for a simple example: the sentence "All horses are not white." does not mean the same as "Not all horses are white." At least, not when writing proofs. In ordinary English, these two sentences are generally regarded as equivalent. But for our purposes they are not. You have to be careful about this.

Here's another example: The symbol "==>" means "implies". It does not mean "then". So you can write

   if x = 3 then x + 5 = 8
or you can write
   x = 3 ==> x + 5 = 8
But you cannot write
   if x = 3 ==> x + 5 = 8   !!! WRONG !!!
Please try to be careful about things like this. And please don't be offended if I correct mistakes like this in what you write.

On-line resources:

Two web sites that you might profitably look at are:

On both these web sites you can find lecture notes and videos of course lectures.


Accommodations:  Section 504 of the Americans with Disabilities Act of 1990 offers guidelines for curriculum modifications and adaptations for students with documented disabilities. If applicable, students may obtain adaptation recommendations from the Ross Center for Disability Services, Campus Center, UL Room 211, (617-287-7430). The student must present these recommendations and discuss them with each professor within a reasonable period, preferably by the end of Drop/Add period.


Student Conduct:  Students are required to adhere to the University Policy on Academic Standards and Cheating, to the University Statement on Plagiarism and the Documentation of Written Work, and to the Code of Student Conduct as delineated in the catalog of Undergraduate Programs. The Code is available online at: http://www.umb.edu/life_on_campus/policies/code/


Academic Honesty:  Please read this note about plagiarism and cheating: honesty.pdf