Introduction to Computability Theory
Understand the fundamentals of computability theory, how Turing machines model computation and define decidable versus undecidable problems, and the significance of the Church–Turing thesis.
Summary
Read Summary
Flashcards
Save Flashcards
Quiz
Take Quiz
Quick Practice
Does computability theory study the speed of solutions or the possibility of solving problems?
1 of 19
Summary
Introduction to Computability Theory
What is Computability Theory?
Computability theory asks a fundamental question: What problems can be solved by a computer? More precisely, it studies whether a problem can be solved algorithmically, rather than how fast it can be solved. This distinction is crucial. A problem is "computable" if there exists an algorithm that can solve it—regardless of how long the algorithm takes.
Computability theory is part of theoretical computer science, and it provides the foundation for understanding the limits of what any computer (no matter how powerful) can ever do.
How is this different from algorithms and complexity?
You might already be familiar with studying algorithms and computational complexity. These fields ask questions like:
How can we solve this problem efficiently?
What is the runtime of this algorithm?
Can we do better than a $O(n^2)$ solution?
Computability theory asks a more fundamental question that comes before these questions:
Can this problem be solved at all?
Some problems are simply impossible to solve algorithmically—no program, no matter how clever or how much time it has, can solve them. Computability theory identifies these limits.
Turing Machines: Formalizing Computation
To answer "what can be computed?", we need a precise, formal definition of what "computation" means. Mathematicians and computer scientists created formal models of computation. The most famous (and most important for this course) is the Turing machine, invented by Alan Turing in the 1930s.
What is a Turing machine?
A Turing machine is an abstract device that captures the essential features of any computation. Think of it as a mathematician's idealized computer. It consists of:
An infinite tape divided into cells. Each cell can hold a symbol (usually "0", "1", or a blank space). This tape provides unlimited memory.
A read/write head that moves along the tape, one cell at a time. The head can read the symbol on the current cell and can write a new symbol there.
A finite set of states that represent the "control" of the machine—essentially the program or algorithm being executed.
How does a Turing machine compute?
The machine operates in discrete steps:
Start in an initial state
Read the symbol under the head
Based on the current state and the symbol read, the machine:
Writes a new symbol (or leaves it unchanged)
Moves the head left or right one cell
Transitions to a new state (or stays in the same state)
Repeat until the machine reaches a final state (which signals that computation has finished)
The key insight is that any realistic algorithm can be expressed as a Turing machine. This formalization allows us to reason precisely about what is and isn't computable.
Decidable vs. Undecidable Problems
Now that we have a formal model, we can make a precise distinction between two types of problems.
Defining Decidability
A decision problem is a problem that asks a yes/no question about its input. For example:
"Is this number prime?"
"Does this string contain the letter 'A'?"
"Is this list sorted?"
A problem is decidable if there exists a Turing machine that:
Halts (stops) on every possible input
Always gives the correct "yes" or "no" answer
Equivalently, a problem is decidable if it's solvable by an algorithm.
A problem is undecidable if no Turing machine can solve it—meaning no algorithm exists that correctly answers the question for all possible inputs and always halts.
The Halting Problem: A Classic Undecidable Problem
The most famous undecidable problem is the Halting Problem:
> Given a Turing machine $M$ and an input $w$, does $M$ halt (terminate) when run on input $w$?
Intuitively, this seems like it should be solvable. But Alan Turing proved that it is not. No algorithm can correctly answer this question for all possible machines and inputs.
The proof uses a clever self-referential argument. Suppose, for contradiction, that a machine $H$ exists that solves the halting problem. Then we could construct a new machine that uses $H$ to reason about itself in a contradictory way. This contradiction shows that no such machine $H$ can exist.
Why does this matter?
If the Halting Problem is undecidable, then:
No debugger can automatically detect all infinite loops
No compiler can verify that all programs will terminate
Some problems are fundamentally unsolvable—not because we're not clever enough, but because no solution can possibly exist
This is a limit not just on current computers, but on the concept of computation itself.
Computable Functions
The decidability of problems is closely related to the computability of functions.
A function is computable if a Turing machine can compute it—that is, the machine can produce the correct output for every input and will eventually halt.
There's a direct correspondence: if a function is not computable, then the decision problem associated with it is undecidable. Conversely, decidable problems correspond exactly to computable functions.
The Church–Turing Thesis
At this point, you might ask: "Why should we believe that Turing machines capture all computable functions? How do we know we haven't missed something?"
This is where the Church–Turing thesis comes in.
The Thesis
The Church–Turing thesis states:
> The intuitive notion of "effectively calculable" functions—that is, functions that can be computed by following a step-by-step procedure—coincides exactly with the functions computable by a Turing machine.
In other words, if something can be computed at all, it can be computed by a Turing machine.
Why should we believe this?
The thesis is not a formal mathematical theorem (so we can't prove it in the strict sense). Rather, it's a principle supported by strong evidence:
Equivalent models: Mathematicians have proposed many other formal models of computation—lambda calculus, recursive functions, register machines, and others. Every one of these models turns out to be equivalent in power to Turing machines. They can compute exactly the same set of functions.
Programming languages: Every modern programming language (Python, Java, C++, etc.) can be compiled to Turing machine instructions. Despite their different designs and features, they're all computationally equivalent to Turing machines.
Historical validation: Since the 1930s, no one has found a counterexample—a natural problem that humans could compute but Turing machines cannot.
What the thesis does and doesn't say
Important: The Church–Turing thesis is about what can be computed, not how efficiently it can be computed. A function might be computable but require impractically long runtime or memory.
Also, the thesis applies only to discrete, deterministic computation. It doesn't address quantum computing, physical systems, or other non-standard models (though researchers actively debate these).
<extrainfo>
Historical Context
</extrainfo><extrainfo>
The motivation for computability theory came from foundational questions in mathematics during the 1930s. Mathematicians like Kurt Gödel, Alonzo Church, and Alan Turing were investigating the limits of formal systems and what could be proven or computed. Their work, done independently, led to the creation of Turing machines (Turing's contribution) and lambda calculus (Church's contribution), which turned out to be equivalent. This convergence provided strong evidence for the Church–Turing thesis.
</extrainfo>
Connections to Other Fields
<extrainfo>
Understanding computability theory provides a foundation for studying computational complexity theory, which asks how efficiently problems can be solved. It also influences the design of programming languages—knowing which features are computable helps language designers decide what to include. Additionally, computability theory connects to formal logic, where the undecidability of certain logical problems parallels results about Turing machines.
</extrainfo>
</extrainfo>
Flashcards
Does computability theory study the speed of solutions or the possibility of solving problems?
The possibility of solving problems.
How does the focus of computability theory differ from that of algorithms and complexity?
It focuses on whether a solution exists at all, rather than how fast programs run.
Which two researchers are credited with laying the foundations for modern computability theory in the 1930s?
Alan Turing
Alonzo Church
How is the memory of a Turing machine physically represented in the abstract model?
As an infinite tape divided into cells.
What are the three primary physical/functional components of a Turing machine?
An infinite tape
A head (to read and write symbols)
A finite set of states (finite control)
What are the possible movements the head of a Turing machine can make at each step?
One cell to the left or one cell to the right.
What two factors determine the step-by-step actions of a Turing machine?
The current state and the symbol read on the tape.
What is the relationship between realistic programming languages and Turing machines?
Any realistic programming language can be simulated by a Turing machine.
What was the original historical purpose for designing the Turing machine?
To formalize the notion of algorithmic computation.
Under what conditions is a problem considered decidable?
If a Turing machine exists that halts on every input and correctly answers "yes" or "no".
When is a problem classified as undecidable?
When no Turing machine can halt on every input and provide a correct "yes" or "no" answer.
What specific question does the Halting Problem ask?
Whether a given Turing machine halts on a given input.
What did Alan Turing prove regarding the Halting Problem?
No algorithm can solve the Halting Problem for all possible machines.
What is the practical implication of proving a problem is undecidable?
It is impossible to create a universal algorithm for it.
What defines a function as being computable?
A Turing machine can produce its output for every input and eventually halt.
What do functions that are not computable correspond to in terms of problems?
Undecidable decision problems.
What is the central claim of the Church–Turing thesis?
The intuitive notion of effectively calculable functions coincides with functions computable by a Turing machine.
Is the Church–Turing thesis a formal mathematical theorem or an informal principle?
An informal principle.
Does the Church–Turing thesis address the efficiency of computation or just the possibility of computation?
What can be computed (possibility), not efficiency.
Quiz
Introduction to Computability Theory Quiz Question 1: What central question does computability theory address?
- Which problems can be solved by a computer (correct)
- How quickly a computer can solve problems
- How much memory a computer requires for problems
- The best programming language for implementing algorithms
Introduction to Computability Theory Quiz Question 2: When is a decision problem considered decidable?
- When a Turing machine halts on every input and correctly answers yes or no (correct)
- When a Turing machine may run forever but eventually gives a probability answer
- When any computer program can approximate the answer
- When the problem can be solved by a quantum computer
Introduction to Computability Theory Quiz Question 3: Which characteristic best describes the tape of a Turing machine?
- It is infinite and divided into discrete cells. (correct)
- It is finite but can be reused after the computation ends.
- It stores only binary digits and cannot be altered.
- It moves automatically without the head’s control.
Introduction to Computability Theory Quiz Question 4: What specific decision does the Halting Problem ask about a Turing machine?
- Whether the machine halts on a given input. (correct)
- Whether the machine runs in polynomial time on all inputs.
- Whether the machine computes a total function.
- Whether the machine’s tape uses only a finite portion of memory.
Introduction to Computability Theory Quiz Question 5: According to the Church–Turing thesis, which class of functions captures the notion of effectively calculable functions?
- Functions computable by a Turing machine. (correct)
- Functions solvable in polynomial time on a deterministic machine.
- Functions representable only in lambda calculus.
- Functions that require quantum computation to evaluate.
Introduction to Computability Theory Quiz Question 6: What feature of a Turing machine's tape allows it to simulate any algorithmic process?
- It offers unbounded (infinite) memory (correct)
- It is limited to a fixed size of 1 KB
- It stores only pre‑defined constants
- It can only move in one direction
Introduction to Computability Theory Quiz Question 7: What does establishing that a problem is undecidable demonstrate?
- No algorithm can solve all instances of the problem (correct)
- The problem can be solved with exponential time
- A solution exists but cannot be verified
- The problem is solvable on quantum computers
Introduction to Computability Theory Quiz Question 8: What capability do Turing machines have concerning realistic programming languages?
- They can simulate any realistic programming language (correct)
- They can only simulate low‑level assembly code
- They run faster than any high‑level language
- They cannot represent constructs like recursion
Introduction to Computability Theory Quiz Question 9: How is the Church–Turing thesis best described?
- As an informal principle, not a formal theorem (correct)
- As a rigorously proved mathematical statement
- As a specification for computer hardware design
- As a standard for programming language syntax
Introduction to Computability Theory Quiz Question 10: Why was the Turing machine originally introduced?
- To formalize the concept of algorithmic computation (correct)
- To model the physical architecture of early computers
- To prove that all problems are solvable
- To optimize hardware circuit design
Introduction to Computability Theory Quiz Question 11: What class of decision problems corresponds to functions that are not computable?
- Undecidable decision problems (correct)
- Polynomial‑time solvable problems
- NP‑complete problems
- Tractable problems
Introduction to Computability Theory Quiz Question 12: Which of the following computational models is known to have the same computational power as a Turing machine?
- Lambda calculus (correct)
- Finite automata
- Context‑free grammars
- Regular expressions
Introduction to Computability Theory Quiz Question 13: Which two researchers are credited with laying the foundations of modern computability theory?
- Alan Turing and Alonzo Church (correct)
- John von Neumann and Claude Shannon
- Edsger Dijkstra and Donald Knuth
- Peter Naur and Grace Hopper
Introduction to Computability Theory Quiz Question 14: Which of the following is a classic example of an undecidable problem?
- The Halting Problem (correct)
- Sorting a list of numbers
- Finding the shortest path in a graph
- Testing primality of an integer
Introduction to Computability Theory Quiz Question 15: According to the Church–Turing thesis, which computational model serves as the universal benchmark for what computers can compute?
- Turing machines (correct)
- Finite automata
- Pushdown automata
- Neural networks
Introduction to Computability Theory Quiz Question 16: Why is knowledge of decidability important before studying computational complexity?
- It identifies which problems are solvable at all (correct)
- It provides exact runtime formulas for every algorithm
- It determines the memory layout of data structures
- It guarantees polynomial‑time solutions for all problems
Introduction to Computability Theory Quiz Question 17: How does knowledge of computable functions influence programming language design?
- It guides which language features can be safely implemented (correct)
- It determines the color scheme of development environments
- It sets the default file extensions for source code
- It dictates the hardware architecture needed to run programs
Introduction to Computability Theory Quiz Question 18: Which field of theoretical computer science primarily investigates whether a problem has any algorithmic solution at all?
- Computability theory (correct)
- Algorithms and complexity theory
- Programming language theory
- Computer architecture
What central question does computability theory address?
1 of 18
Key Concepts
Foundations of Computability
Computability theory
Turing machine
Decidable problem
Undecidable problem
Halting problem
Church–Turing thesis
Computational Models
Lambda calculus
Recursive function
Complexity Analysis
Computational complexity
Definitions
Computability theory
The branch of theoretical computer science that studies which problems can be solved by algorithms, regardless of resource constraints.
Turing machine
An abstract computational model with an infinite tape and a finite set of states that defines algorithmic processes.
Decidable problem
A decision problem for which a Turing machine exists that halts on every input and correctly answers “yes” or “no”.
Undecidable problem
A decision problem for which no Turing machine can halt on all inputs and provide a correct binary answer.
Halting problem
The classic undecidable problem of determining whether an arbitrary Turing machine will eventually stop on a given input.
Church–Turing thesis
The informal assertion that any effectively calculable function can be computed by a Turing machine.
Lambda calculus
A formal system of function abstraction and application that is computationally equivalent to Turing machines.
Recursive function
A class of functions defined using basic initial functions and closed under composition, primitive recursion, and minimization, equivalent in power to Turing-computable functions.
Computational complexity
The study of the resources (time, space) required to solve computational problems, building on concepts of decidability.