Introduction and objectives
This course is about designing algorithms for computational problems, and how to think clearly about analyzing correctness and running time. The main goal is to provide the intellectual tools needed for designing and analyzing your own algorithms for new problems you need to solve in the future.
The official plan of this course is hosted in FCUP here.
Learning outcomes and competences
Students should be able to understand the relationship between algorithm design, correctness proof and complexity analysis. Students should learn algorithmic techniques of general applicability and get to know some major algorithms in a few common domains. They will also obtain practical experience in applying generic algorithms to specific problems.
- Algorithm correctness
- Complexity: worst/best-case analysis
- Fundamentals of asymptotic analysis
- Average-case and randomized algorithms
- Recursive algorithms
- Amortized analysis
- Data structures - Collections and Dictionaries
- Fundamentals of NP-completeness
- 22 Sep 23: Introduction (1-intro.pdf) and algorithm correctness: specifying problems logically (2-correctness.pdf - pages 1-18)
- 29 Sep 23: Algorithm correctness: partial and complete correctness (2-correctness.pdf - pages 13-36); motivation for performance analysis (3-countingsteps.pdf - pages 1-29)
- 6 Oct 23: Algorithms complexity: best and worst case analysis. Counting steps and asymptotic notation (3-countingsteps.pdf - pages 23-63)
- 13 Oct 23: Exercises with asymptotic notation (3-countingsteps.pdf - pages 64-66); Time complexity of recursive algorithms (3-countingsteps.pdf - pages 67-95)
- 20 Oct 23: Exercises on the time complexity of recursive algorithms and the master theorem (3-countingsteps.pdf - pages 96-112); Average time complexity (4-average-time.pdf - pages 1-19)
- 27 Oct 23: Average time complexity and analysis of the quicksort algorithm (4-average-time.pdf - pages 20-32); Randomised algorithms (4-average-time.pdf - pages 33-40); Amortised analysis and the aggregate method (5-amortised.pdf - pages 1-11)
- 10 Nov 23: Test (30%): 9h30-10h30 (Specification, Correction, Worst/Best time analysis, Asymptotic analysis); Rest of the lesson starts at 11h15 - Amortised analysis (5-amortised.pdf - pages 11-26)
- 17 Nov 23: Amortised analysis (5-amortised.pdf - pages 27-44); Data structures: sequences (6-data-structures.pdf - pages 1-8)
- 24 Nov 23: Data structures: buffers and dictionaries (6-data-structures.pdf - pages 9-28)
- 1 Dec 23: Holiday
- 8 Dec 23: Holiday
- 15 Dec 23: Improvement test (70%): 9h30-11h30 (focused on average-time, amortised time, and data structures, but all topics can be asked); no lesson after the test
Literature and Material
- Introduction to the course
- Algorithm correctness
- Counting steps and asymptotic notation
- Average-time and probabilistic algorithms
- Amortised analysis
- Data structures
- Introduction to algorithms, Cormen Thomas H. et al.; ISBN: 9780262033848
- Slides from Pedro Ribeiro (2018/19): https://www.dcc.fc.up.pt/~pribeiro/aulas/alg1819/material.html#slides
- Content from Ana Paula Tomás (2021/22): https://www.dcc.fc.up.pt/~apt/Aulas/ALGO2223.html
- Slides from similar courses:
- The algorithm design manual; Skiena Steven S.; ISBN: 978-1-84800-069-8
- Competitive Programming 3: The New Lower Bound of Programming Contests; Steven Halim and Felix Halim; 2023
- Algorithms; Sedgewick Robert; ISBN: 0-201-06673-4
- Algorithm Design; Jon Kleinberg and Éva Tardos; 2005. ISBN: 978-0321295354
- Tópicos Avançados em Algoritmos; Armando Matos; DCC/FCUP, 2008 (In Portuguese - some lecture notes)
- Desenho e Análise de Algoritmos – Alguns Apontamentos; Ana Paula Tomás; DCC/FCUP, 2013
Teaching methods and learning activities
Lectures; intermediate test (mandatory) and final test or final exam.
The lectures mix the presentation of new material (introducing concepts, main algorithms and some results) with interactive discussion of their application when solving real problems.
The homework focus is on practical application of algorithmic concepts, consolidating the learned material.
The final exam and intermediate tests (closed book), globally evaluates the knowledge acquired by the students.
Distributed evaluation with final exam
Amount of time allocated to each course unit
Eligibility for exams
All students will be admitted to the exams.
Calculation formula of final grade
- (IT) intermediate mid-term test (mandatory) 30%
- 10 Nov, during the lecture time.
(FE) final exam: 70% (can be replaced by IT2)
- (IT2) improvement test: can replace the final exam. Required IT2 >= 8.
1st Exam (“Normal”) classification: C = max(FE,IT2)0.7+ IT0.3 >= 9.5
2nd Exam (“Recurso”) classification: C = max(FE0.7+IT0.3, FE) >= 9.5
Required FE >=8.
The day and time for appointments is Friday afternoon (José Proença). Please email me the day before if you wish to meet. If you prefer you can also just send an email with your questions to José Proença, or we can try to book an online meeting.