Theory of Computation by Jim Hefferon, along with its companion answers to exercises, is a text for a one semester first undergraduate Computer Science theory course. It is Free. Use it as the main book, as a supplement, or for independent study.

Table of Contents

This shows the chapters and sections. For more, see the description or the text.

  • Mechanical Computation
  1. Turing machines
  2. Church's Thesis
  3. Recursion
  4. General Recursion
  5. Topics: Turing machine simulator, Hardware, Game of Life, Ackermann's function is not primitive recursive, LOOP programs
  • Background
  1. Infinity
  2. Cantor's correspondence
  3. Diagonalization
  4. Universality
  5. Halting problem
  6. Rice's theorem
  7. Computably enumerable sets
  8. Oracles
  9. Fixed point theorem
  10. Topics: Hilbert's hotel, Halting problem in wider culture, Self reproduction, Busy beaver
  • Languages
  1. Languages
  2. Grammars
  3. Graphs
  4. Topics: BNF, Tree traversal
  • Automata
  1. Finite state machines
  2. Nondeterminism
  3. Regular expressions
  4. Regular languages
  5. Non-regular languages
  6. Pushdown machines
  7. Topics: Regular expressions in the wild, Myhill-Nerode theorem, Minimization
  • Computational complexity
  1. Big O
  2. Problem miscellany
  3. Problems, algorithms, and programs
  4. P
  5. NP
  6. Polytime reduction
  7. NP completeness
  8. Other classes
  9. Topic: RSA encryption, Good-enoughness, SAT solvers, Bounded Halting problem
  • Back matter
  1. Review of strings
  2. Review of functions
  3. Review of propositional logic
  4. Supplemental notes
  5. Bibliography
  6. Index