Course Info

Welcome to CSCI 3212.

In this course, students will engage deeply with core concepts in algorithms, data structures, and problem-solving techniques. They will tackle classic problems in computer science, such as searching, sorting, and optimization challenges like the Traveling Salesman Problem, using classic data structures like hashing and heaps. Through a mix of lectures, interactive lab assignments, and group projects, students will learn to write clean, efficient code and apply these concepts to real-world problems. Assessments will include a combination of assignments, projects, and exams. Pre-requisites include CS 1112, CS 1311 and CS 2113 (or equivalents) - see undergraduate curriculum. Working knowledge of Java. Resources will be available to support your learning journey. The course is designed to be inclusive and cater to diverse learning styles, with ample opportunity for one-on-one guidance during office hours.

Please be aware that many elements on the course website will change throughout the semester, including the course schedule.

It is your responsibility to review the course website periodically for updates.

We value any and all student feedback. Please be constructive in any comments so that we can adjust the course as best possible. This semester, we are using Blackboard to manage course grading and announcements.

Lecture Times:

Section Days Time Room Instructor

1

MW

03:45 PM - 05:00 PM

1957 E 313

Xiaodong Qu

Lab Times:

Section Days Time Room Instructor

1

T

09:35 AM - 10:50 AM

TOMP 406

Xiaodong Qu

Support Staff & Office Hours

Name Office Hours Location

Xiaodong Qu

By Appointment

Zoom

Aditya Singh

By Appointment

Zoom

Freya Rosenstein

By Appointment

Zoom

Course Goals

By the end of the course, we hope that you will have developed the following skills:

  • Demonstrate understanding of algorithmic specification and pseudocode through implementation.

  • Strengthen some software development skills: writing to specs, testing and debugging.

  • Be able to implement a complex data structure.

  • Be able to implement a complex algorithm.

  • Be able to analyze the execution time of an algorithm

  • Demonstrate, through homeworks and implementations, an understanding of standard topics in algorithms: sorting, searching, trees, hashing, graph algorithms, dynamic programming, combinatorial optimization, NP-completeness, heuristic search.

Grading Policies

Grades will be weighted as follows:

35%

Lab assignments

30%

Unannounced quizzes in class or lab

15%

Midterm exam

15%

Final Project

5%

Class Participation

Textbook

The course does not need a textbook because all the needed material is available to you on this site. However, if you’d like to have one, I recommend one of the following OPTIONAL textbooks:
Algorithms, 4th Edition by Robert Sedgewick and Kevin Wayne: This comprehensive resource is available at Princeton's website. It covers a wide range of topics including fundamentals, sorting, searching, graphs, and strings. The site provides excerpts from the book, curated online videos suitable for remote instruction, Java code for the algorithms and clients in the textbook, selected exercises with solutions, and creative programming assignments.
Algorithms by Jeff Erickson: This textbook is a free electronic version of Jeff Erickson's self-published book. It is comprehensive and covers various topics in theoretical computer science. The full-color electronic version is available indefinitely on his website. It's worth noting that the book assumes knowledge of discrete math and basic data structures and algorithms.
Think Data Structures: Algorithms and Information Retrieval in Java by Allen Downey. This textbook is suitable for a CS course and is available in both PDF and HTML formats. It covers key topics commonly found in CS courses such as linked lists, stacks, queues, binary trees, graphs, searching, sorting, and complexity analysis. The book is very Java-centric and uses real Java code examples throughout. It adopts an applied approach to teaching data structures and algorithms, focusing on practical applications. The content is well-organized and clear, making it accessible for students with some background in Java programming​.
Algorithms. By S.Dasgupta, C.Papadimitriou and U.Vazirani (McGraw-Hill). This is an elegant, small-ish textbook with just the right material for a first course in algorithms. Explanations of algorithmic ideas use excellent examples and proofs are easy to follow. It is not, however, as comprehensive as the one below.
Introduction to Algorithms. T.H.Cormen, C.E.Leiserson and R.L.Rivest. (McGraw-Hill). This book covers much more material than can be handled in a single-semester course. It’s advantages are that it makes a useful desktop reference, algorithms are fleshed out in detail with examples and accurate pseudocode, and the book is up-to-date in most areas. Disadvantages: it’s bulky, and can initially be intimidating.
Foundations of Algorithms. R.Neapolitan and K.Naimpour (Jones and Bartlett). This book is a compromise between the sweeping coverage of the Cormen book and the tight, condensed Dasgupta book. The book covers some topics, such as backtracking and branch-and-bound, that are hard to find in other books. Overall, a nice book with solid coverage of topics that are well-presented.

Schedule

WEEK DAY ANNOUNCEMENTS TOPIC & READING NOTES & LABS
1

Jan 15

 

Course Introduction

Notes 1
Lab 1

Jan 17

 
2

Jan 22

 

Sorting

Notes 2
Lab 1

Jan 24

 
3

Jan 29

 

Ordered Search

  • Review of binary search trees.
  • Deletion from a binary search tree.
  • AVL trees.
  • Multiway trees.
  • Self-adjusting binary search trees.

Notes 3
Lab 2

Jan 31

 
4

Feb 05

 

Equality Search, Hashing, Trie

  • Key signatures and addressing.
  • Open-chain hashing.
  • 2D hashing.
  • Digital search trees.
  • Tries.

Notes 4
Lab 2 cont.

Feb 07

 
5

Feb 12

 

Pattern Search

  • The string search problem.
  • The Rabin-Karp algorithm.
  • The Knuth-Pratt-Morris algorithm
  • Finite-automaton search.
  • Wildcards, regular expressions and non-deterministic finite automata.
  • Web search engines.

Notes 5
Lab 3

Feb 14

 
6

Feb 19

 

Graphs, part I

  • Definitions, key ideas, applications.
  • Data structures for graphs.
  • Breadth-first search.
  • Depth-first search.
  • Applications of depth-first search.
  • Topological sort in DAG's.

Notes 6
Lab 3 cont.

Feb 21

 
7

Feb 26

 

Graphs, part II

  • On-line vs. off-line problems.
  • On-line equivalence-class problem and union-find.
  • Minimum spanning trees: Kruskal's algorithm with union-find.
  • Priority queues.
  • Prim's spanning tree algorithm.
  • Dijkstra's shortest-path algorithm.

Notes 7
Lab 4

Feb 28

 
8

Mar 04

 

Performance testing

  • Performance testing and profiling.
  • Code tuning in Java
  • Stepwise refinement in problem-solving.

Notes 8
Lab 4 cont.

Mar 06

 
 

Mar 11

Spring Break

Mar 13

9

Mar 18

 

Shortest Paths and Dynamic Programming

  • Assorted topics in Shortest-Paths: negative weights, DAG's.
  • All-pairs shortest paths: Floyd-Warshall algorithm.
  • Distributed routing: RIP, OSPF.
  • Dynamic programming: Load balancing problem.

Notes 9
Lab 5

Mar 20

 
10

Mar 25

 

Problems, solution spaces and local search

  • Combinatorial optimization problems.
  • Solution spaces, local neighborhood, walking around solution space.
  • Greedy local search.
  • Simulated annealing.

Notes 10
Lab 5 cont.

Mar 27

 
11

Apr 01

 

Problem complexity and NP-Completeness

  • Problem complexity.
  • Some well-known combinatorial problems.
  • Problem transformations.
  • NP-complete problems, reducibility.
  • Approximations.
  • Exhaustive Enumeration

Notes 11
Lab 6

Apr 03

 
12

Apr 08

 

Bio-inspired problems and algorithms

  • Molecular biology primer.
  • DNA sequencing problems.
  • Computing with DNA.
  • Genetic algorithms.

Notes 12
Lab 6 cont.

Apr 10

 
13

Apr 15

 

The Discrete Fourier Transform

  • Sound and audio signals.
  • Digitized sound and sampling.
  • The Discrete Fourier Transform.
  • DFT application to audio.
  • The Fast Fourier Transform.

Notes 13
Lab 7

Apr 17

 
14

Apr 22

 

Probability and Algorithms

  • Simple Estimation.
  • Estimation accuracy: confidence intervals.
  • Histograms
  • Monte Carlo estimation.
  • Evaluating average-case complexity of algorithms.

Notes 14
Lab 7 cont.

Apr 24

 

Inclusion Statement

Diversity, inclusion, and a mutual sense of belonging are all core values of this course. All participants in this course must be treated with respect by other members of the GW CS community. We must all strive, students and faculty both, to never make anyone feel unwelcome or unsafe in any way. Violations of these principles are viewed as unacceptable, and we take them very seriously. If you ever feel discriminated against or otherwise excluded, no matter how minor the offense, we encourage you to reach out to Xiaodong, or one of the college deans.

Lab Policy

This course features bi-weekly lab assignments which are the largest component of your course grade.

Lab assignments will typically be due by midnight on Sunday. You are strongly encouraged to start early and to use TA office hours and Blackboard for possible questions.

You will submit your assignments electronically to Blackboard. You may submit your assignment multiple times, and a history of previous submissions will be saved. You are encouraged to submit your work regularly.

Late Policy

Labs will typically be due Sundays before midnight. Late submissions will not be accepted. Even if you do not fully complete a lab assignment you should submit what you have done to receive partial credit.

If you feel that you need an extension on an assignment or that you are unable to attend class for two or more meetings due to a medical condition (e.g., extended illness, concussion, hospitalization) or other emergency, you must contact the dean’s office and your instructors. Faculty will coordinate with the deans to determine and provide the appropriate accommodations. Note that for illnesses, the GW Excuse Note Policy states that you must be seen and diagnosed by the Student Health Center if you would like them to contact your class dean with corroborating medical information.

Academic Integrity

Academic honesty is required in all your work. Under no circumstances may you hand in work done with or by someone else under your own name. Discussing ideas and approaches to problems with others on a general level is encouraged, but you should never share your solutions with anyone else nor allow others to share solutions with you. You may not examine solutions belonging to someone else, nor may you let anyone else look at or make a copy of your solutions. This includes, but is not limited to, obtaining solutions from students who previously took the course or solutions that can be found online. You may not share information about your solution in such a manner that a student could reconstruct your solution in a meaningful way (such as by dictation, providing a detailed outline, or discussing specific aspects of the solution). You may not share your solutions even after the due date of the assignment.

In your solutions, you are permitted to include material which was distributed in class, material which is found in the course textbook, and material developed by or with an assigned partner. In these cases, you should always include detailed comments indicating on which parts of the assignment you received help and what your sources were.

When working on quizzes, exams, or similar assessments, you are not permitted to communicate with anyone about the exam during the entire examination period (even if you have already submitted your work). You are not permitted to use any resources to complete the exam other than those explicitly permitted by course policy. (For instance, you may not look at the course website during the exam unless explicitly permitted by the instructor when the exam is distributed.)

Failure to abide by these rules constitutes academic dishonesty and will lead to a hearing of the College Judiciary Committee. According to the Faculty Handbook:

Because plagiarism is considered to be so serious a transgression, it is the opinion of the faculty that for the first offense, failure in the course and, as appropriate, suspension for a semester or deprivation of the degree in that year is suitable; for a second offense, the penalty should normally be expulsion.

This policy applies to all course work, including but not limited to code, written solutions (e.g. proofs, analyses, reports, etc.), exams, and so on. This is not meant to be an enumeration of all possible violations; students are responsible for seeking clarification if there is any doubt about the level of permissible communication.

The general ethos of this policy is that actions which shortcut the learning process are forbidden while actions which promote learning are encouraged. Studying lecture materials together, for example, provides an additional avenue for learning and is encouraged. Using a classmate’s solution, however, is prohibited because it avoids the learning process entirely. If you have any questions about what is or is not permissible, please contact your instructor.

Academic Accommodations

If you believe you need accommodations for a disability or a chronic medical condition, please contact Disability Support Services (DSS) at GW to arrange an appointment to discuss your needs. As appropriate, the office will issue students with documented disabilities or medical conditions a formal Accommodations Letter. Since accommodations require early planning and are not retroactive, please contact Student Disability Services as soon as possible.

To receive an accommodation for a course activity, you must have an official accommodation letter from the Disability Support Services (DSS) at GW and you need to meet with course staff to work out the details of your accommodation at least two weeks prior to the activity.

You are also welcome to contact any of the course staff privately to discuss your academic needs. However, all disability-related accommodations must be arranged, in advance, through Disability Support Services (DSS) at GW.

Programming Style

Programming is not a dry mechanical process, but a form of art. Well written code has an aesthetic appeal while poor form can make other programmers and instructors cringe. Programming assignments will be graded based on style and correctness. Good programming practices usually include many of the following principles:

  • A comment at the top of the program that includes:

    • Program authors

    • Date or Dates

    • A brief description of what the program does

  • Concise comments that summarize major sections of your code

  • Meaningful variable and function names

  • Function comments that include:

    1. description of what function does

    2. description of input value(s) (parameter values)

    3. description of return value

  • Well organized code

  • White space or comments to improve legibility

  • Avoidance of large blocks of copy-pasted code