Interaction Between Input and Output-Sensitive Really? Mamadou M. Kanté Université Blaise Pascal - LIMOS, CNRS Enumeration Algorithms Using Structure, Lorentz Institute, August 26 th, 2015 1
Introduction 1 Exact Exponential Time Algorithms for NP-complete: A natural algorithm is a listing of all the solutions. = bounding the # solutions (lower and upper bounds). 2 In several areas we want to list (or even count) the solutions. Databases: solution to an SQL query typically asks for the set of entries satisfying some statements, Data mining, Biology: all the items (up to some frequency) are needed for deciding, AI, monotone dualisation: transforming a monotone CNF formula into a DNF one. 2
Introduction Seemingly same objectives, difference in the notion of a good algorithm. 1 Input-Sensitive: A good algorithm has a moderately exponential running time. Techniques to list and allow to obtain upper bounds. Techniques to show that a better algorithm should perform differently (lower bounds). 2 Output-sensitive: An upper bound on the running time is not really important. A good algorithm outputs each solution exactly once and nothing else. = How to measure the time complexity? 3
Complexity measures: Input-Sensitive Size of Input and output. n Branch and Reduce technique: Branching rules modifying the instance into 2 subproblems. Branching rules are usually given with a preference order. The execution of the algorithm gives rise to a search tree, the leaves of which correspond to a super set of the solutions. The time complexity is measured by recurrence relations depending on an analysis of the calls to subproblems. If a linear recurrence relation and α is the positive root of the characteristic polynomial, then time O (α n ). A finer analysis combined with induction gives usually better upper bounds (than time complexity) on the # solutions. 4
Complexity measures: Output-Sensitive Size of Input. n Size of Output. m Time complexity is measured wrt n and m: output-polynomial: O((n + m) k ) polynomial delay: delay between two consecutive outputs is bounded polynomially on n incremental: delay polynomial in the number of the already computed objects and n. 5
Complexity measures: Output-Sensitive Size of Input. n Size of Output. m Time complexity is measured wrt n and m: output-polynomial: O((n + m) k ) polynomial delay: delay between two consecutive outputs is bounded polynomially on n incremental: delay polynomial in the number of the already computed objects and n. polynomial delay incremental output-polynomial 5
Complexity measures: Output-Sensitive Size of Input. n Size of Output. m Time complexity is measured wrt n and m: output-polynomial: O((n + m) k ) polynomial delay: delay between two consecutive outputs is bounded polynomially on n incremental: delay polynomial in the number of the already computed objects and n. polynomial delay incremental output-polynomial General technique: A spanning forest in a graph of solutions. 5
General Question 1 Output polynomial algorithms exist for several optimal subsets, but we do not have a (nearly) tight bound. minimal separators, minimal dominating sets in chordal graphs, minimal feedback vertex sets, minimal hull sets, etc. 2 On the other side for some optimal subsets, a (nearly) tight bound is known, but no known output polynomial algorithm. minimal dominating sets in co-bipartite graphs, minimal subset feedback vertex sets in chordal graphs, minimal connected dominating sets in split graphs, etc. 6
General Question 1 Output polynomial algorithms exist for several optimal subsets, but we do not have a (nearly) tight bound. minimal separators, minimal dominating sets in chordal graphs, minimal feedback vertex sets, minimal hull sets, etc. 2 On the other side for some optimal subsets, a (nearly) tight bound is known, but no known output polynomial algorithm. minimal dominating sets in co-bipartite graphs, minimal subset feedback vertex sets in chordal graphs, minimal connected dominating sets in split graphs, etc. Can we explain this situation? Do we have examples where similar approaches yield an output-polynomial algorithm and a tight bound? 6
Why linking input and output-sensitive Worlds? Enumeration algorithms are used as subroutines in several Exact Exponential algorithms. computing tree-width, a maximum induced subgraph of bounded tree-width, the chromatic number of a graph, etc. An upper bound (or better a tight bound) yields better analysis of the worst case running time. For the sake of combinatorics, can we unify both worlds? maximal independent sets, spanning trees, etc. 7
Plan 1 School Case: Maximal Independent Set 2 MSOL and Clique-Width 3 Minimal Dominating Sets 4 Conclusion 8
School Case : Maximal Independent Set (1) # maximal independent sets bounded by 3 n/3 [MoonM65]. Original proof by induction that lists all the solutions. the bound is tight: take n 3 copies of triangles. Several polynomial delay algorithms for listing the maximal independent sets [TsukiyamaIAS77]. 1 Order the vertices in 1, 2,..., n. 2 Let S j the set of maximal independent sets within {1,..., j}. 3 Compute S j from S j 1 with the following parent-child relation: I is a child of I S j 1 if I := I \ N(j) {j} is maximal. 4 The enumeration follows in a DFS manner this tree. 9
10 School Case: Maximal Independent Set (2) A single algorithm for the two goals [Kratsch07,Wood11] For a vertex x, any maximal independent set I intersects N[x]. Let x be a vertex of minimum degree d. The algorithm consists in listing the maximal independent sets in G \ N[y] for each y N[x]. In order to avoid redundancies, it suffices to order the vertices and use the following fact: x and y are in the same maximal independent sets if and only if they are false twins. x is in all maximal independent sets only if it is a single vertex. If the neighbours of x are y 1,..., y d, avoid maximal independent sets containing y j<i in G \ N[y i ].
11 School Case: Maximal Independent Set (3) List the maximal independent sets of G \ N[y] for each y N[x]. 3 n/3 if n%3 = 0, g(n) := 4 3 (n 4)/3 if n%3 = 1, 2 3 (n 2)/3 if n%3 = 2. MIS(G) y N[x] MIS(G \ N[y]). By induction, MIS(G) (d + 1) g(n d 1). Then 4 3 (n 4)/3 MIS(G) 3 n/3. By case analysis on d and n%3, one deduces that MIS(G) g(n).
School Case: Maximal Independent Set (4) Similarly for maximal cliques and minimal vertex covers.? C a clique in G if and only if C an independent set in G.? C a vertex cover if and only if V \ C an independent set. Similarly for induced bicliques [GaspersKL12].? B is an induced biclique if and only if B \ {v} is an independent set of Gv for some v B. 12
13 Plan 1 School Case: Maximal Independent Set 2 MSOL and Clique-Width 3 Minimal Dominating Sets 4 Conclusion
14 Courcelle s Theorem Clique-width operations. MSOL formulas Disjoint union of two graphs, addition of edges between i-vertices and j-vertices, renaming i-vertices into j-vertices, creation of an i-vertex, i k. x X, edg(x, y). x.ϕ(x), x.ϕ(x). X.ϕ(X), X.ϕ(X). Negations, conjunctions, disjunctions. Theorem([Courcelle09]) Let k be a positive integer and ϕ(x 1,..., X p ) be an MSOL formula. For a given graph G of clique-width k, after a pre-processing in cubic time, one can compute in linear time and lists with linear delay the set {(A 1,..., A p ) G = ϕ(a 1,..., A p )}.
15 AND-OR DAGS An AND-OR DAG is a DAG G such that 1 V G is given with a partition into AND-vertices and OR-vertices. 2 no OR-vertex can have two parallel outgoing arcs. 3 terminals are AND-vertices.
15 AND-OR DAGS An AND-OR DAG is a DAG G such that 1 V G is given with a partition into AND-vertices and OR-vertices. 2 no OR-vertex can have two parallel outgoing arcs. 3 terminals are AND-vertices. The set of trees EMB(G, x) embedded at a vertex x of G is 1 EMB(G, x) = {x} if x is a terminal vertex. 2 EMB(G, x) = {x(t ) T EMB(G, y), y a son of x} if x an OR-vertex. 3 EMB(G, x) = {x(t 1,..., T p ) T i EMB(G, y i ) with y 1,..., y p the sons of x} if x is an AND-vertex.
16 AND-OR DAGS The set of trees EMB(G, x) embedded at a vertex x of G is 1 EMB(G, x) = {x} if x is a terminal vertex. 2 EMB(G, x) = {x(t ) T EMB(G, y), y a son of x} if x an OR-vertex. 3 EMB(G, x) = {x(t 1,..., T p) T i EMB(G, y i ) with y 1,..., y p the sons of x} if x is an AND-vertex. Theorem [Courcelle09] 1 EMB(G, x) can be computed in time linear in the sub-dag rooted at x. 2 EMB(G, x) can be listed with linear delay.
17 Courcelle s Theorem (Proof Sketch) Solutions := {(A 1,..., A p ) G = ϕ(a 1,..., A p )}. 1 Take a term t defining G and using f(k) colours [Oum08] 2 Take the tree-automata A ϕ corresponding to ϕ (can be constructed in time O(g(k, qr(ϕ))) 3 Construct an AND-OR DAG H from t and A ϕ such that. All the successful runs of t on A ϕ are in one-to-one correspond with EM B(H, root). 4 Do some reductions in order to remove trees that correspond to the empty solution. 5 Count and enumerate EM B(H, root).
18 As for Input-Sensitive (1) No general interesting upper-bound is known. Even for special graph classes and some famous problems. a tight bound for minimal dominating sets in trees is still open. It is not clear how to define a tight bound from Courcelle s construction. EMB(G, x) is inductive. An upper bound is probably computable similar to the #spanning trees. Can we compute a nice lower bound?
18 As for Input-Sensitive (1) No general interesting upper-bound is known. Even for special graph classes and some famous problems. a tight bound for minimal dominating sets in trees is still open. It is not clear how to define a tight bound from Courcelle s construction. EMB(G, x) is inductive. An upper bound is probably computable similar to the #spanning trees. Can we compute a nice lower bound? In terms of #AND-vertices and #OR-vertices?
19 As for Input-Sensitive (2) #EMB(G, x) to CW D( k) is unlikely.
19 As for Input-Sensitive (2) #EMB(G, x) to CW D( k) is unlikely. A graph may have several different terms.
19 As for Input-Sensitive (2) #EMB(G, x) to CW D( k) is unlikely. A graph may have several different terms. A same property admits several different automaton, what is the right property on automaton to take into account? The precision in the delay is not needed for a (nearly) tight bound. Which nodes can be removed from the AND-OR DAG? Is Deterministic really needed? Do fly-automaton constitute a simplification?
19 As for Input-Sensitive (2) #EMB(G, x) to CW D( k) is unlikely. A graph may have several different terms. A same property admits several different automaton, what is the right property on automaton to take into account? The precision in the delay is not needed for a (nearly) tight bound. Which nodes can be removed from the AND-OR DAG? Is Deterministic really needed? Do fly-automaton constitute a simplification? Distance-Hereditary graphs have an almost canonical expression (via the split decomposition). Can we exploit this structure for some well-known problems? Dominating set? Feedback vertex set? (σ, ρ)-dominating sets?
20 Plan 1 School Case: Maximal Independent Set 2 MSOL and Clique-Width 3 Minimal Dominating Sets 4 Conclusion
21 Minimal Dominating Sets D V (G) is a dominating set in G if N[x] D x V (G) x 1 x 2 x 3 x 8 x 4 x 7 x 6 x 5 N[x] = N(x) {x} is the closed neighbourhood of x Dom-Enum = Enumeration of (inclusion-wise) minimal dominating sets.
21 Minimal Dominating Sets D V (G) is a dominating set in G if N[x] D x V (G) Trans-Enum }{{} poly-delay Dom-Enum [KanteLMN14]. Upper bound : 1.7159 n [FominGPS08]. Lower bound : 15 n/6 1.5704 n [Kratsch08] n 6 copies of the octahedron: co-(3k 2). Octahedron is a cograph!! octahederon = (1 1, 1 1, 1 1).
22 Co-graphs: A toy case Upper bound : 15 n/6 [CouturierHHK13]. By induction (n 7). D(G 1 G 2 ) = {D 1 D 2 D i D(G i )}. D(G 1 G 2 ) = D(G 1 ) D(G 2 ) {{x 1, x 2 } x i V Gi }.
22 Co-graphs: A toy case Upper bound : 15 n/6 [CouturierHHK13]. By induction (n 7). D(G 1 G 2 ) = {D 1 D 2 D i D(G i )}. D(G 1 G 2 ) = D(G 1 ) D(G 2 ) {{x 1, x 2 } x i V Gi }. Is polynomial delay by a traversal of the co-tree in a DFS manner.
23 Split Graphs (1) Linear delay algorithm for Dom-Enum in split graphs [KanteLMN14] Let G = (C, S, E) a split graph. For each D D(G), D = (D C) (S \ N(D C)).
23 Split Graphs (1) Linear delay algorithm for Dom-Enum in split graphs [KanteLMN14] Let G = (C, S, E) a split graph. For each D D(G), D = (D C) (S \ N(D C)). For X C irredundant, the set X (S \ N(X)) D(G). = f : {X C X irredundant} D(G) a bijection.
23 Split Graphs (1) Linear delay algorithm for Dom-Enum in split graphs [KanteLMN14] Let G = (C, S, E) a split graph. For each D D(G), D = (D C) (S \ N(D C)). For X C irredundant, the set X (S \ N(X)) D(G). = f : {X C X irredundant} D(G) a bijection. {X C X irredundant} is an independent system. Order the vertices of C. For X an irredundant set, Cov := {v > max(c) X v irredundant}. Recursively call the algorithm on X {v} for each v Cov.
24 Split Graphs (2) The bijection f : {X C X irredundant} D(G) a key for a tight upper bound [CouturierLL15]. Follow the same algorithm as for the polynomial delay algorithm. Order the vertices in C wrt degree in S and pick v with maximum degree in S. if N(v) S 3, then either discard v, or take v and remove v and S N(v) = (4, 1). N(v) S = {x, y} with d(x) d(y). Then do a case analysis depending on how x and y could be dominated. N(v) S = {x}. Then for all the vertices in C the degree in S is at most 1. Do the branching with respect to some x S with maximum degree in C. N(v) S =.Then G = (C, S, V (C)).
25 Chordal Graphs P 6 -free chordal graphs via completion [KanteLMN14]. Order the vertices wrt neighbourhood inclusion. Turn the minimal ones into a clique and obtain a split graph. = linear delay algorithm for Dom-Enum and a tight bound of 3 n/3.
25 Chordal Graphs P 6 -free chordal graphs via completion [KanteLMN14]. Order the vertices wrt neighbourhood inclusion. Turn the minimal ones into a clique and obtain a split graph. = linear delay algorithm for Dom-Enum and a tight bound of 3 n/3. Chordal graphs. A more complicated algorithm for Dom-Enum [KanteLMNU15]. Based on an enumeration of max antichains of max cliques. Use some special cases of the Extension Problem. Far from obtaining a tight bound [CouturierHHK13]. Upper bound 1.6181 n based on simplicial elimination. Lower bound 1.4422 n n : 3 copies of triangles.
26 IntervalGraphs [KanteLMNU13] Definition (Partial dominating set) Given a permutation over the vertices of a graph G, a subset of vertices of size k is called a partial dominating set if it corresponds to the k smallest vertices of a minimal dominating set of G. Definition (Extension of a partial dominating set) For a partial dominating set D of G of size k, we say that a partial dominating set D of size k + 1 is an extension of D if D = D {y} with y > max{x D}.
26 IntervalGraphs [KanteLMNU13] Property The extensions of a partial dominating set D of an interval graph G depend only on the two greatest vertices of D.
27 IntervalGraphs [KanteLMNU13] x 1 x 2 x 3 x 4 x 5 x 6 x 7 x 8
28 IntervalGraphs [KanteLMNU13] x 1 x 2 x 3 x 4 x 5 x 6 x 7 x 8 x 1, x 2
29 IntervalGraphs [KanteLMNU13] x 1 x 2 x 3 x 4 x 5 x 6 x 7 x 8 x 1, x 3 x 1, x 4 x 1, x 5
IntervalGraphs [KanteLMNU13] x 1 x 2 x 3 x 4 x 5 x 6 x 7 x 8 x 5, x 6 x 1, x 3 x 3, x 5 x 5, x 7 x 2, x 3 x 1, x 4 x 3, x 6 x 5, x 8 x 4, x 7 x 2, x 4 x 4, x 5 x 6, x 7 x 4, x 6 x 6, x 8 A 30
IntervalGraphs [KanteLMNU13] x 1 x 2 x 3 x 4 x 5 x 6 x 7 x 8 x 5, x 6 x 1, x 3 x 3, x 5 x 5, x 7 x 2, x 3 x 1, x 4 x 3, x 6 x 5, x 8 x 4, x 7 x 2, x 4 x 4, x 5 x 6, x 7 x 4, x 6 x 6, x 8 A 31
IntervalGraphs [KanteLMNU13] x 1 x 2 x 3 x 4 x 5 x 6 x 7 x 8 x 5, x 6 x 1, x 3 x 3, x 5 x 5, x 7 x 2, x 3 x 1, x 4 x 3, x 6 x 5, x 8 x 4, x 7 x 2, x 4 x 4, x 5 x 6, x 7 x 4, x 6 x 6, x 8 A 32
IntervalGraphs [KanteLMNU13] x 1 x 2 x 3 x 4 x 5 x 6 x 7 x 8 x 5, x 6 x 1, x 3 x 3, x 5 x 5, x 7 x 2, x 3 x 1, x 4 x 3, x 6 x 5, x 8 x 4, x 7 x 2, x 4 x 4, x 5 x 6, x 7 x 4, x 6 x 6, x 8 A 33
IntervalGraphs [KanteLMNU13] x 1 x 2 x 3 x 4 x 5 x 6 x 7 x 8 x 5, x 6 x 1, x 3 x 3, x 5 x 5, x 7 x 2, x 3 x 1, x 4 x 3, x 6 x 5, x 8 x 4, x 7 x 2, x 4 x 4, x 5 x 6, x 7 x 4, x 6 x 6, x 8 A 34
IntervalGraphs [KanteLMNU13] x 1 x 2 x 3 x 4 x 5 x 6 x 7 x 8 x 5, x 6 x 1, x 3 x 3, x 5 x 5, x 7 x 2, x 3 x 1, x 4 x 3, x 6 x 5, x 8 x 4, x 7 x 2, x 4 x 4, x 5 x 6, x 7 x 4, x 6 x 6, x 8 A 35
IntervalGraphs [KanteLMNU13] x 1 x 2 x 3 x 4 x 5 x 6 x 7 x 8 x 5, x 6 x 1, x 3 x 3, x 5 x 5, x 7 x 2, x 3 x 1, x 4 x 3, x 6 x 5, x 8 x 4, x 7 x 2, x 4 x 4, x 5 x 6, x 7 x 4, x 6 x 6, x 8 A 36
IntervalGraphs [KanteLMNU13] x 1 x 2 x 3 x 4 x 5 x 6 x 7 x 8 x 5, x 6 x 1, x 3 x 3, x 5 x 5, x 7 x 2, x 3 x 1, x 4 x 3, x 6 x 5, x 8 x 4, x 7 x 2, x 4 x 4, x 5 x 6, x 7 x 4, x 6 x 6, x 8 A 37
IntervalGraphs [KanteLMNU13] x 1 x 2 x 3 x 4 x 5 x 6 x 7 x 8 x 5, x 6 x 1, x 3 x 3, x 5 x 5, x 7 x 2, x 3 x 1, x 4 x 3, x 6 x 5, x 8 x 4, x 7 x 2, x 4 x 4, x 5 x 6, x 7 x 4, x 6 x 6, x 8 A 38
IntervalGraphs [KanteLMNU13] x 1 x 2 x 3 x 4 x 5 x 6 x 7 x 8 x 1, x 3 x 3, x 5 x 5, x 7 x 2, x 3 x 1, x 4 x 3, x 6 x 5, x 8 x 4, x 7 x 2, x 4 x 4, x 5 x 6, x 7 x 4, x 6 x 6, x 8 A 39
40 Interval Graphs [GolovachHKKV14] Same algorithm gives a tight upper bound For a partial dominating set U, let (x, y) be the two last vertices of U. Let W := {z (x, y) (y, z)} is an arc. For every possible extension U of U, U W = 1. U contains exactly a source pair (x 1, x 2 ). = A branching algorithm (t, t,..., t) }{{} of the search tree. = Taking its maximum at (3, 3, 3), i.e., 3 n/3. t if W = t for any node
41 Other Graph Classes (1) Circular-Arc Graphs [KanteLMNU14] reduction of Dom-Enum into n interval graphs. = polynomial delay for Dom-Enum and a nearly tight bound of n 3 n/3.
41 Other Graph Classes (1) Circular-Arc Graphs [KanteLMNU14] reduction of Dom-Enum into n interval graphs. = polynomial delay for Dom-Enum and a nearly tight bound of n 3 n/3. What all these graph classes share?
41 Other Graph Classes (1) Circular-Arc Graphs [KanteLMNU14] reduction of Dom-Enum into n interval graphs. = polynomial delay for Dom-Enum and a nearly tight bound of n 3 n/3. What all these graph classes share? Dom-Enum based on Flashlight (or backtracking)
42 Other Graph Classes (1) Permutation Graphs [KanteLMNU14] The extensions of a partial dominating set depend on at most 5 vertices. = A similar algorithm as for the interval for Dom-Enum. Lower bound: n 4 copies of 4-cycles. Upper bound: difficulty on computing # possible extensions.
43 Other Graph Classes (2) Output-polynomial algorithm but no tight bound. Linear structured graphs: complements of degenerate graphs, circular-permutation, trapezoid graphs, bipartite tolerance graphs, etc. Same algorithm as for interval graphs. No characterisation of partial extensions.
43 Other Graph Classes (2) Output-polynomial algorithm but no tight bound. Linear structured graphs: complements of degenerate graphs, circular-permutation, trapezoid graphs, bipartite tolerance graphs, etc. Same algorithm as for interval graphs. No characterisation of partial extensions. Structured graphs. Line graphs, chordal bipartite, unit square graphs, etc. Flipping method of Golovach et al. for the enumeration. No idea on how to get an input-sensitive one.
44 Other Graph Classes (3) Approaching better bound but nothing new for Dom-Enum. co-bipartite graphs [GolovachHK15]. A min dominating set of size 3 is included in one part. closed neighbourhood can be assumed Sperner. Upper bound : 1.3804 n. Lower bound: 4 n/5 1.3195 n : 2 disjoint cliques of size k and 4k and each x X has 4 neighbours in Y [CouturierHHK13].
44 Other Graph Classes (3) Approaching better bound but nothing new for Dom-Enum. co-bipartite graphs [GolovachHK15]. A min dominating set of size 3 is included in one part. closed neighbourhood can be assumed Sperner. Upper bound : 1.3804 n. Lower bound: 4 n/5 1.3195 n : 2 disjoint cliques of size k and 4k and each x X has 4 neighbours in Y [CouturierHHK13]. Dom-Enum in co-bipartite as general as Trans-Enum
45 Plan 1 School Case: Maximal Independent Set 2 MSOL and Clique-Width 3 Minimal Dominating Sets 4 Conclusion
46 Conclusion Output-polynomial algorithm without a (nearly) tight bound Maximal (induced) subgraphs in hereditary C. An incremental algorithm if Obs(C ) < and size(obs) <. No idea on (nearly) tight bounds. Quid of minor-closed classes? Minimal Feedback Vertex Sets. A polynomial delay algorithm for the enumeration [SchwikowskiS02]. Far from obtaining a (nearly) tight bound. As for minimal dominating sets few examples: chordal graphs, co-graphs [CouturierHHV12]. How Canonical Graph Decompositions can help? Completions?
THANK YOU!! }{{} Bound or Enum 47