Parameterized Complexity VS
Approximation Algorithms
Boaz Ophir
Winter 2012-13
Intro • NP-hard optimization problems - there is no
polynomial-time algorithm that finds the exact value of the optimum.
• Our options (until now):
1. Exact Algorithms :
• Run time is not polynomial.
• Parameterized Complexity .
2. Approximation Algorithms :
• Polynomial time.
• Solution is not optimal but is worse-case bound.
1/9/2013 D. Marx “Parameterized Complexity and Approximation Algorithms” 2
Motivation • By combining ideas from:
1. Parameterized Complexity
AND
2. Approximation Theory
we may be able to tackle problems that are intractable in each theory by itself!
• Our goal – FPT Approximation Algorithms
1/9/2013 D. Marx “Parameterized Complexity and Approximation Algorithms” 3
Talk Outline 1. Motivation.
2. Concepts in Approximation Theory.
3. Approximation with Instance Parameters.
1. Example - Vertex Cover.
2. Example - Vertex Coloring.
4. Other forms of Parameterization.
1. Parameterization by Cost.
2. Performance Functions.
3. Parameterization by Quality of Approximation.
1/9/2013 D. Marx “Parameterized Complexity and Approximation Algorithms” 4
Approximation Algorithms 101 • Definition: an NP optimization problem is a 4-tuple
𝐼, 𝑠𝑜𝑙, 𝑐𝑜𝑠𝑡, 𝑔𝑜𝑎𝑙 :
o 𝐼 – the set of all instances.
o For an instance x ∈ 𝐼, 𝑠𝑜𝑙(𝑥) is the set of feasible solutions of 𝑥.
• The length of each solution 𝑦 ∈ 𝑠𝑜𝑙(𝑥) is polynomial in the size of the input, |𝑥|.
• It can be decided in poly time whether 𝑦 ∈ 𝑠𝑜𝑙(𝑥) holds for a given 𝑦, 𝑥.
o Given 𝑥 and 𝑦 ∈ 𝑠𝑜𝑙(𝑥), cost 𝑥, 𝑦 is a poly-time computable positive integer.
o 𝑔𝑜𝑎𝑙 ∈ 𝑚𝑖𝑛,𝑚𝑎𝑥 .
1/9/2013 D. Marx “Parameterized Complexity and Approximation Algorithms” 5
Approximation Algorithms 101(2)
• Goal:
o Find a feasible solution 𝑦 that achieves the best objective: 𝑐𝑜𝑠𝑡 𝑥, 𝑦 = 𝑔𝑜𝑎𝑙{𝑐𝑜𝑠𝑡 𝑥, 𝑦′ ∶ 𝑦′ ∈ 𝑠𝑜𝑙 𝑥 }
o 𝑜𝑝𝑡 𝑥 - the cost of the optimum solution.
o The performance ratio 𝑐(𝑦) is defined as:
𝑐 𝑦 =
𝑐𝑜𝑠𝑡(𝑥, 𝑦)
𝑜𝑝𝑡(𝑥) 𝑖𝑓 𝑔𝑜𝑎𝑙 𝑖𝑠 𝑚𝑖𝑛
𝑜𝑝𝑡(𝑥)
𝑐𝑜𝑠𝑡(𝑥, 𝑦) 𝑖𝑓 𝑔𝑜𝑎𝑙 𝑖𝑠 𝑚𝑎𝑥
o A c-approximation algorithm produces a solution with performance ration at most 𝑐.
1/9/2013 D. Marx “Parameterized Complexity and Approximation Algorithms” 6
Approximation Algorithms 101(3)
• Approximation algorithm race:
o A constant ratio approx. alg. is published
o An improved alg. with better ratio is published.
o Repeat … (sometimes endlessly)
• A problem admits a Poly-time Approximation Scheme (PTAS) if for every 𝜀 > 0 there is a poly-time (1 + ε)-approximation algorithm.
o PTAS – run-time is of the form |𝑥|𝑓(1/𝜀)
o Efficient PTAS(EPTAS)-run-time of the form 𝑓(1/𝜀)|𝑥|𝑂(1)
o Fully PTAS(FPTAS)- run-time of the form (1/𝜀)𝑂(1)|𝑥|𝑂(1)
1/9/2013 D. Marx “Parameterized Complexity and Approximation Algorithms” 7
Approximation with Instance
Parameters • Definition: An FPT c-Approximation Algorithm with
parameter κ : o Input: 𝑥 ∈ 𝐼
o Output: a c-approximate solution
o Run-time: 𝑓 𝜅 𝑥 |𝑥|𝑂(1)
• Definition: An FPT Approximation Scheme (FPT-AS) with parameter κ : o Input: 𝑥 ∈ 𝐼 and 𝜀 > 0
o Output: an (1 + ε)-approximate solution
o Run-time: 𝑓 𝜀, 𝜅 𝑥 |𝑥|𝑂(1)
1/9/2013 D. Marx “Parameterized Complexity and Approximation Algorithms” 8
Approximation with Instance
Parameters (2)
Categories of parameterizations (what is κ ?):
1. Measure Parameters – an obvious measure of the problem instance.
2. Structural Parameters – a structural property of the input that describes how complicated the input is. o Maximum degree
o Diameter
o Tree width
o Genus
o Distance from a class
1/9/2013 D. Marx “Parameterized Complexity and Approximation Algorithms” 9
Example 1 – Vertex Cover • Vertex Cover: Cover all edges with as few vertices as
possible. o VC is FPT.
o VC has a trivial 2-approximation algorithm.
o VC does not admit PTAS.
• Partial VC: Cover as many edges as possible with k vertices. o W[1]-hard with parameter k.
o Simple greedy algorithm gives 1.582-approximation.
o Does not admit PTAS.
o Does admit FPT-AS with parameter k !!!
1/9/2013 D. Marx “Parameterized Complexity and Approximation Algorithms” 10
Example 1 – Vertex Cover (2)
• Proof:
o Denote 𝐷 ≔ 2 𝑘2
/𝜀.
o Mark vertices as 𝑣1 …𝑣𝑛 ordered by non-increasing degree 𝑑 𝑣1 ≥ 𝑑 𝑣2 ≥ ⋯ ≥ 𝑑(𝑣𝑛).
• Case 1: 𝑑(𝑣1) ≥ 𝐷 o Output 𝑣1, . . 𝑣𝑘 .
o These 𝑘 vertices cover at least 𝑑 𝑣𝑖 − 𝑘2
𝑘𝑖=1 edges.
o The optimum is at most 𝑑 𝑣𝑖𝑘𝑖=1 .
𝑑 𝑣𝑖 − 𝑘2
𝑘𝑖=1
𝑑 𝑣𝑖𝑘𝑖=1
≥ 1 −
𝑘2
𝑑 𝑣1≥ 1 −
𝑘2
𝐷= 1 −
𝜀
2≥
1
1 + 𝜀
1/9/2013 D. Marx “Parameterized Complexity and Approximation Algorithms” 11
Example 1 – Vertex Cover (3)
• Case 2: 𝑑 𝑣1 < 𝐷 o The optimum is at most 𝑘𝐷. o Determine the exact cover in FPT-time: For 𝑙 = 1. . 𝑘𝐷 check whether it is possible to cover 𝑙 edges
with 𝑘 vertices. Method used – Color Coding.
• Color the edges randomly with 𝑙 colors. • Try to find solution where the 𝑙 edges covered have distinct
colors. • For a particular coloring consider every partition 𝑃 = 𝑃1, . . 𝑃𝑘
of the 𝑙 colors into k classes (there are at most 𝑘𝑙 partitions). • Find vertices 𝑣1 …𝑣𝑘 so that for each color 𝑐 in partition 𝑃𝑖,
vertex 𝑣𝑖 covers at least one edge with color 𝑐. This is done in poly-time.
• Repeat for different colorings or de-randomize. □
1/9/2013 D. Marx “Parameterized Complexity and Approximation Algorithms” 12
Example 2– Vertex Coloring • Problem: given a graph 𝐺, find a coloring using the minimal
number of colors so that adjacent vertices have different colors.
• Denote 𝜒(𝐺) the chromatic number of 𝐺.
• Hard even for planar graphs ! o Easy to check if graph is 2-colorable.
o NP-complete to decide whether graph is 3-colorable.
o 4-Color theorem – 4 colors are sufficient and coloring can be found in poly-time.
=> A 4
3-approximate coloring can be found in poly-time.
1/9/2013 D. Marx “Parameterized Complexity and Approximation Algorithms” 13
Example 2– Vertex Coloring (2)
• What about graphs that are almost planar?
o Bounded genus graphs.
o Planar+𝑘𝑣 graphs.
• Theorem: Vertex Coloring has an FPT 2-approx. if the parameter is the genus of the graph.
1/9/2013 D. Marx “Parameterized Complexity and Approximation Algorithms” 14
Example 2– Vertex Coloring (3)
• Theorem: Vertex Coloring has an FPT 7
3-approx. if the graph
is planar+𝑘𝑣.
• Proof
o 𝑋 = {𝑣1, … 𝑣𝑘} (can be found in 𝑂(𝑓 𝑘 𝑛2)).
o Look at 𝐺 𝑋 - use brute force - try all 𝑘𝑘 colorings to find 𝜒(𝐺 𝑋 ).
o Look at 𝐺\X - Find 4
3-approximation of 𝜒 𝐺\X .
o Combine to color the whole graph:
𝑐 = 𝜒 𝐺 𝑋 + 4
3∙ 𝜒 𝐺\X ≤
7
3∙ 𝜒 𝐺
(the worst case is 𝜒 𝐺 = 𝜒 𝐺\X = 𝜒 𝐺 𝑋 = 3)
1/9/2013 D. Marx “Parameterized Complexity and Approximation Algorithms” 15
Parameterization by Cost • The most obvious parameter for optimization:
The Optimum Cost • But – this is tricky
o The optimum cost is hard to determine o Instead we assume the input contains a parameter 𝑘 – the cost that
should be reached.
• Definition: FPT-approximation alg. with performance ratio 𝑐 for optimization problem 𝑋 = (𝐼, 𝑠𝑜𝑙, 𝑐𝑜𝑠𝑡, 𝑔𝑜𝑎𝑙).
Given input (𝑥, 𝑘) satisfying 𝑜𝑝𝑡 𝑥 ≤ 𝑘, 𝑔𝑜𝑎𝑙 = 𝑚𝑖𝑛
𝑜𝑝𝑡 𝑥 ≥ 𝑘, 𝑔𝑜𝑎𝑙 = 𝑚𝑎𝑥
the algorithm computes a solution 𝑦 ∈ 𝑠𝑜𝑙(𝑥) in time 𝑓(𝑘)|𝑥|𝑂(1) such that:
𝑐𝑜𝑠𝑡 𝑥, 𝑦 ≤ 𝑘 ∙ 𝑐, 𝑔𝑜𝑎𝑙 = 𝑚𝑖𝑛
𝑐𝑜𝑠𝑡 𝑥, 𝑦 ≥ 𝑘/𝑐, 𝑔𝑜𝑎𝑙 = 𝑚𝑎𝑥
1/9/2013 D. Marx “Parameterized Complexity and Approximation Algorithms” 16
Performance Functions • Typically approximation algorithms output a solution
that differs from the optimum by (at most) a constant factor.
• The alg. performs equally well regardless of optimum size.
• More precise analysis is achieved by bounding by a function of the optimum.
• Let 𝑙: ℕ → ℕ be a non-decreasing function.
• We change the FPT-approximation alg. definition:
𝑐𝑜𝑠𝑡 𝑥, 𝑦 ≤ 𝑘 ∙ 𝑙(𝑘), 𝑔𝑜𝑎𝑙 = 𝑚𝑖𝑛
𝑐𝑜𝑠𝑡 𝑥, 𝑦 ≥ 𝑘/𝑙(𝑘), 𝑔𝑜𝑎𝑙 = 𝑚𝑎𝑥
1/9/2013 D. Marx “Parameterized Complexity and Approximation Algorithms” 17
Performance Functions (cntd.)
• Positive result:
o Theorem: If maximization problem 𝑋 has an FPT-approximation alg. with performance ration function 𝑙(𝑘) then there is a poly-time 𝑙′(𝑘)-approximation for 𝑋.
o Does not hold for minimization problems.
• Negative result:
o For certain problems there is no FPT-approximation algorithm for any performance ratio function.
o Example: Minimum Independent Dominating Set
1/9/2013 D. Marx “Parameterized Complexity and Approximation Algorithms” 18
Parameterization by Quality of
Approximation
• Efficient PTAS(EPTAS)- poly-time approximation scheme where run-time is of the form 𝑓(1/𝜀)|𝑥|𝑂(1).
• Proposition: If an optimization problem 𝑋 admits an EPTAS then the parameterization of 𝑋 is FPT, where the parameter is the cost.
• We can use this to prove that certain problems do not admit EPTAS.
1/9/2013 D. Marx “Parameterized Complexity and Approximation Algorithms” 19
Parameterization by Quality of
Approximation (2)
• Proof: o Assume – we have an algorithm that gives an (1 + ε)-
approximate solution in time 𝑓(1/𝜀)|𝑥|𝑂(1).
o Set 𝜀 ≔ 1
2𝑘 .
o Run the EPTAS – runtime is 𝑓(2𝑘)|𝑥|𝑂(1). o If the (exact) optimum is at most 𝑘, then the cost of the
approximate solution is at most
1 + 𝜀 𝑘 = 𝑘 +1
2< 𝑘 + 1.
Cost is an integer => the cost of the approximate solution is at most 𝑘. o If the (exact) optimum is greater than 𝑘 then so is the
approximate solution. o So – if the approximate solution is at most 𝑘 so is the exact
solution.
1/9/2013 D. Marx “Parameterized Complexity and Approximation Algorithms” 20
Conclusions • Parameterized Complexity and Approximation
Algorithms can benefit from each other.
• We saw a few examples – there are many other examples of FPT-approximability.
• There are more connections:
o Kernelization – lower bounds on the approximation ratio translate to lower bounds on kernel size.
o Iterative compression
o Counting problems
1/9/2013 D. Marx “Parameterized Complexity and Approximation Algorithms” 21
Fin
Thank you
1/9/2013 D. Marx “Parameterized Complexity and Approximation Algorithms” 22