# DD2350 Algorithms, Data Structures and Complexity 9.5 credits

#### Algoritmer, datastrukturer och komplexitet

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.

### Offering and execution

#### No offering selected

Select the semester and course offering above to get information from the correct course syllabus and course offering.

## Course information

### 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. 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 completion of the course, students 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 construct computer programs that use time and memory efficiently,
• in professional life identify and attack problems that are unrealistically resource demanding or not possible to solve on a computer.

#### Course Disposition

No information inserted

### Literature and preparations

#### Specific prerequisites *

Completed courses in all of the following areas:

• Programming equivalent to DD1310/DD1311/DD1312/DD1314/DD1315/DD1316/DD1318/DD1331/DD1337/DD100N/ID1018.
• Computer science equivalent to DD1338/DD1320/DD1321/DD1325/DD1327/ID1020.
• Discrete mathematics equivalent to SF1671/SF1630/SF1662/SF1679.
• Algebra and geometry equivalent to SF1624.
• Calculus in one variable equivalent to 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. This applies only to students who are first-time registered for the prerequisite course offering or have both that and the applied-for course offering in their individual study plan.

#### Recommended prerequisites

For some of the labs in the course, a more efficient programming language than Python has to be used, hence knowledge of Java or C/C++ is recommended.

A student who only has studied discrete mathematics in SF1671 will need to take SF1688 in parallel to DD2350. The discrete math course DD1610 is considered as equivalent to SF1662 regarding admission requirements.

Probability theory and statistics corresponding to SF1901 is recommended. Logic corresponding to DD1350/DD1351 is recommended but not necessary.

#### 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

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.

#### 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. For LAB1, only grades B and C can be raised.

### 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 DD2350

#### Offered by

EECS/Computer Science

#### Main field of study *

Computer Science and Engineering

#### Education cycle *

Second cycle

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

#### Contact

Viggo Kann (viggo@kth.se)

#### 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.

#### Supplementary information

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

The course has replaced DD1352. 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