Silicon. Chips. Diodes. Logic gates. Transistors. Clock cycles. Machine instructions.
But do we need to know any of this to design algorithms?
No. We just need two things:
Alan Turing (1936) gave us the simplest possible model of computation:
This is the formal definition of an algorithm. Everything you can do on any computer can be expressed as a Turing Machine.
Church-Turing Thesis
Any algorithm or computational process that can be performed by a physical machine or human can be simulated by a Turing Machine.
Try the interactive Turing Machine from Google’s 100th birthday doodle — great way to see a TM in action.
No. There are inherently hard problems.
Therefore, most problems cannot be solved within any fixed polynomial time bound.
Complexity Theory is the study of this question:
To classify problems formally, we need a clean representation.
Any problem instance (a graph, a matrix, a formula) can be encoded as a binary string in \Sigma^* = \{0, 1\}^*.
Instead of “Find the shortest path” (optimization), ask “Is there a path of length \le k?” (decision). Binary answer: yes or no. Maps directly to a formal language.
L \subseteq \Sigma^* = the set of all binary strings representing ‘yes’ instances.
Solving a problem = deciding membership: given x, is x \in L?
Some problems feel harder than others. How do we prove it?
A polynomial-time function f such that:
x \in A \iff f(x) \in B
Reductions let us compare problems. What about the hardest problems?
A problem B is NP-hard if every problem in NP can be reduced to it:
\forall A \in \text{NP}: A \le_P B
If we could solve one NP-hard problem in polynomial time, we could solve every problem in NP — meaning \text{P} = \text{NP}.
In the next lecture, we will: 1. See concrete NP-complete problems — SAT, CLIQUE, Vertex Cover. 2. Work through explicit reductions step by step. 3. Understand the landscape of complexity classes.
The reduction idea you just learned is the key tool for all of this.
CS F364: Design & Analysis of AlgorithmsTulasimohan Molli