The Ferry Cover Problem Michael Lampis Valia Mitsou
The Ferry Cover Problem Michael Lampis - Valia Mitsou National Technical University of Athens
Previous Work • “Propositiones ad acuendos iuvenes”, Alcuin of York, 8 th century A. D (in latin). • We propose a generalization of Alcuin’s puzzle
Our generalization
Our generalization • We seek to transport n items, given their incompatibility graph. • Objective: Minimize the size of the boat • We call this the Ferry Cover Problem
OPTFC (G) ≥ OPTVC (G)
OPTFC (G) ≥ OPTVC (G)
OPTFC (G) ≥ OPTVC (G)
OPTFC (G) ≤ OPTVC (G) + 1
OPTFC (G) ≤ OPTVC (G) + 1
OPTFC (G) ≤ OPTVC (G) + 1
OPTFC (G) ≤ OPTVC (G) + 1
OPTFC (G) ≤ OPTVC (G) + 1
OPTFC (G) ≤ OPTVC (G) + 1
OPTFC (G) ≤ OPTVC (G) + 1
OPTFC (G) ≤ OPTVC (G) + 1
OPTFC (G) ≤ OPTVC (G) + 1
OPTFC (G) ≤ OPTVC (G) + 1
OPTFC (G) ≤ OPTVC (G) + 1
OPTFC (G) ≤ OPTVC (G) + 1
The Ferry Cover Problem Lemma: OPTVC (G) ≤ OPTFC (G) ≤ OPTVC (G) + 1 Graphs are divided into two categories: • Type-0, if OPTFC (G) = OPTVC (G) • Type-1, if OPTFC (G) = OPTVC (G) + 1
Hardness and Approximation Results • Ferry Cover is NP and APX-hard (like Vertex Cover [Håstad 1997]). • A ρ-approximation algorithm for Vertex Cover yields a (ρ+1/ OPTFC)-approximation algorithm for Ferry Cover.
Ferry Cover in other well known graph topologies Type-0 (OPTFC = OPTVC ) Type-1 (OPTFC = OPTVC+1) Paths Cycles Cliques Stars
Ferry Cover on Trees Lemma: For trees with OPTVC (G) > 1 (i. e. not stars) OPTFC (G) = OPTVC (G) (Type-0)
u w v
w u v
w u v
w u v
w u v
w u v
w u v
w u v
w u v
w u v
w u v
w u v
w u v
u w v
u w v
w v u
w v u
u w v
u w v
u w v
u w v
u w v
u w v
u w v
u w v
w u v
w u v
u w v
Ferry Cover on Trees • For a star with three or more leaves OPTFC (G) = OPTVC (G)+1 = 2 (Type-1) • For any other tree OPTFC (G) = OPTVC (G) (Type-0) Fact: The Vertex Cover Problem can be solved in Polynomial time on trees.
Ferry Cover on Trees Theorem: The Ferry Cover Problem can be solved in polynomial time on trees.
The Trip Constrained Ferry Cover Problem
Trip Constrained Ferry Cover • Variation of Ferry Cover: we are also given a trip constraint. We seek to minimize the size of the boat s. t. there is a solution within this constraint. • Definition: FCi → determine the minimum boat size s. t. there is a solution with at most 2 i+1 trips (i round-trips).
FC 1 • An interesting special case: only one roundtrip allowed. • FC 1 is NP-hard. • 2 -approximation for general graphs. • A (4/3+ε)-approximation for trees.
FC 1 is NP-hard
H-Colorings • A traditional 3 -coloring of graph G: Vertices of color 2 are connected with vertices of colors 1 or 3 1 H: 2 3
H-Colorings • A constrained 3 -coloring of graph G: Vertices of color 2 are only connected with vertices of color 3 1 H: 2 3
H-Colorings • A loose 3 -coloring of graph G: Vertices of color 2 can be connected with any vertex. 1 H: 2 3
FC 1 as an F 1 -Coloring problem Vertices are partitioned into 3 groups: 1. Those loaded and unloaded on the first trip 2. Those remaining on the boat for all three trips 3. Those loaded and unloaded on the third trip 1 2 F 1 3
FC 1 as an F 1 -Coloring problem 1 • Boat size is |V 2|+ max{|V 1|, |V 3|} • FC 1 is equivalent to finding an F 1 -coloring that minimizes the above function. 2 F 1 3
FC 1 is NP-hard Via a reduction from NAE 3 SAT Sketch: 1. Given a NAE 3 SAT formula φ with m clauses, create a new formula φ’ 2. From φ’ create a graph G 3. G has an F 1 -coloring of cost 7 m iff φ is satisfiable.
Reduction: Step 1 In NAESAT For example: Then:
Reduction: Step 2 • For every clause construct a triangle. • For every variable construct a complete bipartite graph. • Connect each triangle vertex to one corresponding bipartite vertex.
Reduction: Step 2 Example:
Reduction: Step 2 Example:
Reduction: Step 2 Example:
Reduction: Step 2 Example:
Step 3: If φ’ is satisfiable true false F 1 false
Step 3: If φ’ is satisfiable true false F 1 false
Step 3: If φ’ is satisfiable true false F 1 false
Step 3: If φ’ is satisfiable true false Cost = 7 m = 2 m + 3 m false
Step 3: If cost=7 m • Observe that 7 m is the minimum possible cost. • It is possible to show that a coloring of this cost is a coloring of the previous form. • Therefore, φ is satisfiable. • Bonus: This reduction is also gap-preserving. Therefore, FC 1 is APX-hard.
Approximation algorithms for FC 1
2 -approximation • The boat arrives to the destination bank twice. • Therefore, its size must be at least n/2 • A boat of size n is a 2 -approximation!
(4/3+ε) – approximation for FC 1 on trees (boat size 2 n/3) Fact: For a tree G OPTVC(G) ≤ n/2 (because tree is a bipartite graph) ALGORITHM 1. Load a vertex cover of size 2 n/3. 2. Unload n/3 vertices that form an Independent Set and return. 3. Load the remaining vertices and transfer all of them to the destination.
4/3 Approximation
4/3 Approximation
4/3 Approximation
4/3 Approximation
4/3 Approximation
4/3 Approximation
4/3 Approximation
4/3 Approximation
Optimal Solution
Optimal Solution
Optimal Solution
Optimal Solution
Optimal Solution
Optimal Solution
Optimal Solution
Optimal Solution
Results for the Trip Constrained Ferry Cover Problem NP-hard Trivial NP-hard i: 0 1 ≡ FC ? 2 n-1 2 n-1
Further Work • Is it NP-hard to determine whether a graph G is Type-0 or Type-1? • Is FC equivalent to FCn? • Is FCi for 1 < i < n-1 polynomially solved? • Can we have an efficient approximation of FC 1 in the general case?
- Slides: 134