PYQ Analysis & Exam Preparation — Module 4
A strategic analysis of 8 exam questions spanning 2022–2024. Module 4 is the most theoretical module, focusing entirely on computational complexity classes and polynomial-time reductions.
Learning Goals
- Identify the guaranteed theory question: Defining P, NP, NP-Complete, and NP-Hard with their relationship diagram.
- Understand Cook's Theorem and its foundational importance in complexity theory.
- Master the logic of polynomial-time reductions and practice the 3-SAT to Vertex Cover reduction.
The Exam Blueprint: Module 4 PYQ Deep Analysis (2022–2024)
An analysis of 8 exam questions spanning 2022 to 2024 reveals that Module 4 is short but incredibly predictable. It has the tightest scope of any module. The question asking to define P, NP, NP-Complete, and NP-Hard has appeared in every single paper.
Complete PYQ Table (8 Questions)
| Year | Q# | Marks | Topic | Type |
|---|---|---|---|---|
| 2022 | Q1e | 2 | All NP-complete problems are NP-hard | MCQ |
| 2022 | Q1i | 2 | Polynomial-time reduction properties | MCQ |
| 2023 | Q1j | 2 | P is a subset of NP | MCQ |
| 2024 | Q1i | 2 | Primary technique to prove NP-complete | MCQ |
| 2022 | Q7b | 7 | Define P, NP, NP-complete, NP-hard + Relation | Theory |
| 2023 | Q7b | 7 | Define P, NP, NP-complete, NP-hard + Relation | Theory |
| 2024 | Q8a | 7 | Complexity classes + Cook's Theorem | Theory |
| 2024 | Q8b | 7 | Polynomial-time reduction + 3-SAT to Vertex Cover | Theory |
Total marks tracked: 38 marks across 3 years.
Topic Heat Map
| Topic | 2022 | 2023 | 2024 | Total Marks |
|---|---|---|---|---|
| Complexity Classes Definitions & Relations | 7M ✅ | 7M ✅ | 7M ✅ | 21M |
| Cook's Theorem & Reductions | 2M ✅ | — | 14M ✅ | 16M |
| MCQs | 4M ✅ | 2M ✅ | 2M ✅ | 8M |
(Note: Some topics overlap with MCQs).
The 2 Guaranteed Question Types
1. 🔴 The "Big Four" Complexity Classes (7M) Appeared in ALL 3 years. You must formally define P, NP, NP-Complete, and NP-Hard, and draw the standard Euler diagram showing their assumed relationship (assuming ).
2. 🟠 Reductions and Cook's Theorem (7M) Started appearing heavily in 2024. You must be able to state Cook's Theorem ("SAT is NP-Complete") and explain the mechanism of polynomial-time reductions.
The Critical Proofs & Reductions
Concept 1: Cook's Theorem
Statement: The Boolean Satisfiability Problem (SAT) is NP-Complete.
Why is it foundational? Before Cook's Theorem (proven by Stephen Cook in 1971), to prove a problem was NP-Complete, one would theoretically have to prove that every single problem in NP could be reduced to it. Cook proved that any non-deterministic Turing machine computation can be encoded as a Boolean formula. By proving that SAT is NP-Complete, Cook provided the first NP-Complete problem. From then on, to prove a new problem is NP-Complete, we only need to reduce SAT (or another known NP-Complete problem) to . It kickstarted the entire field of computational complexity.
Concept 2: The Logic of Polynomial-Time Reductions
What is it? A polynomial-time reduction from Problem A to Problem B (written as ) is an algorithm that transforms any instance of A into an instance of B in polynomial time, such that the answer to A is "YES" if and only if the answer to B is "YES".
How is it used to prove NP-Completeness? To prove that a new problem is NP-Complete:
- Prove that (a given solution can be verified in polynomial time).
- Choose a known NP-Complete problem .
- Prove that (reduce to in polynomial time). Because is NP-Complete, all problems in NP reduce to . If reduces to , by transitivity, all problems in NP reduce to , making NP-Hard. Since and is NP-Hard, is NP-Complete.
Trace: Reducing 3-SAT to Vertex Cover
To reduce a 3-SAT formula to a Vertex Cover graph :
- Variables: For each variable , create two connected vertices: and . (This forces the vertex cover to pick exactly one truth value).
- Clauses: For each clause (e.g., ), create a triangle of 3 connected vertices. (This forces the vertex cover to pick at least two of these vertices).
- Connections: Connect the vertices in the clause triangles to their corresponding variable vertices in the variable gadgets.
- Conclusion: is satisfiable if and only if has a vertex cover of size (where is the number of variables and is the number of clauses). Since building this graph takes polynomial time, 3-SAT Vertex Cover.
Knowledge Check
Which one is true of the following?
High-Yield Subjective Bank: Structure Your Answers
####Define P, NP, NP-Complete, and NP-Hard. What is the relation between them? (7 Marks)**
Answer structure:
-
P Class (Polynomial Time) (1.5M):
- The set of decision problems that can be solved by a deterministic Turing machine in polynomial time .
- These are considered "tractable" or easy problems.
- Examples: Sorting, Shortest Path, MST.
-
NP Class (Non-deterministic Polynomial Time) (1.5M):
- The set of decision problems whose proposed solutions can be verified by a deterministic Turing machine in polynomial time.
- Alternatively, problems that can be solved by a non-deterministic Turing machine in polynomial time.
- Note: P is a subset of NP.
-
NP-Hard Class (1.5M):
- A problem is NP-Hard if every problem can be reduced to in polynomial time ().
- These are at least as hard as the hardest problems in NP. They do not have to be in NP themselves (e.g., they might not be decision problems).
- Example: Halting Problem, TSP Optimization.
-
NP-Complete Class (NPC) (1.5M):
- A problem is NP-Complete if it satisfies two conditions:
- It is in NP.
- It is NP-Hard.
- These are the hardest problems inside NP. If any NP-Complete problem is solved in polynomial time, then .
- Examples: 3-SAT, Vertex Cover, Graph Coloring.
- A problem is NP-Complete if it satisfies two conditions:
-
Relationship (Euler Diagram) (1M):
- Draw the standard diagram showing the relationship assuming :
- A large circle for NP.
- Inside NP, a smaller circle for P at the bottom.
- Another circle for NP-Complete at the top of NP, intersecting the boundary.
- A region outside NP extending upwards representing NP-Hard, where the intersection of NP and NP-Hard forms the NP-Complete region.
- Draw the standard diagram showing the relationship assuming :