Mikołaj Bojańczyk

Złożoność Obliczeniowa / Computational Complexity 2023/2024


A course on computational complexity for 4th year students (1st year of MSc programme). Previous iterations of this course: 2022/2023 and 2020/2021

Rules

Your grade will consist of:

  • 10% quizzes. Lectures will have a quizzes on google classroom with several yes/no questions to check if you are paying attention.
  • 40% homeworks. There will be 4 homeworks, some programming and some theory.
  • 50% oral exam. At the end, there will be an oral exam.

Notice that there is no written exam, midterm or final. That is why the homeworks are bigger than usual. The exact point thresholds for the grades will appear later, but I promise that 50% (or less) will give you a passing grade (dostateczny).

The examiner for your oral will be your tutorial instructor (ćwiczeniowiec) \in {Czerwiński, Parys, Pilipczuk, Pilipczuk} You can negotiate the date of the oral exam with your, in justified cases it is possible to have the oral exam at an earlier date.

How much effort is expected?

I expect that you, as a smart student, will:

1. Attend the lecture each week
2. Take 10-20 minutes to solve the quiz
3. Participate in the exercise session
4. Take, on average, 7 hours to solve each of the 4 homework assignments
5. Take around 15-20 hours to prepare for the oral exam (e.g. you rewatch every lecture and think about it a bit)
The difficulties of the quizzes, homeworks, and the oral exams will be designed with these criteria in mind. I will send surveys to check if these criteria are met. If you believe that your effort deviates significantly from these criteria, let me know.
Quizzes. I expect that you do the quiz on your own, without discussing the answers with colleagues. For this reason, you do not need to obsess over perfect answers – at the end of the semester you will still get a full score for the quiz if you had 80% answers right. The purpose of the quiz is to see if you understand the lecture well.
Homework. There will be around 4 homeworks, some programming, some not. It is ok if you discuss the homework with a small number of colleagues, but you should make a serious effort to solve it on your own, and you should definitely write your own answer alone.
Oral exam. For each of the lectures, I will publish corresponding exam questions. The questions at the oral exam will be selected from these. Some questions will be marked as “5” questions, which will be needed only if you want to get the top grade “5”.

 

Lectures

I will try to have updated slides together with sound recordings, with links below. These should be useful for revising and in case you miss a lecture. I do recommend that you also attend the actual live lectures. The live lectures will not be identical to the recorded slides, I might end up using the blackboard and not the slides altogether.

The lectures use a slide system that I am developing, so please send me bug reports! These lectures are roughly once per week, but some lectures are longer so there is no exact correspondence. You can find old slides in the old lectures 2022/2023 (without sound) and 2020/2021 (with sound).

Turing machines (October 3)

  • Definition of Turing machines
  • Decidability and semi-decidability
  • Undecidability of the halting problem

Questions for the oral exam:

  • prove that the halting problem is undecidable

Space and time (October 10)

  • The basic complexity classes: NL ⊆ P ⊆ NP ⊆ PSPACE ⊆ EXPTIME,
  • separation of P and EXPTIME
  • PSPACE = NPSPACE (Savitch)
  • machines in finite space that always halt (Sipser Theorem)
  • NL = coNL (Immerman and Szelepcsenyi Theorem)

Questions for the oral exam:

  • Prove that P < EXPTIME
  • Prove that PSPACE = NPSPACE
  • Prove the Sipser Theorem
  • Prove the Immerman and Szelepcsenyi Theorem

Reductions and complete problems (October 11, 17)

  • Turing and Karp reductions
  • an NP-complete problem

Questions for the oral exam:

  • Explain the difference between Turing and Karp reductions
  • Prove that the NP halting problem is NP-complete

 Complete problems for important classes (October 17, 23, 30)

  • Sat as an NP-complete problem
  • QBF as a PSPACE-complete problem
  • alternating reachability as P-complete problem
  • the Baker-Gill-Solovay Theorem.

Questions for the oral exam:

  • Prove that Sat is NP-complete and that QBF is PSPACE-complete
  • Prove that reachability is NL-complete, and alternating reachability is P-complete

Two diagonalisation theorems about P = NP (October 30, November 7)

  • Ladner’s Theorem
  • the Baker-Gill-Solovay Theorem.

Questions for the oral exam:

  • Prove Ladner’s Theorem
  • Prove the Baker-Gill-Solovay Theorem

Introduction to circuits (November 7) 

  • Circuits and their “parallel algorithm” intuition
  • Circuit descriptions of P and P/p0ly
  • AC^n and NC^n

Questions for the oral exam:

  • Define the class P/Poly and show that it is equal to polynomial size circuits

Parity not in AC0 

  • parity is not in AC^0

Questions for the oral exam:

  • (Only if you want grade 5) Prove that parity is not in AC^0

Randomisation 

  • the class RP ⊆ BPP ⊆ PP
  • examples of RP algorithms, including polynomial identity testing and perfect matchings
  • PP contains NP

Questions for the oral exam:

  • Define the classes RP, BPP and PP
  • Give RP algorithms for: evaluating straight line programs and polynomial identity testing

Derandomisation

  • two techniques for derandomisation illustrated on max cut
  • Adleman’s Theorem on BPP ⊆ P/Poly

Questions for the oral exam:

  • Explain the two derandomised algorithms for max cut
  • Prove Adleman’s Theorem

Fine-grained complexity

  • SETH ⟹ Orthogonal vectors conjecture
  • Orthogonal vectors conjecture  ⟹ NFA evaluation needs quadratic algorithms

Questions for the oral exam:

  • Prove: SETH ⟹ Orthogonal vectors conjecture
  • Prove: Orthogonal vectors conjecture  ⟹ NFA evaluation needs quadratic algorithms

Parametrized complexity

  • An algorithm for vertex cover that is linear when the size of the vertex cover is fixed
  • The class FPT and FPT-reductions
  • An FPT algorithm for 3-colourability on bounded treewidth

Questions for the oral exam:

  • Define the class FPT and show that vertex cover is in it
  • Show FPT reductions, both ways, between the k-clique problem and Turing machines with accepting computations of length k.

The remaining lectures are not part of the oral exam.

Streaming

  • An algorithm for ε-heavy hitters
  • An algorithm for unique names

Lecture 10. Quantum computation

  • BPP via probabilistic circuits
  • quantum circuits
  • the class BQP (bounded error quantum polynomial time)

Lecture 11. Simon’s algorithm

  • Simon’s algorithm

 

Homework

There will be several homework assignments, including programming assignments.

 

Homework 1

Your goal will be to write a python program,  which transforms a two-tape machine into an equivalent one-tape machine. The details are on the classroom page. You play with Turing machines using something called “jupyter notebook”. Once you have installed jupyter, download the file turingPython.ipynb,  and then type “jupyter lab turingPython.ipynb” into the command line from the directory containing the downloaded file.