/
Minicourse Minicourse

Minicourse - PowerPoint Presentation

luanne-stotts
luanne-stotts . @luanne-stotts
Follow
399 views
Uploaded On 2018-01-10

Minicourse - PPT Presentation

on parameterized algorithms and complexity Part 1 Basic techniques Insert Academic unit on every page 1 Go to the menu Insert 2 Choose Date and time 3 Write the name of your faculty or department in the field Footer ID: 622284

set vertex time cover vertex set cover time size instance parameter vertices problem algorithm degree feedback reduction polynomial graph

Share:

Link:

Embed:

Download Presentation from below link

Download Presentation The PPT/PDF document "Minicourse" is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.


Presentation Transcript

Slide1

Minicourse on parameterizedalgorithms and complexityPart 1: Basic techniques

Insert«Academic unit» on every page:1 Go to the menu «Insert»2 Choose: Date and time3 Write the name of your faculty or department in the field «Footer»4 Choose «Apply to all"

D

ániel

Marx

(slides by Bart M. P. Jansen)

November 2

, 201

6Slide2

Why we are hereTo create the recipes that make computers solve our problems

efficientlyWith a bounded number of resources (memory, time)We measure the quality of an algorithm by the dependence of its running time on the size of the inputFor an -bit input, the running time can be Smaller functions are better, but as a general guideline:Polynomials are good, exponential functions are badUnfortunately, many problems are NP-completeWe believe that for NP-complete problems, there is no algorithm that:always gives the

right answer

, and whose

running time is bounded by a polynomial function of the input size

 

2Slide3

Dealing with NP-complete problems

ApproximationSacrifice

quality

of the solution:

quickly find

a solution that is provably not

very bad

Local

search

Quickly

find

a solution

for

which you cannot give any quality guarantee (but which might often be good)

Branch

&

bound

Sacrifice running time guarantees: create an algorithm for which you do not know how long it will take (but which might do well on the inputs you use)

Parameterized

algorithms

Sacrifice the running time: allow the running time to have an exponential factor, but ensure that the exponential dependence is not on the entire input size but just on some parameter that is hopefully small

Kernelization

Quickly

shrink the input by preprocessing so that afterward running an exponential-time algorithm on the shrunk instance is fast enough

3Slide4

Fixed-parameter tractability

4Slide5

Parameterized problemsAs usual in complexity theory, we primarily study

decision problems (yes/no questions)optimization: “Find the shortest path from to ”decision: “Is there a path from to of length at most ?”Having an efficient algorithm for one typically gives an efficient algorithm for the otherA parameterized problem is a decision problem where we associate an integer parameter to each instanceThe parameter measures some aspect of the instance 5Slide6

Problem parameterizations

Packet Delivery ProblemInput: A graph , a starting vertex , a set of delivery vertices, and an integer Question: Is there a cycle in that starts and ends in , visits all vertices in , and has length at most ?There are many possible parameters for this problem:The length of the tourThe number of delivery points Graph-theoretic measures of how complex is (treewidth, cliquewidth, vertex cover number)Parameterized complexity investigates:

 

Can the problem be solved efficiently,

if the parameter is small?

6Slide7

Fixed-parameter tractability – informallyA parameterized problem is

fixed-parameter tractable if there is an algorithm that solves size- inputs with parameter value in time for some constant and function For each fixed , there is a polynomial-time algorithmVertex Cover: “Can all the edges of this -vertex graph be covered by at most

vertices?”

Solvable in time

, so

FPT

 

7Slide8

Fixed-parameter tractability – formallyLet

be a finite alphabet used to encode inputs( for binary encodings)A parameterized problem is a set

The set

contains the tuples

where the answer to the question encoded by

is yes;

is the

parameter

The parameterized problem

is

fixed-parameter tractable

if there is an algorithm that, given an input

,

decides if

belongs to

or not, andruns in time for some function and constant  8Slide9

kernelization

9Slide10

Data reduction with a guarantee

Kernelization is a method for parameterized preprocessingEfficiently reduce an instance to an equivalent instance of size bounded by some One of the simplest ways of obtaining FPT algorithmsApply a brute force algorithm on the shrunk instance

to

get an FPT algorithmKernelization

also allows a rigorous mathematical analysis of

efficient preprocessing 

10Slide11

The Vertex Cover problem

Input: An undirected graph and an integer Parameter: Question: Is there a set of at most vertices in , such that each edge of has an endpoint in ?Such a set S is a vertex cover of  

11Slide12

Reduction rules for Vertex Cover – (R1)

(R1) If there is an isolated vertex , delete from Reduce to the instance  12

 

 Slide13

Reduction rules for Vertex Cover – (R1)

(R1) If there is an isolated vertex , delete from Reduce to the instance To ensure that a reduction rule does not change the answer, we have to prove safeness of the

reduction

ruleIf

is

transformed into

then

we

should

prove

that

:

is a yes-instance

is a yes-instance 13Slide14

Reduction rules for Vertex Cover – (R1)

(R1) If there is an isolated vertex , delete from Reduce to the instance  14

 

 Slide15

Reduction rules for Vertex Cover – (R2)

15 

 

(R2)

If

there

is a vertex

of

degree

more

than

,

then delete (and its incident edges) from and decrease the parameter by 1Reduce

to the instance  Slide16

Reduction rules for Vertex Cover – (R3)

(R3) If the previous rules are not applicable and has more than vertices or more than edges, then conclude that we are dealing with a no-instance

 

16Slide17

Correctness of the cutoff rule

Claim. If is exhaustively reduced under (R1)-(R2) and has more than vertices or edges, then there is no size- vertex coverProof. Suppose has a vertex cover

Since

(R1) does

not apply

, every vertex of

has at least one edgeSince (R2) does not

apply

,

every

vertex has

degree

at most :

So

So if

has a size- vertex cover,

and

 17S

 Slide18

Preprocessing for Vertex Cover

(R1)-(R3) can be exhaustively applied in polynomial timeIn polynomial time, we can reduce a Vertex Cover instance to an instance such that:the two instances are equivalent:

has answer

yes

if and only if

has answer

yes

instance

has at most

vertices and

edges

This

gives

an FPT algorithm to solve an instance :Compute reduced instance

Solve

by brute force: try all

vertex subsets

For each , test if it is a vertex cover of size at most  18Theorem. -Vertex Cover is fixed-parameter tractable Slide19

Kernelization – formally

Let be a parameterized problem and A kernelization (or kernel) for of size is an algorithm that, given

, takes time polynomial in

, and outputs an instance

such that:

A

polynomial

kernel

is a

kernel

whose

function

is a polynomial

 

19

Theorem. A parameterized problem is fixed-parameter tractable if and only if it is decidable and has a kernel (of arbitrary size)Slide20

Kernel for Feedback Arc Set in Tournaments

Input: A tournament and an integer Parameter: Question: Is there a set of at most directed edges in , such that is acyclic? 20Slide21

Reduction rules for Feedback Arc Set

(R1) If vertex is not in any triangle, then remove (R2) If edge is in at least distinct triangles, reverse it and decrease by one(R3) If the previous rules are not applicable and has more than vertices, then

conclude

that we are dealing with

a no-instance

 21

Theorem

.

-

Feedback

Arc

Set in

Tournaments has a kernel with

vertices Slide22

High-level kernelization strategyCompare

to Vertex Cover:(R1) deals with elements that do not constrain the solution(R2) deals with elements that must be in any solution(R3) deals with graphs that remain large after reduction22Slide23

Bounded-depth search trees

23Slide24

BackgroundA

branching algorithm that explores a search tree of bounded depth is one of the simplest types of FPT algorithmsMain idea:Reduce problem instance to solving a bounded number of instances with parameter If you can solve in polynomial time using the answers to two instances and

, then the problem can be solved in

time

(

assuming

the case

is

polynomial

-time

solvable

)

If you generate

subproblems instead of 2, then the problem can be solved in

time 24Slide25

A search tree

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

25Slide26

Analysis of bounded-depth search trees

If the parameter decreases for each recursive call, the depth of the tree is at most # nodes in a depth- tree with leaves is Usually sufficient to bound the number of leavesIf the computation in each node takes polynomial time, total running time is

 

26Slide27

Vertex Cover revisited

Input: A graph and an integer Parameter: Question: Is there a set of at most vertices in , such that each edge has an endpoint in ? 27Slide28

Algorithm for Vertex Cover

Algorithm VC(Graph , integer )if then return noif has no edges then return yeselse pick an edge in and let and be its endpointsreturn (VC

or

(VC

)

Correct because any vertex cover must

use

or

A

size

-

vertex cover in G

that uses , yields a size- vertex cover in

 28Slide29

Running time for Vertex Cover

Every iteration either solves the problem directly or makes two recursive calls with a decreased parameterThe branching factor of the algorithm–and therefore of the search tree–is twoTree of depth with branching factor has at most leavesRunning time is

Much

better than

from the kernelization

algorithm

One

way

to

faster

algorithms:Pick a vertex

of maximum degree, recurse on and

 29Slide30

The Feedback Vertex Set problem

Input: An undirected (multi)graph and an integer Parameter: Question: Is there a set of at most vertices in , such that each cycle contains a vertex of ?We allow multiple edges and self-loopsSuch a set is a feedback vertex set of

Removing

from

results in an

acyclic graph, a forest 

30Slide31

Branching for Feedback Vertex Set

For Vertex Cover, we could easily identify a set of vertices to branch on: the two endpoints of an edgeFor feedback vertex set, a solution may not contain any endpoint of an edgeHow should we branch?We will find a set of vertices such that any size- feedback vertex set contains a vertex of To find

we first have

to

simplify the graph using reduction rules

that do not change the answer 

31Slide32

Reduction rules

(R1) If there is a loop at vertex , then delete and decrease by one(R2) If there is an edge of multiplicity larger than , then reduce its multiplicity to (R3) If there is a vertex of degree at most

,

then

delete

(R4) If there is a vertex

of degree two, then delete

and

add

an

edge between

’s neighbors 32

If (R1-R4) cannot be applied anymore,

then the minimum degree is at least

 

Observation

. If is transformed into , then:fvs of size in fvs

of size in

Any feedback vertex set in

is a feedback vertex set in when combined with the vertices deleted by (R1) Slide33

Identifying a set to branch on

Let be a graph whose vertices have degree three or moreOrder the vertices as by decreasing degreeLet

be

the

largest-degree

vertices

Lemma.

If

all

vertices of have degree 3 or more, then any size- feedback vertex set of contains a vertex from

So if there is a size- solution, it contains a vertex of For each recurse on the instance

Gives an algorithm with running time

Apply

the reduction rules, compute , then branch

 33Slide34

A useful claim

Claim. If is a feedback vertex set of , thenProof. Graph

is a

forest

So

Every

edge

not

in

, is incident

with

a vertex of

With this claim, we can prove the degree lemma

 

34Slide35

Proving the degree lemma

Lemma. If all vertices of have degree 3 or more, then any size- feedback vertex set of G contains a vertex from Proof by contradiction. Let be a size- feedback vertex set with

By

choice

of

we have:

, so:

Define

. Since

:

 

By

the

previous

claim

35Slide36

Proving the degree lemma (II)

The degree sum counts every edge twice:

Combining

these:

So

But

since

all

vertices

have

degree

we have:

Contradiction

 

36Slide37

A final word on bounded-depth search trees

The degree lemma proves the correctness of our branching strategy for Feedback Vertex SetWhen building a branching algorithm for a parameterization by the solution size:Find an -size set that contains a vertex of the solutionBranch in directions, trying all possibilitiesWe get a search tree of depth

and

branching factor

You can think of the branching process as

guessing

 

37Slide38

Dynamic programming

38Slide39

The Set Cover problem

Input: A set family over a universe and an integer Parameter: Question: Is there a subfamily of at most sets, such that

The

subfamily

covers the universe

Set Cover parameterized by the universe size is FPTAlgorithm with running time

Based

on

dynamic

programming

 

39

 

 

 

 Slide40

Dynamic programming for Set Cover

Let We define a DP table for and

= min nr. of sets from

needed to cover

Or

if impossible

T

he value

gives the minimum size of a set cover

To

solve

the

problem

, compute using base cases and a recurrence

 40Slide41

Filling the dynamic programming table

= min nr. of sets from needed to cover Base case: if

, otherwise it is

Recursive

step:

Skip set

, or pay for

and afterwards cover

Each

entry

can

be

computed in polynomial time

entries in total

 

41Slide42

More on dynamic programming

Dynamic programming is a memory-intensive algorithmic paradigm that yields FPT algorithms in various situationsHere: dynamic programming over subsets of Later: dynamic programming over tree decompositionsResearch challenge: Determine whether the factor can be improved to

for

some

 

42