Syllabus                                  CS332 Algorithms                                                     Spring 2025

Margaret Menzin       Office: E425D                                                       Office Phone: X2704                
                                    Email: menzin@simmons.edu               Home Phone: 781-862-5107
                                    My  zoom office hours is
https://simmons.zoom.us/j/4672991761

                                    There is no class or lab on Mon April 14, 2025  This class will be
                                    made up.   There will be alternate work on Friday, March 7,2025 (SIGCSE).

                                    Office  Hours: MF  7:15-9:00 a.m and MWF 12:00- 2:00 and
                                                              
(except for  lunch days)
                                                              other days and times by
appointment –
                                                                           I am almost always  ar
ound/on email,
                                                                           but give me a heads-up the day before.

                                        Note:  The Mathematics Computer Science and Statistics
                                                    (MCS)  Department likes to eat at the Fens on some
                                                    Wednesday 12:00-1:00.                     
                                                    Whenever feasible we will be outside in front of the Fens.

Common Syllabus Statements about Accessibility, Academic integrity and Sexual Harassment Policies will be found here .

 

The Specifics of This Course

Textbook:  Tim Roughgarden ”Algorithms Illuminated” Parts 1 -3.

You must also have a Student Membership in the ACM, as we will use several books in their Percipio library.

What this course is about:

In this course we undertake the study of algorithms, including ascertaining that our code is correct and estimating the worst, average and best time complexity of our algorithms.

Almost all the algorithms we look at are “classics’. They are classics because they are often the basis for solving related problems.  In other words, you might start with a solution to a classic problem and then modify it to solve your particular problem or to take advantage of the context of your problem. 

It also means that often you can find the code online (sometimes correct and sometimes not).  That, in turn, means that you need to be able to choose test cases for code you find as well as for code you wrote.  And you may need to debug code, either found or your own.  You always need to be able to explain and document code. 

Finally, these algorithms are classics because they bring elegant, clear solutions to problems which occur often.  So, I hope you will have a lot of “Aha” moments.

Student Learning Outcomes

Students will be able to construct short, clear proofs about algorithms, using  mathematical induction as needed.

Students will be able to explain and to code and/or modify classic algorithms, including divide and conquer algorithms, graph algorithms, greedy algorithms, and algorithms which use dynamic programming.   Where multiple solutions are possible, students will be able to explain why, given the context, they make a particular choice of algorithm.  Students will be able to delineate test cases for testing their own code and for testing code from other sources.

 

How to Succeed in This Course

·        Flipped

This course is essentially  flipped.  Saying the course is flipped means that you will read the book/watch the video before you come to class, that there is essentially no 'lecture' during class, and that class time is devoted to the kinds of activities which used to be homework – solving problems, constructing examples,writing explanations, and  proving theorems.

I think that that means the course is more fun.  (Also, the material is a lot of fun.)  Instead of listening to long lectures in our face-to-face meetings, you will be working together in small groups, talking about the material and working on problems and proofs. 

Flipping the course also means that it is critical that you stay current in the material and come to each class session having done the homework.  

·       Expectations
    I expect you to be present, punctual, alert and prepared for every session.
 
Being prepared means that you have done the work for the meeting( see below), that you are ready to ask questions about anything which is confusing, and that you are ready to attack thought-provoking questions with your classmates. 

     A lot of the learning in this course takes place in class.   If you are not present,
puntual, prepared and alert then you miss work which can not be made up!

     The instructor reserves the right to deduct up to 25% of the grade for students who do not meet the expectations of present, punctual, alert and prepared in every session. 

·       Attendance Policy for This Course
I particularly want to call you attention to the attendance policy at Simmons.  The expectation is that you will be punctual, present and prepared for all our meetings.   

Again, a lot of the work in this course is done in class and lab..  Your participation at every meeting is critical, and absences can’t be made up.

A maximum of 4 unexcused absences (including labs) is allowed and I do take attendance at all our meetings. Anything beyond a very occasional minor lateness will be considered similarly.      

The instructor reserves the right to deduct up to 25% from the grade for students who do not meet the expectations of present, punctual, alert and prepared in every session. 

Accordingly, if you miss more than 4 sessions you should consider withdrawing from the class, and if you miss more than 6 sessions it is an automatic F in the course.  The sole exception to this is for religious observances, as mandated by law. 

Now, obviously, you can’t know ahead of time if you are going to get sick or have some other emergency in the last week of class, so the wise approach is to simply be present at every class. 

Having noted all of  this, it is, I sincerely hope, that it is unlikely that I will need to invoke the attendance policy:  this is an upper division course and it should be a lot of fun.

 

 

 

·       Getting the most out of our book

We have an excellent book, and I am very enthusiastic about it. There are also videos tied to the course.  As noted in the Syllabus, the videos are not an exact match to the book and you are responsible for the material in the book.

I have pointed out that sometimes, if the book seems to go too fast, you may find it helpful to watch the video first --- but then go back to the book.  Again,
you are responsible for the material in the book.

As you read the book you will find many quizzes.  You should always do the quizz – and if you don’t understand the explanation (usually a few pages further on) then please ask in class.

No book is perfect for everyone, and I am happy to be able to provide alternatives for those of you who want to try them.  The file “Some resources for Algorithms” has links to some classic books on Algorithms which are either available free or are in Percipio. 


As a reminder, there is a technique to reading a techical book. 

Reading such material is sometimes slow going, and a section will usually require two or three readings. 

It is a good idea to read the section first for the general flow of ideas, skipping over anything that doesn't seem obvious. 

On the second and third readings, now that you know where the book is heading, you should read the book closely, making note of anything that does not make sense, or any calculation you can't follow. 

 

As you re-read, you may also choose to make a note to yourself to ask about something in class.  For example, 'p. 37, line 4 doesn´t make sense' is a fine thing to ask about in the beginning of class (and a lot more helpful than I'm lost'.)  I also strongly encourage you to email me the evening before class with the same kind of reference to unclear items.  

 

Finally, as is true for any new material you are trying to learn, it is an excellent idea to summarize for yourself, in writing, what the main points are from a section you have just read.

Outline of Course Material

 

Unit 1 – The Basics and Divide and Conquer Algorithms

Chapters 1-6 of the textbook.

This unit reviews some material you have seen before:  Big-O notation, mathematical induction and discrete probability.

It also introduces the use of induction to prove program correctness – which is at the heart of this course.  And it introduces The Master Method for moving from a recurrence relation to a Big-O upper bound.
The Master Method is another critical issue in the course, and we wil practice it both here and in the rest of the course.

This section also introduces a mind set: After you solve a problem you can always ask yourself “Can I do better?”

 

Unit 2 – Algorithms on Graphs, Trees and Heaps.

 

           Chapters 7- 12 of the textbook.
           Here, too, we will be building on data structures you have seen before,

           but from a more sophisticated point of view. 
           There are many important applications of graphs, often graphs which are
           very large and whose adjacency arrays would be sparse.  So we will ask when to use
           adjacency arrays and when to use adjacency lists.  
           Similarly, having seen multiple ways to sort we will ask which method to
           use when.  As time allows we will explore suffix tries.

          

 

Unit 3 – Greedy Algorithms and Dynamic Programming

 

            Chapters 13-18 of the textbook.
             This is the most sophisticated part of the course, but by now you have 
             your technical chops.  We will work through this material and especially
             some of the applications to problems in bioinformatics and pattern
             matching.

Unit 4 – When you have an NP Problem

                    
                     
This is a brief introduction to problems where we can’t get an exact
                       solution in a reasonable time.  We will use the videos for our book for
                       this unit.

 

·          Grading 
                    Any assignment is due on the stated date, although you have a grace period until the next class.  There are no extensions beyond that unless you have previously been given permission by me or for dire emergencies (death, serious illness, etc.) or have a relevant accommodation.
Assignments which are late will have their grades penalized.    
The due dates listed in the Schedule are tentative and there may be fewer graded assignments than have been scheduled.  Stay tuned!
  
There will be a number of “graded assignments” , roughly one every other week.   Each graded assignment will be worth 20 points.
There will also be a summative assignment at the end of each of the first 3 Units and they will be worth 40 points each.   There is no scheduled final, but the Unit 3 summative assignment will be due during Finals Period.

This course is a lot of fun and it will be a very sociable experience.  So let’s get started!