# Algorithms

 Credits 6 Lecturers Michael Kapralov and Ola Svensson Schedule Lectures: Mondays 14-16 in CE6 and Fridays 13-15 in CO1. Exercises: Mondays 16-18 with quiz in GCA 331 (A to Cor), GCB330 (Cou to Je), GCB331 (Jo to N), GCD0386 (O - Sai), GRA330 (Sal - Z). On Mondays without a quiz we only use GCA331, GCB330, and GCB331 assuming there is enough room.

In this course you will get familiar with the theory and practice of basic concepts and techniques in algorithms. The course covers mathematical induction, techniques for analyzing algorithms, elementary data structures, the design of algorithms by induction, Sorting and searching, Merge sort, quicksort, heapsort, binary search, graph algorithms and data structures, graph traversals, shortest paths, spanning trees, matching, network flows, and elements of the theory of NP-completeness.

This is a course for second year students of both the systèmes de communication and informatique sections. The lectures will be in English, but you are free to choose the final exam in either of English or French. The exercises will be mainly in English but some may be in French.

For more details see the official couse book here.

## Important dates

• Mid-term exam: Friday 11 November
• Quizzes: The following Mondays: 3 Oct, 17 Oct, 31 Oct, 28 Nov, 12 Dec, 5 Dec, 19 Dec
• Final Exam: date to be decided

## Calendar

Here, you can see the times of office hours, lectures, etc..

## Week-by-week material

This list is very preliminary.
• September 23, September 26: Basic concepts and analysis + Insertion Sort. Sections 2.1, 2.2 + Review of Chapter 1,3 and Appendix A
• September 30, October 3: Divide-and-Conquer, Merge-sort, solving recurrences, maximum-sub-array problem. Sections 2.3, 4.1, 4.3-4.5
• October 7, 10: Strassen's algorithm for matrix multiplication, solving recurrences. Sections 4.2, 4.4, 4.5 + Review of Section 4.3
• October 14, 17: Heaps and Heapsort. Chapter 6
• October 21, 24: Datastructures: queues, linked lists, binary search trees. Sections 10.1, 10.2, 12.1, 12.2, 12.3
• October 28, 31: Dynamic programming: rod cutting matrix chain multiplication. Sections 15.1, 15.2
• November 7, November 11: More Dynamic Programming: formalization, longest common subsequence, optimal binary search trees. Sections 15.3, 15.4, 15.5
• November 14, 18: Elementary graph algorithms: BFS, DFS, Sections 22.1, 22.2, 22.3 + Review of Appendix B
• November 21, 25: Topological sort, flows. Sections 22.4, 26.1, beginning of 26.2
• November 28, December 2: Flows continued and bipartite matching. Sections 26.2 continued, 26.3
• December 5, 9: Datastructure disjoint sets + minimum spanning trees. Sections 21.1, 21.2, 21.3, Chapter 23
• December 12, 16: Bellman-Ford, probabilistic analysis. Sections 24.1, 5.1, 5.2
• December 19, 23: Hash tables, Sections 11.1, 11.2, 8.1, 8.2 + Discussion of Quicksort

The textbook for the course is:
• Thomas Cormen, Charles Leiserson, Ronald Rivest, Clifford Stein: Introduction to algorithms, Third Edition, MIT Press, 2009.

## Exercises

For the exercise sessions during the quiz, seat in the exercise rooms according to the beginning of your last name as follows:

A to Cor: GCA331

Cou to Je: GCB330

Jo to N: GCB331

O to Sai: GCD0386

Sal to Z: GRA330

On Mondays without a quiz, we only use GCA331, GCB330, and GCB331 assuming that there is sufficient room.

## Handouts

The handouts (exercises and their solutions) as well as slides will be uploaded on the course moodle: http://moodle.epfl.ch/

## Mid-term and Final Exam

You are allowed to use a hand written A4-page on which you can write anything on both sides. (You are not allowed to look at it using a magnifying glass!)

The final grade will be the maximum between (i) the score obtained at the final and (ii) 10% quizzes + 30% mid-term + 60% final.