35
Solving connectivity problems parameterized by treewidth in single exponential time Marek Cygan, Marcin Pilipczuk, Michal Pilipczuk Jesper Nederlof, Dagstuhl seminar ‘Exploiting graph structure to cope with hard problems’, 2011 Johan van Rooij and Jakub Onufry Wojtaszszyk Joint work with:

Solving connectivity problems parameterized by treewidth in single exponential time Marek Cygan, Marcin Pilipczuk, Michal Pilipczuk Jesper Nederlof, Dagstuhl

Embed Size (px)

Citation preview

Page 1: Solving connectivity problems parameterized by treewidth in single exponential time Marek Cygan, Marcin Pilipczuk, Michal Pilipczuk Jesper Nederlof, Dagstuhl

Solving connectivity problems parameterized by treewidth in single exponential time

Marek Cygan, Marcin Pilipczuk, Michal Pilipczuk

Jesper Nederlof, Dagstuhl seminar ‘Exploiting graph structure to cope with hard problems’, 2011

Johan van Rooij and Jakub Onufry Wojtaszszyk

Joint work with:

Page 2: Solving connectivity problems parameterized by treewidth in single exponential time Marek Cygan, Marcin Pilipczuk, Michal Pilipczuk Jesper Nederlof, Dagstuhl

Outline

1. Definition of treewidth and           -graphs.2. Dynamic programming on           -graphs for local

problems.3. Introduction of our main result.4. The Isolation Lemma.5.                                on           -graphs using “Cut&Count’’

and the Isolation Lemma in               time.

Page 3: Solving connectivity problems parameterized by treewidth in single exponential time Marek Cygan, Marcin Pilipczuk, Michal Pilipczuk Jesper Nederlof, Dagstuhl

Treewidth

1.                         2.                                   3.               : All       containing    induce a connected subtree

A treedecomposition of graph                       is a pair              where                                      with                and     a tree with vertex set      such that:

DefinitionRefer to       as a bag.

Page 4: Solving connectivity problems parameterized by treewidth in single exponential time Marek Cygan, Marcin Pilipczuk, Michal Pilipczuk Jesper Nederlof, Dagstuhl

Treewidth

1.                         2.                                   3.               : All       containing    induce a connected subtree

A treedecomposition of graph                       is a pair              where                                      with                and     a tree with vertex set      such that:

Definition

ExampleA B C

D

F G H

E

Page 5: Solving connectivity problems parameterized by treewidth in single exponential time Marek Cygan, Marcin Pilipczuk, Michal Pilipczuk Jesper Nederlof, Dagstuhl

Treewidth

1.                         2.                                   3.               : All       containing    induce a connected subtree

A treedecomposition of graph                       is a pair              where                                      with                and     a tree with vertex set      such that:

Definition

ExampleA B C

D

F G H

E

DBA

Page 6: Solving connectivity problems parameterized by treewidth in single exponential time Marek Cygan, Marcin Pilipczuk, Michal Pilipczuk Jesper Nederlof, Dagstuhl

Treewidth

1.                         2.                                   3.               : All       containing    induce a connected subtree

A treedecomposition of graph                       is a pair              where                                      with                and     a tree with vertex set      such that:

Definition

ExampleA B C

D

F G H

E

DBA

DGB

Page 7: Solving connectivity problems parameterized by treewidth in single exponential time Marek Cygan, Marcin Pilipczuk, Michal Pilipczuk Jesper Nederlof, Dagstuhl

Treewidth

1.                         2.                                   3.               : All       containing    induce a connected subtree

A treedecomposition of graph                       is a pair              where                                      with                and     a tree with vertex set      such that:

Definition

ExampleA B C

D

F G H

ED

GB

DBA

F GD

Page 8: Solving connectivity problems parameterized by treewidth in single exponential time Marek Cygan, Marcin Pilipczuk, Michal Pilipczuk Jesper Nederlof, Dagstuhl

Treewidth

1.                         2.                                   3.               : All       containing    induce a connected subtree

A treedecomposition of graph                       is a pair              where                                      with                and     a tree with vertex set      such that:

Definition

ExampleA B C

D

F G H

ED

GB

DBA

F GD

GB E

Page 9: Solving connectivity problems parameterized by treewidth in single exponential time Marek Cygan, Marcin Pilipczuk, Michal Pilipczuk Jesper Nederlof, Dagstuhl

Treewidth

1.                         2.                                   3.               : All       containing    induce a connected subtree

A treedecomposition of graph                       is a pair              where                                      with                and     a tree with vertex set      such that:

Definition

ExampleA B C

D

F G H

ED

GB

DBA C

EB

F GD

GB E

Page 10: Solving connectivity problems parameterized by treewidth in single exponential time Marek Cygan, Marcin Pilipczuk, Michal Pilipczuk Jesper Nederlof, Dagstuhl

Treewidth

1.                         2.                                   3.               : All       containing    induce a connected subtree

A treedecomposition of graph                       is a pair              where                                      with                and     a tree with vertex set      such that:

Definition

ExampleA B C

D

F G H

ED

GB

DBA C

EB

G HE

F GD

GB E

Page 11: Solving connectivity problems parameterized by treewidth in single exponential time Marek Cygan, Marcin Pilipczuk, Michal Pilipczuk Jesper Nederlof, Dagstuhl

Treewidth

1.                         2.                                   3.               : All       containing    induce a connected subtree

A treedecomposition of graph                       is a pair              where                                      with                and     a tree with vertex set      such that:

Definition

DefinitionThe width of a treedecomposition is                               . The treewidth of a graph is the minimum width among all possible tree decompositions of G.

Page 12: Solving connectivity problems parameterized by treewidth in single exponential time Marek Cygan, Marcin Pilipczuk, Michal Pilipczuk Jesper Nederlof, Dagstuhl

Example (with   and   ):

  graphsA simplification of graphs of treewidth ~   made up for this occassion.

DefinitionA            graph                       is a graph with                                           arranged in columns                     and                                      .

So the treewidth of a            graph is at most            .

Page 13: Solving connectivity problems parameterized by treewidth in single exponential time Marek Cygan, Marcin Pilipczuk, Michal Pilipczuk Jesper Nederlof, Dagstuhl

  on   graphsTheorem[Folklore]

                                       on            graphs can be solved in                time.

Page 14: Solving connectivity problems parameterized by treewidth in single exponential time Marek Cygan, Marcin Pilipczuk, Michal Pilipczuk Jesper Nederlof, Dagstuhl

  on   graphsTheorem[Folklore]

                                       on            graphs can be solved in                time.

Proof Idea

Page 15: Solving connectivity problems parameterized by treewidth in single exponential time Marek Cygan, Marcin Pilipczuk, Michal Pilipczuk Jesper Nederlof, Dagstuhl

  on   graphsTheorem[Folklore]

                                       on            graphs can be solved in                time.

Proof

                                                    .

For                     and                define             as the maximum size of anindependent set     of                     such that                         . Then,

Use DP to compute all             and return                                

• Works for most ‘’local’’ problems.• Also extends to counting solutions.

Page 16: Solving connectivity problems parameterized by treewidth in single exponential time Marek Cygan, Marcin Pilipczuk, Michal Pilipczuk Jesper Nederlof, Dagstuhl

  on   graphsDefinition(  )

Given:            graph                      , set terminals               and integer   Asked: Does there exist      of size at most    with                        

and           connected?

Example (  ).

Page 17: Solving connectivity problems parameterized by treewidth in single exponential time Marek Cygan, Marcin Pilipczuk, Michal Pilipczuk Jesper Nederlof, Dagstuhl

  on   graphs

Example (  ).

Definition(  )Given:            graph                      , set terminals               and integer   Asked: Does there exist      of size at most    with                        

and           connected?

Page 18: Solving connectivity problems parameterized by treewidth in single exponential time Marek Cygan, Marcin Pilipczuk, Michal Pilipczuk Jesper Nederlof, Dagstuhl

  on   graphs

Example (  ).

Definition(  )Given:            graph                      , set terminals               and integer   Asked: Does there exist      of size at most    with                        

and           connected?

The straightforward dynamic programming approach needs atleast     timesteps!

Page 19: Solving connectivity problems parameterized by treewidth in single exponential time Marek Cygan, Marcin Pilipczuk, Michal Pilipczuk Jesper Nederlof, Dagstuhl

Cut&Count for  

Theorem                                on            graphs can be solved in                time.

TheoremActually, the orginal and more precise version is:

There exists a Monte-Carlo algorithm that given a graph                       and tree decomposition of width   solves                                in                   time. The algorithm cannot give false positives and givesfalse negatives with probability at most   .

Page 20: Solving connectivity problems parameterized by treewidth in single exponential time Marek Cygan, Marcin Pilipczuk, Michal Pilipczuk Jesper Nederlof, Dagstuhl

The Isolation Lemma

Given a set family                 over a universe     and weight function                                       ,     isolates      if there is a unique              such that                                            .

Definition           denotes                  

Page 21: Solving connectivity problems parameterized by treewidth in single exponential time Marek Cygan, Marcin Pilipczuk, Michal Pilipczuk Jesper Nederlof, Dagstuhl

The Isolation Lemma

Given a set family                 over a universe     and weight function                                       ,     isolates      if there is a unique              such that                                            .

Definition           denotes                  

Lemma[Mulmuley et al., STOC 87]For every element            , choose                                     independently and uniformly at random, then:

                                                .

Page 22: Solving connectivity problems parameterized by treewidth in single exponential time Marek Cygan, Marcin Pilipczuk, Michal Pilipczuk Jesper Nederlof, Dagstuhl

The Isolation Lemma

Given a set family                 over a universe     and weight function                                       ,     isolates      if there is a unique              such that                                            .

Definition           denotes                  

Lemma[Mulmuley et al., STOC 87]For every element            , choose                                     independently and uniformly at random, then:

                                                .

Page 23: Solving connectivity problems parameterized by treewidth in single exponential time Marek Cygan, Marcin Pilipczuk, Michal Pilipczuk Jesper Nederlof, Dagstuhl

The Isolation Lemma

Proof• Define                                                                        .

                                                                                                                                                

• So then                                                                                    .• This happens with probability at most       by union bound.

• Notice         does not depend on         .• Thus,                                        for a fixed            .

   • Now assume                       are both minimizers, and                      :

Lemma[Mulmuley et al., STOC 87]For every element            , choose                                     independently and uniformly at random, then:

                                                .

Page 24: Solving connectivity problems parameterized by treewidth in single exponential time Marek Cygan, Marcin Pilipczuk, Michal Pilipczuk Jesper Nederlof, Dagstuhl

Definition (The “Cut” part)

Cut&Count for   Theorem

                               on            graphs can be solved in                time.

The set of relaxed solutions     :

the set of solutions    :

                                            ,

                                                    .

                                                         Let              be an arbitrarily terminal. The set of cut solutions    is

                                                      .

Page 25: Solving connectivity problems parameterized by treewidth in single exponential time Marek Cygan, Marcin Pilipczuk, Michal Pilipczuk Jesper Nederlof, Dagstuhl

Example of A cut solution

Example (  ).    

Page 26: Solving connectivity problems parameterized by treewidth in single exponential time Marek Cygan, Marcin Pilipczuk, Michal Pilipczuk Jesper Nederlof, Dagstuhl

Example of A cut solution

Example (  ).    

Page 27: Solving connectivity problems parameterized by treewidth in single exponential time Marek Cygan, Marcin Pilipczuk, Michal Pilipczuk Jesper Nederlof, Dagstuhl

Example of A cut solution

Example (  ).    

Red: in      Green: in      

Page 28: Solving connectivity problems parameterized by treewidth in single exponential time Marek Cygan, Marcin Pilipczuk, Michal Pilipczuk Jesper Nederlof, Dagstuhl

Example of A cut solution

Example (  ).    

Red: in      Green: in      

Page 29: Solving connectivity problems parameterized by treewidth in single exponential time Marek Cygan, Marcin Pilipczuk, Michal Pilipczuk Jesper Nederlof, Dagstuhl

Cut&Count for  

Observation                                   .

                                                         

Recall the set of cut solutions    :

                                                      .

Aha! So suppose we just want to know where there is an even number of solutions, does it help to count                       ?

                                       Proof

Page 30: Solving connectivity problems parameterized by treewidth in single exponential time Marek Cygan, Marcin Pilipczuk, Michal Pilipczuk Jesper Nederlof, Dagstuhl

The count partLemma

     can be computed in                time.

Proof sketchFor                     and                         such that                          , define                       as the number of cut solutions of                    .

Write a recurrence relation expressing              in terms of                 .

Compute all table entries using dynamic programming and read of the answer from the               entries.

Corollary                        can be computed in                time.

Page 31: Solving connectivity problems parameterized by treewidth in single exponential time Marek Cygan, Marcin Pilipczuk, Michal Pilipczuk Jesper Nederlof, Dagstuhl

Using Isolation lemmaDefinition

.

Given a set family                 and weight    , let        be

• Recall               , and            .

1. Let                                            be chosen independently and uniformly at random

2. For every                             compute                           and return         iff a one is encountered.

Algorithm

• If         is odd for some    , we know     is non-empty and can safely return        .

• If     was non-empty, the isolation lemma tells that                (namely the smallest for which                  ) for some     with probability at least   .

Page 32: Solving connectivity problems parameterized by treewidth in single exponential time Marek Cygan, Marcin Pilipczuk, Michal Pilipczuk Jesper Nederlof, Dagstuhl

Using Isolation lemma

• Recall               , and            .

1. Let                                            be chosen independently and uniformly at random

2. For every                             compute                           and return         iff a one is encountered.

• If         is odd for some    , we know     is non-empty and can safely return        .

• If     was non-empty, the isolation lemma tells that                (namely the smallest for which                  ) for some     with probability at least   .

Algorithm

Lemma(recalled)For every element            , choose                                     independently and uniformly at random, then:

                                                .

Page 33: Solving connectivity problems parameterized by treewidth in single exponential time Marek Cygan, Marcin Pilipczuk, Michal Pilipczuk Jesper Nederlof, Dagstuhl

                                                              

Adding weights

Observation                                        .

Recall the set of cut solutions    :

                                                      .

Proof

                                          

Page 34: Solving connectivity problems parameterized by treewidth in single exponential time Marek Cygan, Marcin Pilipczuk, Michal Pilipczuk Jesper Nederlof, Dagstuhl

Adding weightsLemma

For any    ,         can be computed in                time.

Proof sketchFor                    ,      and                         such that                          , define                             as the number of cut solutions of weight      of                    .Write a recurrence relation expressing              in terms of                 . Compute all table entries using dynamic programming and read off the answer from the               entries.

Page 35: Solving connectivity problems parameterized by treewidth in single exponential time Marek Cygan, Marcin Pilipczuk, Michal Pilipczuk Jesper Nederlof, Dagstuhl

ConclusionsTheorem

                               on            graphs can be solved in                time.

• In the paper we obtained lots of other results.• We ask many open problems, but maybe the best one is:

Is it possible to solve connectivity problems parameterized by treewidth in single-exponential time in a deterministic, more intuitive way?

For example, is there some structure present that allows us to always ignore many partial solutions?

Thanks for listening!