the ferry cover problem

134
The Ferry Cover Problem Michael Lampis - Valia Mitsou National Technical University of Athens

Upload: shania

Post on 24-Feb-2016

48 views

Category:

Documents


1 download

DESCRIPTION

The Ferry Cover Problem. Michael Lampis - Valia Mitsou National Technical University of Athens. Wolf. Goat. Cabbage. Guard. Boat. Previous Work. “Propositiones ad acuendos iuvenes”, Alcuin of York, 8th century A.D (in latin). We propose a generalization of Alcuin’s puzzle. - PowerPoint PPT Presentation

TRANSCRIPT

The Ferry Cover Problem

Michael Lampis - Valia MitsouNational Technical University of Athens

Previous Work• “Propositiones ad acuendos

iuvenes”, Alcuin of York, 8th 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 ProblemLemma:

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)

PathsCycles StarsCliques

Ferry Cover on Trees

Lemma:For trees with OPTVC (G) > 1 (i.e. not stars) OPTFC (G) = OPTVC (G) (Type-0)

wu

v

u v

w

u v

w

u

wv

u

wv

u

wv

u

wv

u

wv

u

wv

u

wv

u

wv

u

wv

u

wv

wuv

wuv

uv

w

uv

w

v

uw

v

uw

v

uw

v

uw

v

uw

v

uw

v

uw

v

uw

w

u v

w

u v

wu

v

Ferry Cover on Trees• For a star with three or more leavesOPTFC (G) = OPTVC (G)+1 = 2 (Type-1)

• For any other treeOPTFC (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 2i+1 trips (i round-trips).

FC1

• An interesting special case: only one round-trip allowed.

• FC1 is NP-hard.• 2-approximation for general

graphs.• A (4/3+ε)-approximation for trees.

FC1 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

2 3H :

H-Colorings• A constrained 3-coloring of graph

G:Vertices of color 2 are only connected with vertices of color 3

1

2 3H :

H-Colorings• A loose 3-coloring of graph G:

Vertices of color 2 can be connected with any vertex.

1

2 3H :

FC1 as an F1-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

3F1

FC1 as an F1-Coloring problem

• Boat size is |V2|+ max{|V1|, |V3|}

• FC1 is equivalent to finding an F1-coloring that minimizes the above function.

1

2

3F1

FC1 is NP-hard

Via a reduction from NAE3SATSketch:1. Given a NAE3SAT formula φ with

m clauses, create a new formula φ’2. From φ’ create a graph G3. G has an F1-coloring of cost 7m iff

φ is satisfiable.

Reduction: Step 1

1 2 3 1 2 3 1 2 3( ) ( ) ( )x x x x x x x x x In NAESAT

For example:1 2 3 2 3 4( ) ( )x x x x x x

Then:1 2 3 1 2 3

2 3 4 2 3 4

' ( ) ( )( ) ( )x x x x x xx x x x x x

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

1 2 3( )x x x 1 2 3( )x x x

2 3 4( )x x x 2 3 4( )x x x

Example: 1 2 3 1 2 3

2 3 4 2 3 4

' ( ) ( )( ) ( )x x x x x xx x x x x x

Reduction: Step 2Example: 1 2 3 1 2 3

2 3 4 2 3 4

' ( ) ( )( ) ( )x x x x x xx x x x x x

1x 1x

2x

2x

2x

2x3x

3x 4x

3x

3x 4x

Reduction: Step 2Example: 1 2 3 1 2 3

2 3 4 2 3 4

' ( ) ( )( ) ( )x x x x x xx x x x x x

2x 2x 3x 3x1x 1x

4x 4x

1x 1x

2x

2x

2x

2x3x

3x 4x

3x

3x 4x

Reduction: Step 2

2x 2x 3x 3x1x 1x

4x 4x

Example: 1 2 3 1 2 3

2 3 4 2 3 4

' ( ) ( )( ) ( )x x x x x xx x x x x x

1x 1x

2x

2x

2x

2x3x

3x 4x

3x

3x 4x

Step 3: If φ’ is satisfiabletrue

false

true

false

F1

Step 3: If φ’ is satisfiabletrue

true

false

falseF1

Step 3: If φ’ is satisfiabletrue

true

false

falseF1

Step 3: If φ’ is satisfiabletrue

true

false

false

Cost = 7m = 2m + 2m + 3m

Step 3: If cost=7m• Observe that 7m 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, FC1 is APX-hard.

Approximation algorithms for FC1

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 FC1 on trees (boat size

2n/3)Fact: For a tree G OPTVC(G) ≤ n/2 (because tree is a bipartite graph)

ALGORITHM1. Load a vertex cover of size 2n/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-hardTrivial?

0 1 2 n-1i: 2n-1n-2

NP-hard≡ FC

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 FC1 in the general case?