Skip to content

Exponential Time O(2^n) — Specification and References

Table of Contents


Formal Definition

Big-O Notation for Exponential Functions

A function f(n) is O(2^n) if there exist positive constants c and n0 such that:

f(n) <= c * 2^n    for all n >= n0

More generally, exponential time refers to functions in O(c^n) for any constant c > 1. The class EXPTIME encompasses all functions bounded by 2^(p(n)) for some polynomial p(n).

Formal Hierarchy

O(1) < O(log n) < O(n) < O(n log n) < O(n^2) < O(n^k) < O(2^n) < O(n!) < O(n^n) < O(2^(2^n))

For any polynomial p(n) and any constant c > 1: O(p(n)) is strictly contained in O(c^n).

Recurrence Relations Leading to O(2^n)

Recurrence Solution Example
T(n) = 2T(n-1) + O(1) O(2^n) Tower of Hanoi
T(n) = T(n-1) + T(n-2) + O(1) O(phi^n) ~ O(1.618^n) Fibonacci
T(n) = 2T(n-1) + O(n) O(n * 2^n) Subset enumeration with processing
T(n) = 3T(n-1) + O(1) O(3^n) Ternary branching
T(n) = T(n-1) + O(2^n) O(2^n) Accumulating exponential work

Mathematical Foundation

Exponential Function Properties

2^(a+b) = 2^a * 2^b
2^(a*b) = (2^a)^b
2^n * 2^n = 2^(2n) = 4^n
log2(2^n) = n
2^(log2 n) = n

Stirling's Approximation (relating n! to exponentials)

n! ~ sqrt(2 * pi * n) * (n/e)^n

This shows that n! grows faster than any exponential c^n but slower than n^n.

The Golden Ratio in Fibonacci Complexity

The exact number of nodes in the Fibonacci recursion tree is:

T(n) = (phi^n - psi^n) / sqrt(5)

where phi = (1 + sqrt(5)) / 2 ~ 1.618
      psi = (1 - sqrt(5)) / 2 ~ -0.618

Since |psi| < 1, the psi^n term vanishes, giving T(n) ~ phi^n / sqrt(5) = O(1.618^n).


Complexity Class Definitions

P (Polynomial Time)

P = Union_{k >= 0} DTIME(n^k)

Decision problems solvable by a deterministic Turing machine in polynomial time.

Reference: Cobham, A. (1965). "The intrinsic computational difficulty of functions."

NP (Nondeterministic Polynomial Time)

NP = Union_{k >= 0} NTIME(n^k)

Decision problems where a "yes" answer can be verified in polynomial time.

Reference: Cook, S. (1971). "The complexity of theorem-proving procedures." STOC.

EXPTIME

EXPTIME = Union_{k >= 0} DTIME(2^(n^k))

Decision problems solvable by a deterministic Turing machine in exponential time.

Key result: P != EXPTIME (by the time hierarchy theorem).

Reference: Hartmanis, J., & Stearns, R. E. (1965). "On the computational complexity of algorithms." Transactions of the AMS.

NEXPTIME

NEXPTIME = Union_{k >= 0} NTIME(2^(n^k))

Nondeterministic exponential time.

Key result: NP != NEXPTIME.

EXP (alternative notation)

Some texts use EXP to denote EXPTIME. They are the same class.


Key Theorems and Results

Time Hierarchy Theorem

Statement: For any time-constructible function f(n), there exists a decision problem that can be solved in O(f(n)) time but not in O(f(n) / log(f(n))) time.

Consequence: DTIME(2^n) strictly contains DTIME(n^k) for all k. This proves P != EXPTIME.

Reference: Hartmanis, J., & Stearns, R. E. (1965). "On the computational complexity of algorithms."

Cook-Levin Theorem

Statement: SAT (Boolean Satisfiability) is NP-complete.

Consequence: If SAT can be solved in polynomial time, then P = NP. If not, every NP-complete problem requires super-polynomial time.

Reference: Cook, S. (1971). "The complexity of theorem-proving procedures." STOC. Also independently Levin, L. (1973).

Exponential Time Hypothesis (ETH)

Statement: There exists a constant delta > 0 such that 3-SAT on n variables cannot be solved in time O(2^(delta * n)).

Reference: Impagliazzo, R., & Paturi, R. (2001). "On the Complexity of k-SAT." JCSS.

Strong Exponential Time Hypothesis (SETH)

Statement: For every epsilon > 0, there exists k such that k-SAT cannot be solved in O(2^((1-epsilon)*n)) time.

Reference: Impagliazzo, R., & Paturi, R. (2001). "On the Complexity of k-SAT." JCSS.

Karp's 21 NP-Complete Problems

Statement: Karp identified 21 problems that are NP-complete, establishing the foundation of NP-completeness theory.

Reference: Karp, R. M. (1972). "Reducibility among combinatorial problems." Complexity of Computer Computations, Plenum Press.

Held-Karp Algorithm

Statement: The Traveling Salesman Problem can be solved in O(2^n * n^2) time and O(2^n * n) space using dynamic programming over subsets.

Reference: Held, M., & Karp, R. M. (1962). "A Dynamic Programming Approach to Sequencing Problems." SIAM Journal.


Canonical Problems

NP-Complete Problems (believed to require exponential time)

Problem Best Known Exact Algorithm Reference
3-SAT O(1.306^n) randomized Scheder & Tao (2023)
Vertex Cover O(1.2738^k * n) FPT Chen, Kanj, Xia (2010)
Graph Coloring O(2^n * n) Bjorklund, Husfeldt, Koivisto (2009)
Hamiltonian Cycle O(2^n * n^2) Held-Karp (1962)
Subset Sum O(2^(n/2) * n) MITM Horowitz & Sahni (1974)
Knapsack O(n * W) pseudo-poly Bellman (1957)
TSP O(2^n * n^2) Held-Karp (1962)
Max Clique O(1.1888^n) Robson (2001)
Set Cover O(2^n * n) exact DP
Partition O(n * S) pseudo-poly DP

EXPTIME-Complete Problems

Problem Description Reference
Generalized Chess Forced win on n x n board Fraenkel & Lichtenstein (1981)
Generalized Checkers Forced win on n x n board Robson (1984)
Generalized Go Winner on n x n board Lichtenstein & Sipser (1980)

Algorithm References

DPLL (Davis-Putnam-Logemann-Loveland)

The foundational backtracking algorithm for SAT solving.

Reference: Davis, M., Logemann, G., & Loveland, D. (1962). "A machine program for theorem-proving." CACM.

CDCL (Conflict-Driven Clause Learning)

Modern SAT solving algorithm extending DPLL with clause learning and non-chronological backtracking.

Reference: Marques-Silva, J. P., & Sakallah, K. A. (1999). "GRASP: A search algorithm for propositional satisfiability." IEEE TC.

Meet-in-the-Middle

Technique for splitting exponential search into two halves.

Reference: Horowitz, E., & Sahni, S. (1974). "Computing partitions with applications to the knapsack problem." JACM.

Branch and Bound

Framework for solving combinatorial optimization problems with pruning.

Reference: Land, A. H., & Doig, A. G. (1960). "An automatic method of solving discrete programming problems." Econometrica.

Inclusion-Exclusion Principle for Exact Counting

Used to count solutions in O(2^n * poly(n)) time for problems like graph coloring.

Reference: Bjorklund, A., Husfeldt, T., & Koivisto, M. (2009). "Set Partitioning via Inclusion-Exclusion." SIAM Journal on Computing.


Textbook References

Primary Textbooks

  1. Cormen, T. H., Leiserson, C. E., Rivest, R. L., & Stein, C. (2022). Introduction to Algorithms (4th ed.). MIT Press.
  2. Chapter 15: Dynamic Programming (reducing exponential to polynomial)
  3. Chapter 34: NP-Completeness
  4. Chapter 35: Approximation Algorithms

  5. Sipser, M. (2012). Introduction to the Theory of Computation (3rd ed.). Cengage Learning.

  6. Chapter 7: Time Complexity (P, NP, EXPTIME)
  7. Chapter 9: Intractability

  8. Arora, S., & Barak, B. (2009). Computational Complexity: A Modern Approach. Cambridge University Press.

  9. Chapter 3: NP and NP-completeness
  10. Chapter 18: Exponential time complexity

  11. Kleinberg, J., & Tardos, E. (2005). Algorithm Design. Pearson.

  12. Chapter 6: Dynamic Programming
  13. Chapter 8: NP and Computational Intractability

  14. Downey, R. G., & Fellows, M. R. (2013). Fundamentals of Parameterized Complexity. Springer.

  15. Comprehensive treatment of FPT and the W-hierarchy.

Supplementary References

  1. Fomin, F. V., & Kratsch, D. (2010). Exact Exponential Algorithms. Springer.
  2. Systematic treatment of algorithms with running times of the form O(c^n).

  3. Cygan, M., et al. (2015). Parameterized Algorithms. Springer.

  4. Modern treatment of FPT algorithms with practical applications.

Research Papers

Foundational Papers

  1. Cook, S. (1971). "The complexity of theorem-proving procedures." Proceedings of STOC.
  2. Karp, R. M. (1972). "Reducibility among combinatorial problems." Complexity of Computer Computations.
  3. Impagliazzo, R., & Paturi, R. (2001). "On the Complexity of k-SAT." JCSS, 62(2), 367-375.

Modern Advances

  1. Williams, R. (2005). "A new algorithm for optimal 2-constraint satisfaction and its implications." TCS, 348(2-3), 357-365.
  2. Scheder, D., & Tao, S. (2023). "The PPSZ algorithm for k >= 5." Proceedings of STOC.
  3. Williams, V. V. (2012). "Multiplying matrices faster than Coppersmith-Winograd." Proceedings of STOC.

Fine-Grained Complexity

  1. Williams, V. V. (2018). "On some fine-grained questions in algorithms and complexity." Proceedings of ICM.
  2. Abboud, A., & Williams, V. V. (2014). "Popular conjectures imply strong lower bounds for dynamic problems." FOCS.

Online Resources

Course Materials

  • MIT 6.046J: Design and Analysis of Algorithms
  • URL: https://ocw.mit.edu/courses/6-046j-design-and-analysis-of-algorithms-spring-2015/
  • Covers NP-completeness and exponential algorithms.

  • Stanford CS161: Design and Analysis of Algorithms

  • URL: https://web.stanford.edu/class/cs161/
  • Dynamic programming and intractability.

  • Erik Demaine's Advanced Algorithms (MIT 6.854):

  • URL: https://courses.csail.mit.edu/6.854/
  • Includes advanced topics on exponential algorithms.

Online Tools and Visualizers

  • Algorithm Visualizer: https://algorithm-visualizer.org/
  • Interactive visualizations of recursive algorithms.

  • Big-O Cheat Sheet: https://www.bigocheatsheet.com/

  • Quick reference for common complexities.

  • SAT Competition: https://satcompetition.github.io/

  • Annual competition for SAT solvers, benchmarks and implementations.

Coding Practice

  • LeetCode Problems involving exponential time:
  • 78: Subsets
  • 90: Subsets II
  • 46: Permutations
  • 39: Combination Sum
  • 322: Coin Change (DP optimization)
  • 139: Word Break (DP optimization)
  • 416: Partition Equal Subset Sum
  • 494: Target Sum
  • 943: Find the Shortest Superstring (bitmask DP)

  • Codeforces: Problems tagged with "bitmasks" and "dp"

  • URL: https://codeforces.com/problemset?tags=bitmasks,dp

Standards and Specifications

IEEE/ACM Algorithm Complexity Notation

The standard notation for expressing algorithmic complexity follows the conventions established in:

  • Knuth, D. E. (1976). "Big Omicron and big Omega and big Theta." ACM SIGACT News, 8(2), 18-24.
  • Bachmann, P. (1894). Die Analytische Zahlentheorie. (Origin of O-notation)
  • Landau, E. (1909). Handbuch der Lehre von der Verteilung der Primzahlen. (Popularization of O-notation)

Cryptographic Key Length Standards

The relationship between key length and brute-force time:

  • NIST SP 800-57 Part 1 Rev. 5 (2020): "Recommendation for Key Management: Part 1 - General"
  • Specifies minimum key lengths for security levels.
  • 128-bit security requires 2^128 operations to brute-force.

  • ECRYPT-CSA Report (2018): "Algorithms, Key Size and Protocols Report"

  • European recommendations for cryptographic parameters.
Security Level Symmetric Key RSA Key ECC Key
80-bit 80 bits 1024 bits 160 bits
112-bit 112 bits 2048 bits 224 bits
128-bit 128 bits 3072 bits 256 bits
192-bit 192 bits 7680 bits 384 bits
256-bit 256 bits 15360 bits 512 bits

SAT Solver Standards

  • DIMACS CNF Format: Standard input format for SAT solvers.
  • Used by all SAT competition entries.
  • URL: https://www.cs.ubc.ca/~hoos/SATLIB/Benchmarks/SAT/satformat.ps

  • SMT-LIB Standard: Extension for Satisfiability Modulo Theories.

  • URL: https://smtlib.cs.uiowa.edu/