A topic in the Open Knowledge Graph — a free, open map of 15,290 topics and the order to learn them in.

PTAS and FPTAS

Research Depth 106 in the knowledge graph ☐ I know this ☆ Set as goal
535prerequisites beneath it
See this on the map →
Approximation Algorithms (LP Relaxation and Primal-Dual)NP-Completeness and Cook-Levin Theorem+1 more→
ptas fptas approximation-schemes knapsack

Core Idea

A Polynomial-Time Approximation Scheme (PTAS) is a family of algorithms parameterized by epsilon > 0, where each algorithm runs in polynomial time in n (for fixed epsilon) and returns a (1+epsilon)-approximate solution. An FPTAS (Fully Polynomial-Time Approximation Scheme) is stronger: the running time is polynomial in both n and 1/epsilon. The knapsack problem admits an FPTAS via scaling and rounding item profits, then applying dynamic programming — running in O(n2/epsilon) time. PTAS existence versus FPTAS existence is a meaningful distinction: not all problems with a PTAS have an FPTAS, and the FPTAS exclusion is connected to strong NP-hardness. Problems like Euclidean TSP admit a PTAS (Arora, Mitchell) but are unlikely to have an FPTAS.

Explainer

Approximation algorithms give worst-case guarantees — a 2-approximation always returns a solution within a factor of 2 of optimal. But for many applications, you want to tune the accuracy: a 1.01-approximation for a shipping route, a 1.001-approximation for a portfolio allocation. Approximation schemes provide this tunability by parameterizing the accuracy with epsilon.

A PTAS is a family of algorithms indexed by epsilon > 0. For each epsilon, the algorithm runs in time polynomial in n (the input size) and returns a solution within factor (1+epsilon) of optimal. The catch is that the polynomial's degree or leading constant can depend on epsilon — a running time of O(n1/epsilon) qualifies as a PTAS because for epsilon = 0.1 it is O(n10), which is polynomial. But for epsilon = 0.001 it is O(n1000), which is technically polynomial but practically useless. An FPTAS removes this catch: the running time must be polynomial in both n and 1/epsilon, like O(n2/epsilon) or O(n3/epsilon2).

The knapsack FPTAS is the canonical example. The standard DP for knapsack runs in O(nP) time where P is the total profit — pseudopolynomial because P can be exponential in the input encoding. The FPTAS rescales profits by dividing by K = epsilon * p_max / n, effectively reducing the profit resolution. Rounding down to integers loses at most K profit per item, and with at most n items, the total loss is at most nK = epsilon * p_max <= epsilon * OPT. The scaled DP table has dimensions n by n/epsilon, giving O(n2/epsilon) time. You trade a controlled amount of precision for a massive reduction in running time — from pseudopolynomial to fully polynomial.

The existence of an FPTAS is tied to the number-theoretic structure of the problem. Strongly NP-hard problems — those that remain NP-hard even when all numbers are polynomially bounded — cannot have FPTAS unless P = NP, because an FPTAS would solve the bounded case exactly. This is why knapsack (weakly NP-hard) has an FPTAS but bin packing (strongly NP-hard) does not. Problems like Euclidean TSP occupy an intermediate position: they admit a PTAS (using geometric structure) but the running time's dependence on 1/epsilon is exponential, and this is believed to be inherent. The PTAS / FPTAS / no-PTAS hierarchy provides a refined classification of NP-hard optimization problems by their approximability.

Practice Questions 4 questions

Prerequisite Chain

Understanding Zero → The Number Zero → Counting to Five → Counting to 10 → Counting to 20 → Counting a Set of Objects Up to 20 → Cardinality: The Last Number Counted → Matching Numerals to Quantities → Subitizing Small Quantities → Addition Within 10 → Number Bonds to 10 → Addition Within 20 → Doubles and Near Doubles → Doubles Facts Within 10 → Near Doubles Facts Within 20 → Mental Math Strategies for Addition → Mental Math: Adding and Subtracting Tens → Addition Within 100 → Repeated Addition as Multiplication → Multiplication as Equal Groups → Multiplication: Arrays → Basic Multiplication Facts (0s, 1s, 2s, 5s, 10s) → Multiplication Facts Within 100 → Division as Equal Sharing → Division as Grouping (Measurement Division) → Division: Grouping (Repeated Subtraction) Model → Division: Fair Sharing Model → Division as Equal Sharing → Division as Grouping → Basic Division Facts → Division Facts Within 100 → Multiplication and Division Fact Families → Relationship Between Multiplication and Division → Division Facts as Inverse of Multiplication → Remainders and Quotients in Division → Division Word Problems → Multi-Step Word Problems → Solving Multi-Step Word Problems → Multiplication Word Problems → Division Word Problems → Introduction to Long Division → Factors and Multiples → Prime and Composite Numbers → Equivalent Fractions → Relating Fractions and Decimals → Decimal Place Value → Integers and the Number Line → Comparing and Ordering Integers → Absolute Value → Adding Integers → Subtracting Integers → Multiplying Integers → Introduction to Exponents → Order of Operations → Integer Order of Operations → Variable Expressions → The Distributive Property → Variables and Expressions Review → Introduction to Polynomials → Adding and Subtracting Polynomials → Multiplying Polynomials → Factorial → Permutations → Combinations → Counting Principles: Addition and Multiplication Rules → Introduction to Graph Theory → Propositional Logic Foundations → Logical Equivalences → Boolean Algebra → Boolean Type and Truth Values → Comparison Operators and Boolean Tests → Logical Operators and Boolean Algebra → Boolean Algebra and Fundamental Laws → Logic Gates Fundamentals → Implementing Boolean Functions with Gates → Karnaugh Map Simplification → Combinational Circuit Design → Flip-Flops and Latches → Finite State Machines (FSMs) → Deterministic Finite Automata (DFA) → Nondeterministic Finite Automata (NFA) → Two-Way Finite Automata → NFA to DFA Conversion (Subset Construction) → DFA Properties and Minimization Algorithms → Regular Languages: Definition and Characterization → Context-Free Grammars (CFGs) → Pushdown Automata (PDA) → Equivalence of CFGs and Pushdown Automata → Closure Properties of Context-Free Languages → Limitations of Context-Free Languages → Pumping Lemma for Context-Free Languages → Turing Machines → Variants of Turing Machines and Equivalence → Nondeterministic Time Complexity and NP → The P vs. NP Problem → Complexity Class P: Polynomial Time → Complexity Class NP: Nondeterministic Polynomial Time → NP-Completeness and Cook-Levin Theorem → The Cook-Levin Theorem → Boolean Satisfiability, Cook-Levin, and Reductions → 3-SAT and k-SAT Variants → Partition and Subset Sum Problems → Vertex Cover and Clique Problems → Approximation Algorithms and Approximation Ratios → Hardness of Approximation → Approximation Algorithms (LP Relaxation and Primal-Dual) → PTAS and FPTAS

Longest path: 107 steps · 535 total prerequisite topics

Prerequisites (3)

Leads To (0)

No topics depend on this one yet.