Listing all fixed-length simple cycles in sparse graphs in optimal - - PowerPoint PPT Presentation

listing all fixed length simple cycles in sparse graphs
SMART_READER_LITE
LIVE PREVIEW

Listing all fixed-length simple cycles in sparse graphs in optimal - - PowerPoint PPT Presentation

Listing all fixed-length simple cycles in sparse graphs in optimal time George Manoussakis Universit e Paris Saclay, Universit e Paris Sud, LRI-CNRS, France G. Manoussakis Listing all fixed-length simple cycles 1 / 19 Introduction Input


slide-1
SLIDE 1

Listing all fixed-length simple cycles in sparse graphs in

  • ptimal time

George Manoussakis

Universit´ e Paris Saclay, Universit´ e Paris Sud, LRI-CNRS, France

  • G. Manoussakis

Listing all fixed-length simple cycles 1 / 19

slide-2
SLIDE 2

Introduction

Input object: a graph G = (V , E) a graph: |V | = n vertices and |E| = m edges.

  • G. Manoussakis

Listing all fixed-length simple cycles 2 / 19

slide-3
SLIDE 3

Question: find all (induced) subgraphs with some property induced subgraph subgraph

  • G. Manoussakis

Listing all fixed-length simple cycles 3 / 19

slide-4
SLIDE 4

Example: find all cycles of length four

  • G. Manoussakis

Listing all fixed-length simple cycles 4 / 19

slide-5
SLIDE 5

Example: find all cycles of length four

  • G. Manoussakis

Listing all fixed-length simple cycles 4 / 19

slide-6
SLIDE 6

Introduction - k-degenerate graphs

Definition (k-degenerate graphs) Graph k-degenerate if k is smallest integer such that: every induced subgraph has a vertex of degree at most k,

  • r equivalently
  • G. Manoussakis

Listing all fixed-length simple cycles 5 / 19

slide-7
SLIDE 7

Introduction - k-degenerate graphs

Definition (k-degenerate graphs) Graph k-degenerate if k is smallest integer such that: every induced subgraph has a vertex of degree at most k,

  • r equivalently

it has acyclic orientation in which every vertex has out-degree bounded by k

  • G. Manoussakis

Listing all fixed-length simple cycles 5 / 19

slide-8
SLIDE 8

Introduction - k-degenerate graphs

Definition (k-degenerate graphs) Graph k-degenerate if k is smallest integer such that: every induced subgraph has a vertex of degree at most k,

  • r equivalently

it has acyclic orientation in which every vertex has out-degree bounded by k Example:

Figure: A 3-degenerate graph and a 3-bounded orientation

  • G. Manoussakis

Listing all fixed-length simple cycles 5 / 19

slide-9
SLIDE 9

Introduction - k-degenerate graphs

Why degenerate graphs

  • G. Manoussakis

Listing all fixed-length simple cycles 6 / 19

slide-10
SLIDE 10

Introduction - k-degenerate graphs

Why degenerate graphs generalize many graphs: planar graphs 5-degenerate, trees 1-degenerate, Barab´ asi-Albert graphs etc.

  • G. Manoussakis

Listing all fixed-length simple cycles 6 / 19

slide-11
SLIDE 11

Introduction - k-degenerate graphs

Why degenerate graphs generalize many graphs: planar graphs 5-degenerate, trees 1-degenerate, Barab´ asi-Albert graphs etc. many real world graphs have low degeneracy Graph n m k citationCiteseer 268,495 1.1M 15 Flickr 1.72M 15.6M 568 uk-2002 18M 261M 943 Twitter 41.7M 1.20B 2490

  • G. Manoussakis

Listing all fixed-length simple cycles 6 / 19

slide-12
SLIDE 12

Introduction - k-degenerate graphs

Why degenerate graphs generalize many graphs: planar graphs 5-degenerate, trees 1-degenerate, Barab´ asi-Albert graphs etc. many real world graphs have low degeneracy Graph n m k citationCiteseer 268,495 1.1M 15 Flickr 1.72M 15.6M 568 uk-2002 18M 261M 943 Twitter 41.7M 1.20B 2490 theoretical/practical

  • G. Manoussakis

Listing all fixed-length simple cycles 6 / 19

slide-13
SLIDE 13

Input: graph G, p ∈ N Output: all cycles subgraphs of G with p vertices (without duplicates)

  • G. Manoussakis

Listing all fixed-length simple cycles 7 / 19

slide-14
SLIDE 14

Input: graph G, p ∈ N Output: all cycles subgraphs of G with p vertices (without duplicates) This talk: O(n⌊p/2⌋k⌈p/2⌉)

  • G. Manoussakis

Listing all fixed-length simple cycles 7 / 19

slide-15
SLIDE 15

Input: graph G, p ∈ N Output: all cycles subgraphs of G with p vertices (without duplicates) This talk: O(n⌊p/2⌋k⌈p/2⌉) worst case output size optimal: ∀k, p and n ≥ kp, ∃ n-order k-degenerate graph with Ω(n⌊p/2⌋k⌈p/2⌉) p-cycles.

  • G. Manoussakis

Listing all fixed-length simple cycles 7 / 19

slide-16
SLIDE 16

Input: graph G, p ∈ N Output: all cycles subgraphs of G with p vertices (without duplicates) This talk: O(n⌊p/2⌋k⌈p/2⌉) worst case output size optimal: ∀k, p and n ≥ kp, ∃ n-order k-degenerate graph with Ω(n⌊p/2⌋k⌈p/2⌉) p-cycles. space optimal:

  • nly requires memory needed to store the graph
  • G. Manoussakis

Listing all fixed-length simple cycles 7 / 19

slide-17
SLIDE 17

Related work: 1 cycle:

  • G. Manoussakis

Listing all fixed-length simple cycles 8 / 19

slide-18
SLIDE 18

Related work: 1 cycle: C3 in planar graphs in linear time [Papadimitriou et al. ’81]

  • G. Manoussakis

Listing all fixed-length simple cycles 8 / 19

slide-19
SLIDE 19

Related work: 1 cycle: C3 in planar graphs in linear time [Papadimitriou et al. ’81] C3 and C4 in planar and degenerate in linear time [Chiba et al. ’85], [Chrobak et al. ’91]

  • G. Manoussakis

Listing all fixed-length simple cycles 8 / 19

slide-20
SLIDE 20

Related work: 1 cycle: C3 in planar graphs in linear time [Papadimitriou et al. ’81] C3 and C4 in planar and degenerate in linear time [Chiba et al. ’85], [Chrobak et al. ’91] C5 and C6 in planar in O(n log n) [Richardson et al. ’86]

  • G. Manoussakis

Listing all fixed-length simple cycles 8 / 19

slide-21
SLIDE 21

Related work: 1 cycle: C3 in planar graphs in linear time [Papadimitriou et al. ’81] C3 and C4 in planar and degenerate in linear time [Chiba et al. ’85], [Chrobak et al. ’91] C5 and C6 in planar in O(n log n) [Richardson et al. ’86] Any length general and degenerate graphs [Alon et al. ’97] for induced cycles : [Cai et al. ’06]

  • G. Manoussakis

Listing all fixed-length simple cycles 8 / 19

slide-22
SLIDE 22

Related work: all cycles fixed length:

  • G. Manoussakis

Listing all fixed-length simple cycles 9 / 19

slide-23
SLIDE 23

Related work: all cycles fixed length: any length in planar graphs in O(occurences) [Eppstein ’95]

  • G. Manoussakis

Listing all fixed-length simple cycles 9 / 19

slide-24
SLIDE 24

Related work: all cycles fixed length: any length in planar graphs in O(occurences) [Eppstein ’95] cycles of length 4 and 5 in degenerate graphs in O(occurences) [Kowalik ’03]

  • G. Manoussakis

Listing all fixed-length simple cycles 9 / 19

slide-25
SLIDE 25

Related work: all cycles fixed length: any length in planar graphs in O(occurences) [Eppstein ’95] cycles of length 4 and 5 in degenerate graphs in O(occurences) [Kowalik ’03] any length in general graphs, randomized in O(f ∗ occurences) with f time to find one occurence [Meeks ’16].

  • G. Manoussakis

Listing all fixed-length simple cycles 9 / 19

slide-26
SLIDE 26

Related work: all cycles fixed length: any length in planar graphs in O(occurences) [Eppstein ’95] cycles of length 4 and 5 in degenerate graphs in O(occurences) [Kowalik ’03] any length in general graphs, randomized in O(f ∗ occurences) with f time to find one occurence [Meeks ’16]. this talk: deterministic worst case output size optimal for any length in degenerate graphs in O(n⌊p/2⌋k⌈p/2⌉)

  • G. Manoussakis

Listing all fixed-length simple cycles 9 / 19

slide-27
SLIDE 27

Outline of the algorithm: given a k-degenerate graph Construct an acyclic orientation of the graph with out-degree bounded by k

  • G. Manoussakis

Listing all fixed-length simple cycles 10 / 19

slide-28
SLIDE 28

Outline of the algorithm: given a k-degenerate graph Construct an acyclic orientation of the graph with out-degree bounded by k Prove that any cycle can be decomposed into small easily computable parts

  • G. Manoussakis

Listing all fixed-length simple cycles 10 / 19

slide-29
SLIDE 29

Outline of the algorithm: given a k-degenerate graph Construct an acyclic orientation of the graph with out-degree bounded by k Prove that any cycle can be decomposed into small easily computable parts Form all possible cycles by computing all these possible parts and their possible combinations

  • G. Manoussakis

Listing all fixed-length simple cycles 10 / 19

slide-30
SLIDE 30

Outline of the algorithm: given a k-degenerate graph Construct an acyclic orientation of the graph with out-degree bounded by k Prove that any cycle can be decomposed into small easily computable parts Form all possible cycles by computing all these possible parts and their possible combinations Using properties of the decomposition output each cycle exactly once

  • G. Manoussakis

Listing all fixed-length simple cycles 10 / 19

slide-31
SLIDE 31
  • G. Manoussakis

Listing all fixed-length simple cycles 11 / 19

slide-32
SLIDE 32

Acyclic orientation: ∃ some vertex with two out-going edges

  • G. Manoussakis

Listing all fixed-length simple cycles 11 / 19

slide-33
SLIDE 33
  • G. Manoussakis

Listing all fixed-length simple cycles 12 / 19

slide-34
SLIDE 34
  • G. Manoussakis

Listing all fixed-length simple cycles 13 / 19

slide-35
SLIDE 35
  • G. Manoussakis

Listing all fixed-length simple cycles 14 / 19

slide-36
SLIDE 36

Definition (t-path) t-path of size (i, j) : two oriented paths of length i and j starting from the same vertex

  • G. Manoussakis

Listing all fixed-length simple cycles 15 / 19

slide-37
SLIDE 37

Definition (t-path) t-path of size (i, j) : two oriented paths of length i and j starting from the same vertex Remark in k-degenerate graphs, at most nki+j such paths

  • G. Manoussakis

Listing all fixed-length simple cycles 15 / 19

slide-38
SLIDE 38

Algorithm: brute force is optimal input: graph G k-degenerate

  • G. Manoussakis

Listing all fixed-length simple cycles 16 / 19

slide-39
SLIDE 39

Algorithm: brute force is optimal input: graph G k-degenerate

  • 1. Compute all possible acyclic orientations of a p-length simple cycle
  • G. Manoussakis

Listing all fixed-length simple cycles 16 / 19

slide-40
SLIDE 40

Algorithm: brute force is optimal input: graph G k-degenerate

  • 1. Compute all possible acyclic orientations of a p-length simple cycle
  • 2. For each orientation find a t-path decomposition t1, t2, ..., tr
  • G. Manoussakis

Listing all fixed-length simple cycles 16 / 19

slide-41
SLIDE 41

Algorithm: brute force is optimal input: graph G k-degenerate

  • 1. Compute all possible acyclic orientations of a p-length simple cycle
  • 2. For each orientation find a t-path decomposition t1, t2, ..., tr
  • 3. Compute all possible t-paths of size |t1|, |t2|, ..., |tr| in G.
  • G. Manoussakis

Listing all fixed-length simple cycles 16 / 19

slide-42
SLIDE 42

Algorithm: brute force is optimal input: graph G k-degenerate

  • 1. Compute all possible acyclic orientations of a p-length simple cycle
  • 2. For each orientation find a t-path decomposition t1, t2, ..., tr
  • 3. Compute all possible t-paths of size |t1|, |t2|, ..., |tr| in G.
  • 4. Construct all possible combinations of these t-paths in time

N(|t1|) ∗ N(|t2|) ∗ ... ∗ N(|tr|)

  • G. Manoussakis

Listing all fixed-length simple cycles 16 / 19

slide-43
SLIDE 43

Algorithm: brute force is optimal input: graph G k-degenerate

  • 1. Compute all possible acyclic orientations of a p-length simple cycle
  • 2. For each orientation find a t-path decomposition t1, t2, ..., tr
  • 3. Compute all possible t-paths of size |t1|, |t2|, ..., |tr| in G.
  • 4. Construct all possible combinations of these t-paths in time

N(|t1|) ∗ N(|t2|) ∗ ... ∗ N(|tr|)

  • 5. For each combination: check if it is a cycle + uniqueness
  • G. Manoussakis

Listing all fixed-length simple cycles 16 / 19

slide-44
SLIDE 44

Algorithm: brute force is optimal input: graph G k-degenerate

  • 1. Compute all acyclic orientations of a p-length simple cycle
  • 2. For each orientation find a t-path decomposition t1, t2, ..., tr
  • 3. Compute all possible t-paths of size |t1|, |t2|, ..., |tr| in G
  • 4. Construct all possible combinations of these t-paths in time

N(t1) ∗ N(t2) ∗ ... ∗ N(tr)

  • 5. For each combination: check if it is a cycle + uniqueness

Complexity?

  • G. Manoussakis

Listing all fixed-length simple cycles 17 / 19

slide-45
SLIDE 45

Algorithm: brute force is optimal input: graph G k-degenerate

  • 1. Compute all acyclic orientations of a p-length simple cycle O(2p)
  • 2. For each orientation find a t-path decomposition t1, t2, ..., tr
  • 3. Compute all possible t-paths of size |t1|, |t2|, ..., |tr| in G
  • 4. Construct all possible combinations of these t-paths in time

N(t1) ∗ N(t2) ∗ ... ∗ N(tr)

  • 5. For each combination: check if it is a cycle + uniqueness

Complexity?

  • G. Manoussakis

Listing all fixed-length simple cycles 17 / 19

slide-46
SLIDE 46

Algorithm: brute force is optimal input: graph G k-degenerate

  • 1. Compute all acyclic orientations of a p-length simple cycle O(2p)
  • 2. For each orientation find a t-path decomposition t1, t2, ..., tr O(p)
  • 3. Compute all possible t-paths of size |t1|, |t2|, ..., |tr| in G
  • 4. Construct all possible combinations of these t-paths in time

N(t1) ∗ N(t2) ∗ ... ∗ N(tr)

  • 5. For each combination: check if it is a cycle + uniqueness

Complexity?

  • G. Manoussakis

Listing all fixed-length simple cycles 17 / 19

slide-47
SLIDE 47

Algorithm: brute force is optimal input: graph G k-degenerate

  • 1. Compute all acyclic orientations of a p-length simple cycle O(2p)
  • 2. For each orientation find a t-path decomposition t1, t2, ..., tr O(p)
  • 3. Compute all possible t-paths of size |t1|, |t2|, ..., |tr| in G O(nkp)
  • 4. Construct all possible combinations of these t-paths in time

N(t1) ∗ N(t2) ∗ ... ∗ N(tr)

  • 5. For each combination: check if it is a cycle + uniqueness

Complexity?

  • G. Manoussakis

Listing all fixed-length simple cycles 17 / 19

slide-48
SLIDE 48

Algorithm: brute force is optimal input: graph G k-degenerate

  • 1. Compute all acyclic orientations of a p-length simple cycle O(2p)
  • 2. For each orientation find a t-path decomposition t1, t2, ..., tr O(p)
  • 3. Compute all possible t-paths of size |t1|, |t2|, ..., |tr| in G O(nkp)
  • 4. Construct all possible combinations of these t-paths in time

N(t1) ∗ N(t2) ∗ ... ∗ N(tr) O(nrkp)

  • 5. For each combination: check if it is a cycle + uniqueness

Complexity?

  • G. Manoussakis

Listing all fixed-length simple cycles 17 / 19

slide-49
SLIDE 49

Algorithm: brute force is optimal input: graph G k-degenerate

  • 1. Compute all acyclic orientations of a p-length simple cycle O(2p)
  • 2. For each orientation find a t-path decomposition t1, t2, ..., tr O(p)
  • 3. Compute all possible t-paths of size |t1|, |t2|, ..., |tr| in G O(nkp)
  • 4. Construct all possible combinations of these t-paths in time

N(t1) ∗ N(t2) ∗ ... ∗ N(tr) O(nrkp)

  • 5. For each combination: check if it is a cycle + uniqueness O(p)

Complexity?

  • G. Manoussakis

Listing all fixed-length simple cycles 17 / 19

slide-50
SLIDE 50

Algorithm: brute force is optimal input: graph G k-degenerate

  • 1. Compute all acyclic orientations of a p-length simple cycle O(2p)
  • 2. For each orientation find a t-path decomposition t1, t2, ..., tr O(p)
  • 3. Compute all possible t-paths of size |t1|, |t2|, ..., |tr| in G O(nkp)
  • 4. Construct all possible combinations of these t-paths in time

N(t1) ∗ N(t2) ∗ ... ∗ N(tr) O(nrkp)

  • 5. For each combination: check if it is a cycle + uniqueness O(p)

total time: O(nrkp)

  • G. Manoussakis

Listing all fixed-length simple cycles 17 / 19

slide-51
SLIDE 51

Algorithm: brute force is optimal input: graph G k-degenerate

  • 1. Compute all acyclic orientations of a p-length simple cycle O(2p)
  • 2. For each orientation find a t-path decomposition t1, t2, ..., tr O(p)
  • 3. Compute all possible t-paths of size |t1|, |t2|, ..., |tr| in G O(nkp)
  • 4. Construct all possible combinations of these t-paths in time

N(t1) ∗ N(t2) ∗ ... ∗ N(tr) O(nrkp)

  • 5. For each combination: check if it is a cycle + uniqueness O(p)

total time: O(nrkp) + r ≤ ⌊p/2⌋ = ⇒ O(n⌊p/2⌋kp)

  • G. Manoussakis

Listing all fixed-length simple cycles 17 / 19

slide-52
SLIDE 52

Algorithm: brute force is optimal input: graph G k-degenerate

  • 1. Compute all acyclic orientations of a p-length simple cycle O(2p)
  • 2. For each orientation find a t-path decomposition t1, t2, ..., tr O(p)
  • 3. Compute all possible t-paths of size |t1|, |t2|, ..., |tr| in G O(nkp)
  • 4. Construct all possible combinations of these t-paths in time

N(t1) ∗ N(t2) ∗ ... ∗ N(tr) O(nrkp)

  • 5. For each combination: check if it is a cycle + uniqueness O(p)

total time: O(nrkp) + r ≤ ⌊p/2⌋ = ⇒ O(n⌊p/2⌋kp) + fine tuning = ⇒ O(n⌊p/2⌋k⌈p/2⌉)

  • G. Manoussakis

Listing all fixed-length simple cycles 17 / 19

slide-53
SLIDE 53

Proof of optimality: (for k, p even)

  • G. Manoussakis

Listing all fixed-length simple cycles 18 / 19

slide-54
SLIDE 54

Proof of optimality: (for k, p even)

Figure: sets Ki of size k/2, sets Li of size h ≥ k

graph is k-degenerate

  • G. Manoussakis

Listing all fixed-length simple cycles 18 / 19

slide-55
SLIDE 55

Proof of optimality: (for k, p even)

Figure: sets Ki of size k/2, sets Li of size h ≥ k

graph is k-degenerate number of vertices: n = p

2 k 2 + h p 2 =

⇒ h = Θ(n) if n ≥ kp

  • G. Manoussakis

Listing all fixed-length simple cycles 18 / 19

slide-56
SLIDE 56

Proof of optimality: (for k, p even)

Figure: sets Ki of size k/2, sets Li of size h ≥ k

graph is k-degenerate number of vertices: n = p

2 k 2 + h p 2 =

⇒ h = Θ(n) if n ≥ kp number of cycles: ( k

2)p/2hp/2 = Ω(kp/2np/2)

  • G. Manoussakis

Listing all fixed-length simple cycles 18 / 19

slide-57
SLIDE 57

Open problems: List p-cycles in k-degenerate graphs in O(occurences) ? enumerating p-cycles takes time O(n⌊p/2⌋k⌈p/2⌉) how much faster is counting

for general graphs: O(nω) [Alon et al. ’97] for cycles length ≤ 7 O(n⌈p/2⌉+3) [Vassilevska et al. ’09] O(n0.45p+O(1)) [Bjorklund et al. ’14]

what if we do not print cycles ? O(nk2) for C4, [Chiba et al. ’85] O(nk3) for C5, [Kowalik ’03]

  • ptimal complexity is attained assuming adjacency matrix, if only

adjacency list then O(n⌊p/2⌋k⌈p/2⌉ log k)

  • G. Manoussakis

Listing all fixed-length simple cycles 19 / 19