CPSC 327 Data Structures and Algorithms Spring 2024

CPSC 327 Schedule

Reading is to be done for the class period where it is listed; "ADM" refers to the textbook (The Algorithm Design Manual). Warmups are due by 10pm the night before the class for which they are listed.

Dates for things in light gray are for planning purposes and may be adjusted slightly. Expect homework problems for most class periods.

 Assignments

Week 1: 1/22-1/26

Topics: course introduction; analysis of algorithms

 

Mon Slides and Examples: introductory survey
(on Canvas, under "Quizzes")
     

Wed Reading:
  • ADM sections 2.1-2.5 (RAM model of computation, big-Oh, growth rates and dominance relations, working with big-Oh, reasoning about efficiency)
Slides and Examples:
warmup
(on Canvas, under "Quizzes")

due Tue 1/23 10pm
     

Fri Reading: Slides and Examples: warmup
(on Canvas, under "Quizzes")

due Thu 1/25 10pm
homework 1

due Mon 1/29
   

Week 2: 1/29-2/2

Topics: analysis of algorithms; data structures: building blocks, designing implementations; containers

 

Mon Reading:
  • ADM section 4.6.3 (limitations of asymptotic complexity)
Slides and Examples:
  homework 2

due Wed 1/31
   

Wed Reading:
  • ADM chapter 3 introduction, 3.1-3.2 (review of arrays and linked lists, stacks and queues)
Slides and Examples:
  • slides: data structures toolbox (ADTs vs data structures, categories of collections ADTs, container ADTs, linked lists, arrays vs linked lists, incremental improvement, specific strategies: tail pointers, circular arrays)
warmup
(on Canvas, under "Quizzes")

due Tue 1/30 10pm
homework 3

due Fri 2/2
   

Fri Reading:
  • ADM section 3.3, 3.4-3.4.2 (dictionaries, binary search trees)
Slides and Examples:
warmup
(on Canvas, under "Quizzes")

due Thu 2/1 10pm
homework 4

due Mon 2/5
   

Week 3: 2/5-2/9

Topics: balanced search trees, hashtables

 

Mon Reading:
  • ADM 3.4.3 (balanced search trees)
  • AVL trees
Slides and Examples:
warmup
(on Canvas, under "Quizzes")

due Sun 2/4 10pm
homework 5

due Wed 2/7
   

Wed Reading: Slides and Examples:
  • slides: data structures toolbox (multiway search trees and 2-4 trees, with an overview of red-black and splay trees)
warmup
(on Canvas, under "Quizzes")

due Tue 2/6 10pm
homework 6

due Fri 2/9
homework 1 redo

due Wed 2/7

(comments on hw1)
 

Fri Reading:
  • ADM 3.7 (hashing and hashtables)
Slides and Examples:
warmup
(on Canvas, under "Quizzes")

due Thu 2/8 10pm
homework 7

due Mon 2/12
homework 2 redo

due Fri 2/9

(comments on hw2)
 

Week 4: 2/12-2/16

Topics: data structures: sorting; priority queues, heaps; ADT/data structure roundup; developing data structures

 

Mon Reading:
  • ADM 3.5 (priority queues)
Slides and Examples:
warmup
(on Canvas, under "Quizzes")

due Sun 2/11 10pm
homework 8

due Wed 2/14
   

Wed Reading:
  • ADM 4.3.1-4.3.4 (heaps)
Slides and Examples:
warmup
(on Canvas, under "Quizzes")

due Tue 2/13 10pm
homework 9

due Fri 2/16
homework 4 redo

due Wed 2/14

(comments on hw4)
 

Fri Reading:
  • ADM 3.6, 3.8-3.9 (custom and specialized data structures)
  • ADM 3.7.2-3.7.5 (other uses of hashing)
  • ADM 15 (hitchhiker's guide) — read to be aware of what is there
Slides and Examples:
warmup
(on Canvas, under "Quizzes")

due Thu 2/15 10pm
homework 10

due Mon 2/19
homework 5 redo

due Fri 2/16

(comments on hw5)
 

Week 5: 2/19-2/23

Topics: graphs

 

Mon Reading:
  • ADM 7 (introduction), 7.1 (graphs and graph terminology)
  • ADM 7.2 data structures for graphs — pay attention to the data structures and how they work rather than the C code
  • ADM 7.3-7.4 (war stories)
Slides and Examples:
  • slides: graphs (graphs and graph terminology, Graph ADT, implementing the Graph ADT)
warmup
(on Canvas, under "Quizzes")

due Sun 2/18 10pm
  homework 3 redo
homework 6 redo

due Mon 2/19

(comments on hw3)
exam 1
(on Canvas, under "Assignments")

due Wed 2/21 in class

(review information)

Wed Reading:
  • ADM 7.5 (graph traversals)
  • ADM 7.6-7.7 (BFS and BFS-based algorithms and applications)
Slides and Examples:
  • slides: graphs (implementing the Graph ADT)
  • slides: graphs (breadth-first search)
warmup
(on Canvas, under "Quizzes")

due Tue 2/20 10pm
    programming assignment 1
Graph ADT

due Fri 3/1 in class

Fri Reading:
  • ADM 7.8-7.10 (DFS and DFS-based algorithms and applications)
Slides and Examples:
  • slides: graphs (breadth-first search)
  • slides: graphs (depth-first search)
warmup
(on Canvas, under "Quizzes")

due Thu 2/22 10pm
homework 11

due Mon 2/26
homework 7 redo
homework 8 redo

due Fri 2/23

(comments on hw7, comments on hw8)

Week 6: 2/26-3/1

Topics: shortest paths, minimum spanning tree; developing algorithms: correctness

 

Mon Reading:
  • ADM 8 introduction (weighted graph algorithms)
  • ADM 8.3 (shortest paths)
Slides and Examples:
  • slides: graphs (depth-first search — cut vertices/edges, topological sort)
  • slides: graphs (Dijkstra's algorithm)
warmup
(on Canvas, under "Quizzes")

due Sun 2/25 10pm
   

Wed Reading:
  • ADM 8.1-8.1.3 (minimum spanning trees)
Slides and Examples:
  • slides: graphs (Dijkstra's algorithm, Bellman-Ford, other weighted graph algorithms)
  • slides: graphs (MST — Kruskal's algorithm)
warmup
(on Canvas, under "Quizzes")

due Tue 2/27 10pm
homework 12

due Wed 3/6
 

Fri Reading:
  • ADM 1.1-1.2 (motivation for algorithm correctness)
  • ADM 1.3, 1.4, 1.6 (reasoning about correctness, proof by induction, proof by contradiction)
Slides and Examples:
warmup
(on Canvas, under "Quizzes")

due Thu 2/29 10pm
homework 9 redo
homework 10 redo

due Fri 3/1

(comments on hw9, comments on hw10)
exam 2
(on Canvas, under "Assignments")

due Mon 3/4 in class

(review information)

Week 7: 3/4-3/8

Topics: fundamental algorithms, applications of data structures; solving problems with graphs


Mon Reading:
  • ADM 17.2 (fundamental algorithms — searching)
  • ADM 4.1-4.2, 4.3.5, 4.7, 17.1 (fundamental algorithms — sorting)
  • ADM 3.7.2-3.7.5 (applications of data structures and related techniques)
  • ADM 4.4, 4.8 (war stories)
Slides and Examples:
  programming assignment 2
Dijkstra's algorithm

due Mon 3/11 Fri 3/8 in class

Wed Reading:
  • ADM 8.7 (design graphs, not algorithms)
  • ADM 7.1.1, 8.2, 8.4 (examples and war stories)
  • ADM 8.1.4, 8.5-8.6, 18 (other graph algorithms) — read to be aware of what is there
Slides and Examples:
warmup
(on Canvas, under "Quizzes")

due Tue 3/5 10pm
homework 13

due Fri 3/8
 

Fri Slides and Examples:   homework 14

due Mon 3/11
 

Week 8: 3/11-3/15

Topics: divide-and-conquer algorithms


Mon Reading: Slides and Examples: warmup
(on Canvas, under "Quizzes")

due Sun 3/10 10pm
  homework 11 redo

due Mon 3/11

(comments on hw11)
exam 3
(on Canvas, under "Assignments")

due Wed 3/13 in class

(review information)

Wed Slides and Examples:
  • example: stocks — from class (in progress), complete (developing divide-and-conquer algorithms)
  homework 15

due Fri 3/15
   

Fri Slides and Examples:
  • example: majority element — from class (in progress), complete (developing divide-and-conquer algorithms)
    homework 12 redo
(corrected)

due Fri 3/15

(comments on hw12)
 

Spring Break: 3/16-3/24


Week 9: 3/25-3/29

Topics: iterative algorithms, greedy algorithms

 

Mon Reading: Slides and Examples:   homework 16

due Wed 3/27
 

Wed Slides and Examples:   homework 17

due Fri 3/29
 

Fri Reading: Slides and Examples:   homework 18

due Mon 4/1
homework 13 redo

due Fri 3/29

(comments on hw13)
programming assignment 3
Ski-O

due Wed 4/10 in class

Week 10: 4/1-4/5

Topics: greedy algorithms; recursive backtracking

 

Mon Slides and Examples:
  • example: Boston to Seattle — complete (developing greedy algorithms)
  homework 19

due Wed 4/3
homework 15 redo
Dijkstra's redo

due Mon 4/1

(comments on hw15, comments on Dijkstra's implementation)

Wed Slides and Examples:
  • example: callers on hold — from class (in progress), complete (developing greedy algorithms)
  homework 20

due Fri 4/5
 

Fri Reading: Slides and Examples:   homework 21

due Mon 4/8
 

Week 11: 4/8-4/12

Topics: pruning; branch and bound; dynamic programming

 

Mon Slides and Examples:   homework 22

due Fri 4/12

Wed Reading:
  • pruning and branch and bound
  • ADM 9.3 (pruning)
  • ADM 9.4 (example)
  • ADM 9.5 (war stories)
  • ADM 9.6-9.7 (branch and bound — best-first search, A* heuristic)
Slides and Examples:
warmup
(on Canvas, under "Quizzes")

due Tue 4/9 10pm
   

Fri Reading: Slides and Examples:   homework 23

due Mon 4/15
   

Week 12: 4/15-4/19

Topics: dynamic programmming; developing algorithms: strategies for improvement, beyond big-Oh

 

Mon Slides and Examples:   homework 24

due Wed 4/17
homework 18 redo

due Mon 4/15

(comments on hw18)
 

Wed Slides and Examples:
  • example: TSP — from class (in progress), complete (developing dynamic programming algorithms)
       

Fri Reading:
  • ADM 4.7 (distribution sort)
  • ADM 4.6.2, introduction to chapter 6 (randomization as an algorithmic technique)
  • ADM 4.6.3, 4.8 (beyond big-Oh)
  • (optional) ADM chapter 6 (randomized algorithms)
Slides and Examples:
      programming assignment 4
Time-O

due Fri 5/3 in class

Week 13: 4/22-4/26

Topics: reductions; complexity classes

 

Mon Reading:
  • ADM 11.1-11.6 (reductions and proving hardness)
  • ADM 11.7-11.8 (war stories)
Slides and Examples:
warmup
(on Canvas, under "Quizzes")

due Sun 4/21 10pm
   

Wed HWS Day (no class)      

Fri Reading:
  • ADM 11.9 (P vs NP)
Slides and Examples:
warmup
(on Canvas, under "Quizzes")

due Thu 4/25 10pm
homework 25

due Wed 5/1
homework 22 #2, #4 redo

due Fri 4/26

(comments on hw22)

Week 14: 4/29-5/3

Topics: dealing with NP-complete problems; wrapup

 

Mon Reading:
  • ADM 9.6-9.7 (best-first search, A* heuristic)
  • ADM 12.6, 12.9 (heuristic search methods, genetic algorithms)
  • ADM 12.7-12.8 (war stories)
Slides and Examples:
  homework 16 redo
homework 19 redo
homework 20 redo
homework 21 redo
homework 22 #1, #3 redo

due Mon 4/29

(comments on hw15, comments on hw18, comments on hw22)

Wed Reading:
  • ADM 12.1 (approximation)
  • ADM 12.2-12.5 (examples)
Slides and Examples:
     

Fri Reading:
  • browse ADM part II (chapters 14-22) — for each chapter, read the introduction, skim the section titles, and pick one unfamiliar problem to read about
Slides and Examples: Solutions/Examples: to be posted Friday; handins for these problems will no longer be accepted after the solutions have been posted
    homework 23 redo
homework 24 redo

due Fri 5/3

(comments on hw23)
 

Reading Period: 5/4-5/6

 

Sat       final exam
(on Canvas, under "Assignments")

due 5/8 11:30am

(review information)

Sun      

Mon office hours 10am-1pm      

Final Exams: 5/7-5/10


Tue office hours 10am-1pm     programming assignment 1 (Graph) redo
programming assignment 3 (ski-o) redo
homework 25 redo
due 5/8 11:30am

(comments on Graph, comments on ski-o, comments on hw25)

Wed end-of-semester deadline
no work accepted after 5/8 11:30am

Thu        

Fri