Skip to main content

DD2352 Algorithms and Complexity 7.5 credits

Second course in computer science focusing on algorithms and complexity, more theoretical than DD1352.

Choose semester and course offering

Choose semester and course offering to see information from the correct course syllabus and course offering.

Headings with content from the Course syllabus DD2352 (Autumn 2021–) are denoted with an asterisk ( )

Content and learning outcomes

Course contents

Principles for construction of algorithms: Decomposition, greedy algorithms, dynamic programming. Algorithm analysis. Probalistic algorithms. Approximation. Selected applications to sets, graphs, arithmetic, and geometry.

Computability and complexity: Reduction. Complexity classes P (polynomial time), NP (non-deterministic polynomial time), and NC (efficiently parallelizable problems). NP-complete problems. Undecidable problems.

Intended learning outcomes

The goals of the course are to give the students

  • the fundamental skills needed to develop algorithms using data structures and analyze their correctness and efficiency,
  • an introduction to complexity theory,
  • explain how one can handle problems with high complexity

so that they will be able to

  • design programs that use computer resources efficiently,
  • realize that there are problems that are impractical or even impossible to solve by a computer.

Course disposition

No information inserted

Literature and preparations

Specific prerequisites

For single course students:

SF1604 Linear algebra, SF1625 Calculus in one variable, DD1337 Programming, DD1338 Algorithms and Data Structures, SF1630 Discrete Mathematics and SF1901 Probability Theory and Statistics or corresponding courses.

Recommended prerequisites

Basic computer science knowledge equivalent to DD1320-DD1327/DD2325/ID1020/ID1021.

Programming knowledge equivalent to DD1310-DD1318/DD1321/DD1331/DD100N/ID1018.

Knowledge of discrete mathematics and probability theory equvalent to for example SF2736/SF1610/SF1631 Discrete Mathematics and SF1901 Probability Theory and Statistics.


No information inserted


No information inserted

Examination and completion

If the course is discontinued, students may request to be examined during the following two academic years.

Grading scale

A, B, C, D, E, FX, F


  • LAB1 - Laboratory Work, 1.5 credits, grading scale: P, F
  • MAS1 - Test, 1.5 credits, grading scale: A, B, C, D, E, FX, F
  • MAS2 - Test, 1.5 credits, grading scale: A, B, C, D, E, FX, F
  • TEN1 - Examination, 3.0 credits, grading scale: A, B, C, D, E, FX, F

Based on recommendation from KTH’s coordinator for disabilities, the examiner will decide how to adapt an examination for students with documented disability.

The examiner may apply another examination format when re-examining individual students.

Opportunity to complete the requirements via supplementary examination

No information inserted

Opportunity to raise an approved grade via renewed examination

No information inserted


Profile picture Per Austrin

Ethical approach

  • All members of a group are responsible for the group's work.
  • In any assessment, every student shall honestly disclose any help received and sources used.
  • In an oral assessment, every student shall be able to present and answer questions about the entire assignment and solution.

Further information

Course web

Further information about the course can be found on the Course web at the link below. Information on the Course web will later be moved to this site.

Course web DD2352

Offered by

EECS/Computer Science

Main field of study

Computer Science and Engineering

Education cycle

Second cycle

Add-on studies

DD2440 Advanced Algorithms, DD2452 Seminars in Theoretical Computer Science, Algorithms and Complexity, DD2445 Complexity Theory, and DD2458 Problem Solving and Programming under Pressure.


Per Austrin, e-post:

Supplementary information

This course has replaced DD2354 Algorithms and Complexity.

The course cannot be combined with any of the courses DD1352, DD2350, DD2354.

In this course, the EECS code of honor applies, see: