**Winter semester 2021/22**

**Petr Kolman **

The weekly **lecture** takes place every **Wednesday** in Lecture room S9 (Mala Strana) from 2 - 3:30 pm.

**The tutorials**
take place **once in two weeks** on Monday from 3:40 - 5:10 pm and are led by Matej Lieskovský.

This course covers techniques for design and analysis of algorithms, demonstrated on concrete combinatorial problems. For many optimization problems it is impossible (or NP-hard) to design algorithms that finds an optimal solution fast. In such a case we study approximation algorithms that work faster, at the cost that we find a good solution, not necessarily an optimal one. Often we use randomness in design of (approximation and other) algorithms, which allows to solve problems more efficiently or even to solve problems that are otherwise intractable. Recommended for the 3rd year.

**September 29, 2021**- Introduction.
- Randomized protocol for computing the average salary.
- Optimization and NP-optimization problems.
- Approximation ratio [WS 1.1, V1].

**October 6**- TSP - limits on approximation in the general setting.
- Metric TSP - 2-approximation, Christofides 1.5-approximation [WS 2.4, V 3.2].
- Discrete probability - review of elementary definitions and properties (see notes from the last year or more detailed Notes on probability by J. Matousek).

**October 13**- Randomized Quicksort [MU 2.5, MR 1, KT 13.5].
- Contention resolution in a distributed system - randomized protocol [KT 13.1].
- Randomized global minimum cut algorithm [KT 13.2].

**October 20**- Randomized global minimum cut algorithm [KT 13.2].
- Scheduling on identical machines - local search [WS 2.3].

**October 27**- Greedy algorithm for scheduling on identical machines (list scheduling, longest processing time first), online [WS 2.3].

**November 3**- Greedy algorithms for bin packing (first fit, best fit, any fit) [WS 3.3, V 9].
- Greedy algorithm for edge disjoint paths in graphs [KT 11.5].
- Greedy algorithm for paths in graphs with capacities - part I [KT 11.5].

**November 10**- Greedy algorithm for paths in graphs with capacities - part II [KT 11.5].
- Randomized algorithms for satisfiability [WS 5.1-5.5, V 16].

- Simple 1/2-approximation algorithm for MAX SAT (RAND SAT ALG), 7/8-approximation algorithm for MAX-E3-SAT.
- Biased randomized approximation algorithm.
- Approximation based on linear programming relaxation.

**November 17**- No lecture - public holiday

**November 24**- Choosing the better of two solutions - 3/4 approximation for MAX SAT [WS 5.5].
- Derandomization of RAND SAT ALG for MAX SAT by the method of conditional expectation [WS 5.3].
- Algorithms for vertex and set cover [WS 1.2-1.6, 7.1, V 13-14].

- The greedy algorithm and its analysis using duality of linear programming.

**December 1**- Algorithms for vertex and set cover [WS 1.2-1.6, 7.1, V 13-14].

- The primal algorithm, the dual algorithm, the primal-dual algorithm.

- Parallel algorithm for maximum independent set problem [MR 12.3, also nice notes by Eric Vigoda at http://www.cc.gatech.edu/~vigoda/7530-Spring10/MIS.pdf].

- Algorithms for vertex and set cover [WS 1.2-1.6, 7.1, V 13-14].
**December 8**- Parallel algorithm for maximum independent set problem, contd. [MR 12.3, the notes by E. Vigoda].

**December 15**- Parallel algorithm for maximum independent set problem - pairwise independence and derandomization. [MR 12.3, the notes by E. Vigoda].
- The dictionary problem and universal hashing [MR 8.4, MU 13.3].
- 2-universal hashing and dynamic dictionary with expected constant time per operation.

**December 22**- Perfect hashing and static dictionary with constant time per lookup in the worst case.
- Randomized testing of matrix multiplication in linear time [MR 7.1, MU 1.3].
- Randomized testing of polynomial identities [MR 7.1, MU 1.3].

**January 5, 2022**- Testing the existance of perfect matchings in bipartite and general graphs [MR 7.3, 12.4].
- Parallel randomized algorithm for a perfect matching [MR 7.3, 12.4].

Notes and recordings from edition of the course in 2020/21.

There is no required textbook but the material presented in the course is covered by several good books.

[WS] D. P. Williamson, D. B. Shmoys: The Design of Approximation Algorithms, Cambridge University Press, 2011.

[MR] R. Motwani, P. Raghavan: Randomized algorithms, Cambridge University Press, 1995.

[MU] M. Mitzenmacher, E. Upfal: Probability and Computing: Randomized Algorithms and Probabilistic Analysis, Cambridge University Press, 2005.

[V] V. V. Vazirani: Approximation Algorithms, Springer, 2001.

[KT] J. Kleinberg, E. Tardos: Algorithm Design, Pearson, 2006.

For introduction to Linear Programming whose elementary knowledge is expected in this course, we recommend the first three chapters of the textbook Understanding and Using Linear Programming by J. Matousek and B. Gärtner (a preliminary Czech version is available as Lineární programování a lineární algebra pro informatiky).- Approximation Algorithms by Chandra Chekuri
- Approximation Algorithms and Approximability by Mohammad R. Salavatipour
- Approximation Algorithms by Anupam Gupta and R. Ravi