General Info


Teaching Assistants

When and where Monday 8.15-12, Bldg. 358, Room 060a

Prerequisites Undergraduate level courses in algorithms and data structures (comparable to 02105 + 02110) and mathematical maturity. You should have a working knowledge of algorithm analysis (e.g. asymptotic notation, worst case analysis, amortized analysis, basic analysis of randomized algorithms), data structures (e.g. stacks, queues, linked lists, trees, heaps, priority queues, hash tables, balanced binary search trees, tries), graph algorithms (e.g. BFS, DFS, single source shortest paths, minimum spanning trees, topological sorting), dynamic programming, divide-and-conquer, and NP-completeness (e.g. basic reductions).

Gradescope We use Gradescope for correcting and scoring exercises. The system significantly improves consistency and quality in correcting. Please sign up for Gradescope as follows:

  1. Go to
  2. Select "Sign up for free".
  3. Select "Sign up as a student".
  4. Enter the course entry code 3Y8JXN, your full name, your email, and your student-id (of the form s123456). Please follow these instructions precisely so that we can correctly identify you.
If you do not wish to sign up for Gradescope please contact a course responsible.


The weekplan is preliminary It will be updated during the course. Under each week there is a number of suggestions for reading material regarding that weeks lecture. It is not the intention that you read ALL of the papers. It is a list of papers and notes where you can read about the subject discussed at the lecture. When available we also post screencasts of lectures. These were recorded during the COVID-19 lockdown.

Week Topics Slides Weekplan Material Screencasts
Integer Data Structures I: Dictionaries, Universal and Perfect Hashing. 1x1 · 4x1 Hashing Hashing 1 · Hashing 2 · Hashing 3
Integer Data Structures II: Predecessor Problem, van Emde Boas, x-Fast and y-Fast Tries 1x1 · 4x1 Predecessor Predecessor 1 · Predecessor 2
Integer Data Structures III: Nearest Common Ancestor, Range Minimum Query 1x1 · 4x1 LCA and RMQ See DTU Learn
Geometry: Range Reporting, Range Trees, and kD Trees 1x1 · 4x1 Range Reporting Range Reporting 1 · Range Reporting 2 · Range Reporting 3
Trees: Level Ancestor, Path Decompositions, Tree Decompositions 1x1 · 4x1 Level Ancestor See DTU Learn
Strings I: Dictionaries, Tries, Suffix trees 1x1 · 4x1 Suffix Trees See DTU Learn
Strings II: Radix Sorting, Suffix Array, Suffix Sorting 1x1 · 4x1 Suffix Sorting Suffix Sorting 1 · Suffix Sorting 2
Compression: Lempel-Ziv, Re-Pair, Grammars, Compressed Computation 1x1 · 4x1 Compression Compression
Approximation Algorithms I: Introduction to approximation algorithms, scheduling and k-center. 1x1 · 4x1 Approximation Algorithms I See DTU Learn
Approximation Algorithms II: TSP, Set cover 1x1 · 4x1 Approximation Algorithms II See DTU Learn
Dynamic Graphs I 1x1 Dynamic Graphs I Link-cut trees, Sleator and Tarjan.
See also: Erik Demaine's lecture video + notes, scribe notes, and other scribe notes
See also these lecture notes by Klein and Mozes.
No screencast
Dynamic Graphs II 1x1 Dynamic Graphs II Dynamic out-orientations by Brodal and Fagerberg.
See also Berglin + Brodal for further reading. See also Section 5 in Christiansen + Rotenberg for a slight strengthening of the theorem.
No screencast
Course Roundup, Questions, Future Perspectives

Hand-in Exercises

The course features number of non-mandatory/voluntary hand-in exercises that are posted throughout the course. These are handed in as follows. and a single mandatory hand-in exercise. The voluntary exercises are posted frequently throughout the course and the mandatory exercise is posted towards the end of the course.

Use the template.tex file to prepare your write up your solution to the exercises. Do not repeat the problem statement in your solutions and do not modify the template. Compile your solutions using LaTeX. The maximum size of the finished pdf must be at most 2 pages. To submit your solution:

Mandatory Exercise

The course features a single mandatory exercise that is posted towards the end of the course. The exercise is hand-in according to the same guidelines as the non-mandatory/voluntary hand-in exercises, except that the page limit may be different.

Collaboration policy for the mandatory exercise

Violation of the collaboration policy is strictly prohibited.

Frequently Asked Questions

How should I write my exercises? The ideal writing format for exercises is classical scientific writing, such as the writing found in the peer-reviewed articles listed as reading material for this course (not textbooks and other pedagogical material). One of the objectives of this course is to practice and learn this kind of writing. A few tips:

How much do the mandatory exercise count in the final grade? The final grade is an overall evaluation of your mandatory exercise and the oral exam combined. Thus, there is no precise division of these part in the final grade. However, expect that (in most cases, and under normal circumstances) the mandatory exercises account for a non-trivial fraction of the final grade.

What do I do if I want to do a MSc/BSc thesis or project in Algorithms? Great! Algorithms is an excellent topic to work on :-) and Algorithms for Massive Data Sets is designed to prepare you to write a strong thesis. Some basic tips and points.