Skip to main content
Till KTH:s startsida

DD2350 Algorithms, Data Structures and Complexity 9.5 credits

This course provides an introduction to theoretical computer science, which is a strong research area at KTH. You will meet some of our research results in the course.

You will learn more about algorithm design and see some pretty complicated, but very useful, algorithms. The complexity part of the course is about how to investigate which problems can be solved (in reasonable time) with the help of computers, which problems take an unreasonably long time and which cannot be solved with a computer at all.

Problems that are too difficult to solve accurately can sometimes be solved approximately. You will see examples of some approximation algorithms and some problems that are so difficult that they cannot even be approximated in a reasonable time.

Information per course offering

Termin

Information for Autumn 2024 adk24 programme students

Course location

KTH Campus

Duration
26 Aug 2024 - 13 Jan 2025
Periods
P1 (6.0 hp), P2 (3.5 hp)
Pace of study

33%

Application code

51099

Form of study

Normal Daytime

Language of instruction

Swedish

Number of places

Places are not limited

Target group

Open to all programmes as long as it can be included in your programme.

Planned modular schedule
[object Object]

Contact

Examiner
No information inserted
Course coordinator
No information inserted
Teachers
No information inserted
Contact

Viggo Kann (viggo@kth.se)

Course syllabus as PDF

Please note: all information from the Course syllabus is available on this page in an accessible format.

Course syllabus DD2350 (Autumn 2024–)
Headings with content from the Course syllabus DD2350 (Autumn 2024–) are denoted with an asterisk ( )

Content and learning outcomes

Course contents

Design principles of algorithms: Decomposition, greedy algorithms, dynamic programming, local and exhaustive search. Algorithm analysis. Approximation algorithms and heuristics. Applications with algorithms for problems on sets, graphs, arithmetic and geometry. Implementation of algorithms.

Data structures: Review of hash tables and heaps; balanced trees, Bloom filters, persistent data structures Use and implementation of data structures. Computability and complexity: The concept of reduction, the complexity classes P (polynomial time) and NP (non-deterministic polynomial time). NP-complete problems, undecidable problems. Coping with computationally intractable problems.

Terminology in Swedish and English.

Intended learning outcomes

After passing the course, the student should be able to

  • develop and implement algorithms with data structures and analyse them with respect to correctness and efficiency
  • compare alternative algorithms and data structures regarding efficiency and reliability
  • define and translate central concepts such as P, NP, NP-completeness and undecidability
  • compare problems with respect to complexity by means of reductions
  • handle problems with high complexity

in order to

  • independently be able to design computer programs that use time and memory efficiently and thereby can contribute to economically and environmentally sustainable development
  • in professional life identify and attack problems that are unrealistically resource demanding or not possible to solve on a computer.

Literature and preparations

Specific prerequisites

Knowledge and skills in programming, 6 credits, equivalent to completed course DD1337/DD1310-DD1318/DD1321/DD1331/DD100N/ID1018.

Knowledge in foundations of computer science, 6 credits, equivalent to completed course DD1338/DD1320-DD1327/DD2325/ID1020/ID1021.

Knowledge in discrete mathematics, 3 higher education credits, equivalent to completed course SF1671/SF1610/SF1630/SF1662/SF1679.

Knowledge in algebra and geometry, 7.5 higher education credits, equivalent to completed course SF1624.

Knowledge in calculus in one variable, 7.5 higher education credits, equivalent to completed course SF1625.

Active participation in a course offering where the final examination is not yet reported in LADOK is considered equivalent to completion of the course.
Being registered for a course counts as active participation.
The term 'final examination' encompasses both the regular examination and the first re-examination.

Recommended prerequisites

Good programming skills (equivalent to DD1337/DD1310-1319/DD1331/DD1332/ID1018). For lab 2, some knowledge of Java programming is needed. In some of the labs in the course, a more efficient programming language than Python has to be used, e.g. Java or C/C++.

Concepts from algorithms and data structures (equivalent to DD1338/DD1320-DD1328/ID1021) including algorithm analysis, time complexity, pseudocode, algorithm justification, algorithms for searching and sorting, data structures: lists, queues, stacks, sets, binary trees, priority queues, hash tables.

Concepts from probability theory (equivalent to SF1900-SF1935) including probability, conditional probability, independence, expectation.

Concepts from logic (equivalent to DD1351) including propositional logic, induction, and program verification.

Concepts from algebra and geometry (equivalent to SF1624) including vectors, matrices, systems of linear equations, vector geometry with scalar and vector products.

Concepts from single-variable calculus (equivalent to SF1625) including functions, domains, ranges, increasing and decreasing functions, exponential functions and logarithms, power laws, logarithmic laws, limits, l'Hôpital's rule, sequences, and series.

Concepts from discrete mathematics including sets, induction, recurrence equations, numeral systems, divisibility, Euclid's algorithm, prime numbers, unique factorization, modular arithmetic, graphs, Eulerian circuits, Hamiltonian cycles, trees, graph coloring, bipartite graphs, permutations, rings. Anyone who has not completed 7.5 credits of discrete mathematics equivalent to SF1610/SF1630/SF1662/SF1679 by the start of the course must take SF1688 in parallel with DD2350, see additional regulations in the course syllabus.

Equipment

No information inserted

Literature

  • Algorithm Design by Kleinberg-Tardos, Pearson, 2014, ISBN 978-1292023946.

  • Algorithms and Complexity, a supplement to Algorithm Design, Pearson Custom Publishing, ISBN 978-1847764126.

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

Examination

  • LAB1 - Laboratory assignments, 4.0 credits, grading scale: A, B, C, D, E, FX, F
  • MAS1 - Individual master´s test, 1.5 credits, grading scale: A, B, C, D, E, FX, F
  • MAS2 - Individual master´s test, 1.5 credits, grading scale: A, B, C, D, E, FX, F
  • TEN1 - Theory examination, 2.5 credits, grading scale: P, 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.

The grade for LAB1 depends on how many computer labs are presented orally within the specified time.

The master's tests are constituted by individual assignments that are reported both in writing and orally

Optional theoretical assignments with peer assessment that will give bonus points to the theory examination.
The theory exam is conducted as a digital quiz with subsequent peer assessment.

Opportunity to complete the requirements via supplementary examination

The requirements for E/pass for the components MAS1, MAS2 and TEN1 can be completed via supplementary examination for students receiving grade Fx. A passed individual lab assignment can be credited in later course offerings if the assignment is unchanged.

Opportunity to raise an approved grade via renewed examination

An approved grade can be raised for MAS1 and MAS2 in a later course offering. For LAB1, only grades B and C can be raised, with the grade rising lab in a later course offering. It is not possible to receive new lab delivery points in a later course offering.

Examiner

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 room in Canvas

Registered students find further information about the implementation of the course in the course room in Canvas. A link to the course room can be found under the tab Studies in the Personal menu at the start of the course.

Offered by

Main field of study

Computer Science and Engineering

Education cycle

Second cycle

Add-on studies

DD2440 Advanced Algorithms, DD2542 Seminars in Theoretical Computer Science, Algorithms and Complexity, DD2445 Complexity Theory, DD2448 Foundations of Cryptography, and DD2458 Problem Solving and Programming under Pressure.

Contact

Viggo Kann (viggo@kth.se)

Supplementary information

Information before you start the course.

Information on assessment of assignments after the end of the course.

Grading critera will be published at the start of the course.

DD2350 cannot be combined with DD1352, DD2352, or DD2354.

In this course, the EECS code of honor applies, see:
http://www.kth.se/en/eecs/utbildning/hederskodex

Additional regulations

A student who, at the beginning of the course, has not completed 7.5 higher education credits of discrete mathematics, equivalent to SF1610/SF1630/SF1662/SF1679, must take SF1688 in parallel with DD2350.