Lectures will be held onsite. If there will be any online lectures, links for meetings will be announced. The presentations will be interactive discussions on the main subjects included in the lecture notes. We will use many examples. It is strongly recommended to read the lecture notes before and come up with your own questions.
Lecture 1: Introduction
What is an algorithm
Alk Language
Computation of an Algorithm
Problem Solved by an Algorithm
Alk Primer
Supplementary notes:
A note on why a formal definition for the notion of algorithm is needed
A note on solvability (decidability) versus correctness, with two examples of correct algorithms
A note with an example where the analysis of the problem domain is important
A note with an almost complete description of the Alk language as a computation model
The site where the Alk interpreter can be downloaded is https://github.com/alk-language/java-semantics.
Alk reference manual: https://github.com/alk-language/java-semantics/wiki/Reference-Manual
Algorithm efficiency: cost functions
Worst-case analysis
The complexity of the computational problems
The complexity of sorting
Polynomial reduction of problems
Examples: .zip
Supplementary bibliography:
Sections 1.2, 1.3 in [LC2008]
nondeterministic algorithms
problem solved by a nondeterministic algorithm
nondeterministic algorithms for decision problems
probabilistic algorithms
Monte Carlo algorithms
Las Vegas algorithms
Examples: .zip
Supplementary bibliography
More examples of non-deterministic algorithms
Manuel Blum, Robert W. Floyd, Vaughan Pratt, Ronald L. Rivest, and Robert E. Tarjan. 1972. Linear time bounds for median computations. pdf
Manuel Blum, Robert W. Floyd, Vaughan Pratt, Ronald L. Rivest, and Robert E. Tarjan.Time Bounds for Selection. pdf
CMU 15-451 (Algorithms), Fall 2011. Lecture 4. Selection (deterministic & randomized): finding the median in linear time. pdf
Sections 2.6.5 and 2.6.6 from the Alk Reference Manual.
expected time for deterministic algorithms
case studies:
the first occurrence in a list
Quicksort
Nuts and Bolts
Treaps
Examples: .zip
Supplementary bibliography
UIUC CS 473: Fundamental Algorithms, Spring 2011 March 10, 2011. Chapter 14- Introduction to Randomized Algorithms: Quick Sort and QuickSelection
UIUC CS 473:Algorithms (Spring 2017). Sorting nuts and bolts
Raimund Seidel and Cecilia R. Aragon. Randomized search trees. Algorithmica, 16(4/5):464-497, 1996. Available at https://faculty.washington.edu/aragon/pubs/rst96.pdf
Jeff Erickson. Algorithms, Treaps and Skip Lists section.
Reminder: computational problems, decision problems, optimisation problems, reductions, non-deterministic algorithms
Casting optimisation problems as decision problems
The class PTIME: definition and examples
Karp reductions
The class NPTIME: definition and examples
NP-hard: definition and
NP-complete: definition and examples
Showing a problem to be NP-complete
case study: 3-COL
English language lecture notes recommendation: https://jeffe.cs.illinois.edu/teaching/algorithms/book/12-nphard.pdf
Lecture 8
The string matching problem (problem domain: string, substring, prefix, sufix, border, offset, etc.)
The naive algorithm
The time complexity of the naive algorithm in the worst case
The KMP algorithm
The time complexity of the KMP algorithm in the worst case
Preprocessing: computing the failure function
The time complexity of the preprocessing phase in the worst case
Algorithmic Paradigms
Optimization Problems
Greedy Ingredients
Problem Properties
Problems
Continuous Knapsack
Interval Scheduling
Minimum Spanning Tree
Median Maximization
General Description
One-Dimensional Problems
Fibonacci
Longest Increasing Subsequence
Rod cutting
General Approaches
Two-Dimensional Problem
Discrete Knapsack
Other Classic DP problems
Longest Common Subsequence
Edit Distance
DP on trees
Subsequence
Rod cutting
Partial Sums
Backtracking
Motivation
Exhaustive Search
Generic Implementation
n-Queens
Satisfiability
Branch & Bound
Knapsack Problem
Traveling Sales Person
[LC2008] Dorel Lucanu, Mitica Craus. Proiectarea algoritmilor. Polirom, 2008.
[CLR1990] T.H. Cormen, C.E. Leiserson, R.L. Rivest: Introduction to Algorithms, MIT Press, 1990.
[CLR2000] T.H. Cormen, C.E. Leiserson, R.L. Rivest: Introducere in Algoritmi, Computer Libris Agora, 2000.
[Alk-Fnd] Lungu, A., Lucanu, D.: A matching logic foundation for Alk. In: Seidl, H., Liu, Z., Pasareanu, C.S. (eds.) Theoretical Aspects of Computing - ICTAC 2022 - 19th International Colloquium, Tbilisi, Georgia, September 27-29, 2022, Proceedings. Lecture Notes in Computer Science, vol. 13572, pp. 290–304. Springer (2022). https://doi.org/10.1007/978-3-031-17715-6“ ̇1
[Alk-Smb] Lungu, A., Lucanu, D.: Supporting algorithm analysis with symbolic execution in Alk. In: Ameur, Y.A., Craciun, F. (eds.) Theoretical Aspects of Software Engineering - 16th International Symposium, TASE 2022, Proceedings. Lecture Notes in Computer Science, vol. 13299, pp. 406–423. Springer (2022), https://doi.org/10.1007/978-3-031-10363-6 27