Mikołaj Bojańczyk

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

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) {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.

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.

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).

- 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

- 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 and NC

Questions for the oral exam:

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

- parity is not in AC

Questions for the oral exam:

- (Only if you want grade 5) Prove that parity is not in AC

- 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

- 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

- 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

- 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.

- 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)

- Simon’s algorithm

There will be several homework assignments, including programming assignments.

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.