Evaluation and Enumeration Problems for Regular Path Queries Wim - - PowerPoint PPT Presentation

evaluation and enumeration problems for regular path
SMART_READER_LITE
LIVE PREVIEW

Evaluation and Enumeration Problems for Regular Path Queries Wim - - PowerPoint PPT Presentation

Evaluation and Enumeration Problems for Regular Path Queries Wim Martens and Tina Trautner University of Bayreuth Practice QUERYING PATHS IN GRAPH DATABASES WIM MARTENS AND TINA TRAUTNER Graph Database d Prague a o r road road


slide-1
SLIDE 1

Evaluation and Enumeration Problems for Regular Path Queries

Wim Martens and Tina Trautner University of Bayreuth

slide-2
SLIDE 2

Practice

QUERYING PATHS IN GRAPH DATABASES

WIM MARTENS AND TINA TRAUTNER

slide-3
SLIDE 3

WIM MARTENS AND TINA TRAUTNER

Node- and Edge-labeled directed graph

Graph Database

Bayreuth Salzburg Prague Vienna Passau Munich

r

  • a

d road road road r

  • a

d road road road

r a i l

slide-4
SLIDE 4

WIM MARTENS AND TINA TRAUTNER

Warm Up Question

Bayreuth Salzburg Prague Vienna Passau Munich

How many paths from Bayreuth to Vienna match the regular path query (road)* ?

r

  • a

d road road road r

  • a

d road road road

r a i l

slide-5
SLIDE 5

WIM MARTENS AND TINA TRAUTNER

Warm Up Question

Bayreuth Salzburg Prague Vienna Passau Munich

(How many paths from Bayreuth to Vienna only use road-edges?) How many paths from Bayreuth to Vienna match the regular path query (road)* ?

r

  • a

d road road road r

  • a

d road road road

r a i l

slide-6
SLIDE 6

WIM MARTENS AND TINA TRAUTNER

Warm Up Question

[Theoreticians]: ∞ [SPARQL 2018]: 1 [SPARQL 2012]: 3 [Cypher]: 5

Bayreuth Salzburg Prague Vienna Passau Munich

(How many paths from Bayreuth to Vienna only use road-edges?) How many paths from Bayreuth to Vienna match the regular path query (road)* ?

r

  • a

d road road road r

  • a

d road road road

r a i l

slide-7
SLIDE 7

WIM MARTENS AND TINA TRAUTNER

Warm Up Question

all paths is there at least one path? paths without node repetition paths without edge repetition [Theoreticians]: ∞ [SPARQL 2018]: 1 [SPARQL 2012]: 3 [Cypher]: 5

Bayreuth Salzburg Prague Vienna Passau Munich

(How many paths from Bayreuth to Vienna only use road-edges?) How many paths from Bayreuth to Vienna match the regular path query (road)* ?

r

  • a

d road road road r

  • a

d road road road

r a i l

slide-8
SLIDE 8

WIM MARTENS AND TINA TRAUTNER

Warm Up Question

all paths is there at least one path? paths without node repetition paths without edge repetition [Theoreticians]: ∞ [SPARQL 2018]: 1 [SPARQL 2012]: 3 [Cypher]: 5

Bayreuth Salzburg Prague Vienna Passau Munich

(How many paths from Bayreuth to Vienna only use road-edges?) How many paths from Bayreuth to Vienna match the regular path query (road)* ?

r

  • a

d road road road r

  • a

d road road road

r a i l

slide-9
SLIDE 9

WIM MARTENS AND TINA TRAUTNER

Warm Up Question

all paths is there at least one path? paths without node repetition paths without edge repetition [Theoreticians]: ∞ [SPARQL 2018]: 1 [SPARQL 2012]: 3 [Cypher]: 5

Bayreuth Salzburg Prague Vienna Passau Munich

(How many paths from Bayreuth to Vienna only use road-edges?) How many paths from Bayreuth to Vienna match the regular path query (road)* ?

r

  • a

d road road road r

  • a

d road road road

r a i l

slide-10
SLIDE 10

WIM MARTENS AND TINA TRAUTNER

Warm Up Question

all paths is there at least one path? paths without node repetition paths without edge repetition [Theoreticians]: ∞ [SPARQL 2018]: 1 [SPARQL 2012]: 3 [Cypher]: 5

Bayreuth Salzburg Prague Vienna Passau Munich

(How many paths from Bayreuth to Vienna only use road-edges?) How many paths from Bayreuth to Vienna match the regular path query (road)* ?

r

  • a

d road road road r

  • a

d road road road

r a i l

slide-11
SLIDE 11

WIM MARTENS AND TINA TRAUTNER

Warm Up Question

all paths is there at least one path? paths without node repetition paths without edge repetition [Theoreticians]: ∞ [SPARQL 2018]: 1 [SPARQL 2012]: 3 [Cypher]: 5

Bayreuth Salzburg Prague Vienna Passau Munich

(How many paths from Bayreuth to Vienna only use road-edges?) How many paths from Bayreuth to Vienna match the regular path query (road)* ?

r

  • a

d road road road r

  • a

d road road road

r a i l

slide-12
SLIDE 12

WIM MARTENS AND TINA TRAUTNER

Warm Up Question

all paths is there at least one path? paths without node repetition paths without edge repetition [Theoreticians]: ∞ [SPARQL 2018]: 1 [SPARQL 2012]: 3 [Cypher]: 5

Bayreuth Salzburg Prague Vienna Passau Munich

(How many paths from Bayreuth to Vienna only use road-edges?) How many paths from Bayreuth to Vienna match the regular path query (road)* ?

r

  • a

d road road road r

  • a

d road road road

r a i l

slide-13
SLIDE 13

WIM MARTENS AND TINA TRAUTNER

Warm Up Question

all paths is there at least one path? paths without node repetition paths without edge repetition [Theoreticians]: ∞ [SPARQL 2018]: 1 [SPARQL 2012]: 3 [Cypher]: 5

Bayreuth Salzburg Prague Vienna Passau Munich

(How many paths from Bayreuth to Vienna only use road-edges?) How many paths from Bayreuth to Vienna match the regular path query (road)* ?

r

  • a

d road road road r

  • a

d road road road

r a i l

slide-14
SLIDE 14

WIM MARTENS AND TINA TRAUTNER

The Point

There are different ways of matching paths in graphs and any of them can make sense

slide-15
SLIDE 15

WIM MARTENS AND TINA TRAUTNER

The Point

There are different ways of matching paths in graphs and any of them can make sense

But which variant do you want to use in a system?

slide-16
SLIDE 16

Theory

ON QUERYING PATHS IN GRAPH DATABASES

WIM MARTENS AND TINA TRAUTNER

slide-17
SLIDE 17

WIM MARTENS AND TINA TRAUTNER

Computational Problems

graph (the data) Input Regular expression !

called regular path query (RPQ)

slide-18
SLIDE 18

WIM MARTENS AND TINA TRAUTNER

Computational Problems

graph (the data) Input Problem Is there a path from to that matches !? Path existence Regular expression !

called regular path query (RPQ)

slide-19
SLIDE 19

WIM MARTENS AND TINA TRAUTNER

Computational Problems

graph (the data) Input Problem Regular expression !

called regular path query (RPQ)

How many paths from to match !? Path counting

slide-20
SLIDE 20

WIM MARTENS AND TINA TRAUTNER

Computational Problems

graph (the data) Input Problem Regular expression !

called regular path query (RPQ)

Enumerate the paths from to that match ! Path enumeration

slide-21
SLIDE 21

Arbitrary paths Paths without node repetitions

WIM MARTENS AND TINA TRAUTNER

Considering Different Paths

Boolean paths Paths without edge repetitions

slide-22
SLIDE 22

Arbitrary paths Paths without node repetitions

WIM MARTENS AND TINA TRAUTNER

Considering Different Paths

Boolean paths Paths without edge repetitions

slide-23
SLIDE 23

Arbitrary paths Paths without node repetitions

WIM MARTENS AND TINA TRAUTNER

Considering Different Paths

slide-24
SLIDE 24

WIM MARTENS AND TINA TRAUTNER

Considering Different Paths

Simple paths Arbitrary paths

slide-25
SLIDE 25

WIM MARTENS AND TINA TRAUTNER

Complexity of RPQ Evaluation

Existence Counting Enumeration Arbitrary paths Simple paths in P in FP polynomial delay NP-hard #P-hard too much delay

slide-26
SLIDE 26

WIM MARTENS AND TINA TRAUTNER

Complexity of RPQ Evaluation

Existence Coun,ng Enumeration Arbitrary paths Simple paths in P in FP polynomial delay NP-hard #P-hard too much delay “user happy”: “user unhappy”:

slide-27
SLIDE 27

WIM MARTENS AND TINA TRAUTNER

Complexity of RPQ Evaluation

Existence Counting Enumeration Arbitrary paths Simple paths in P in FP polynomial delay NP-hard #P-hard too much delay “user happy”: “user unhappy”:

slide-28
SLIDE 28

WIM MARTENS AND TINA TRAUTNER

Complexity of RPQ Evaluation

similar to counting words in language of regular expression #P-complete [Kannan et al., SODA 1995] Existence Counting Enumeration Arbitrary paths Simple paths

slide-29
SLIDE 29

WIM MARTENS AND TINA TRAUTNER

Complexity of RPQ Evaluation

Existence Counting Enumeration Arbitrary paths Simple paths Is there a simple path matching !∗#!∗? NP-complete [Mendelzon, Wood, SICOMP 1995] essentially because „simple path via a node“ is NP-hard [Fortune et al., TCS 1980] Is there a simple path matching !! ∗? NP-complete [Lapaugh, Papadimitriou, Networks 1984]

slide-30
SLIDE 30

WIM MARTENS AND TINA TRAUTNER

Complexity of RPQ Evaluation

Existence Counting Enumeration Arbitrary paths Simple paths Is there a simple path matching !∗#!∗? NP-complete [Mendelzon, Wood, SICOMP 1995] essentially because „simple path via a node“ is NP-hard [Fortune et al., TCS 1980] Is there a simple path matching !! ∗? NP-complete [Lapaugh, Papadimitriou, Networks 1984] [Bagan, Bonifati, Groz PODS 2013] Dichotomy for which expressions the data complexity of this problem is in P or NP-complete

slide-31
SLIDE 31

WIM MARTENS AND TINA TRAUTNER

Theory VS Systems

Theory: Systems:

slide-32
SLIDE 32

WIM MARTENS AND TINA TRAUTNER

Theory VS Systems

„Simple paths are computationally difficult, even for very small RPQs“ Theory: Systems:

slide-33
SLIDE 33

WIM MARTENS AND TINA TRAUTNER

Theory VS Systems

„Simple paths are computationally difficult, even for very small RPQs“ „But we use simple paths and we‘re fine“ Theory: Systems:

slide-34
SLIDE 34

What is going on with these

sim simple ple pa paths ths?

WIM MARTENS AND TINA TRAUTNER

slide-35
SLIDE 35

WIM MARTENS AND TINA TRAUTNER

RPQs in SPARQL Query Logs

Extracted 247,404 RPQs from SPARQL query logs (2009 - 2017) (from DBPedia, biological databases, British museum, Wikidata, …) [Bonifati, M., Timm, PVLDB 2017]

slide-36
SLIDE 36

WIM MARTENS AND TINA TRAUTNER

RPQs in SPARQL Query Logs

Extracted 247,404 RPQs from SPARQL query logs (2009 - 2017) (from DBPedia, biological databases, British museum, Wikidata, …) [Bonifati, M., Timm, PVLDB 2017] Only very few different kinds of RPQs (± 17)

slide-37
SLIDE 37

Single symbols: !, #, $, !%, … Disjunction

  • f symbols:

', '%, …

WIM MARTENS AND TINA TRAUTNER

RPQs in SPARQL Query Logs

Expression Type Relative Expression Type Relative '∗ 48.76% !∗#? <0.01% ' 32.10% !#$∗ <0.01% !% ⋯ !+ 8.66% '% ⋯ '+ <0.01% !∗# 7.73% !#∗ + $ <0.01% '- 1.54% !∗ + # <0.01% !%? ⋯ !+? 1.15% ! + #- <0.01% !'? 0.01% !- + #- <0.01% !%!.? ⋯ !+? 0.01% !# ∗ <0.01% '? <0.01% / ≤ 6 Data from [Bonifati et al., PVLDB 2017]

slide-38
SLIDE 38

WIM MARTENS AND TINA TRAUTNER

Simple Transitive Expressions

disjunction ("# + ⋯ + "&) of symbols (denote this by (, (),...) Atomic Expression

slide-39
SLIDE 39

WIM MARTENS AND TINA TRAUTNER

Simple Transitive Expressions

„follow a path of length k“ „follow a path of length at most k“

disjunction ("# + ⋯ + "&) of symbols (denote this by (, (),...) (# ⋯ (*

  • r

(#? ⋯ (*? Local Expression Atomic Expression

slide-40
SLIDE 40

WIM MARTENS AND TINA TRAUTNER

Simple Transitive Expressions

„follow a path of length k“ „follow a path of length at most k“

disjunction ("# + ⋯ + "&) of symbols (denote this by (, (),...) (# ⋯ (*

  • r

(#? ⋯ (*? Local Expression ,# (∗,. where ,#, ,. are local expressions Simple Transitive Expression (STE) Atomic Expression

slide-41
SLIDE 41

WIM MARTENS AND TINA TRAUTNER

Simple Transitive Expressions

! " #$ %∗#' where #$, #' are local expressions Simple Transitive Expression (STE) (we allow % = ∅)

slide-42
SLIDE 42

WIM MARTENS AND TINA TRAUTNER

Simple Transitive Expressions

!" ⋯ !$

  • r

!"? ⋯ !$? & ' (" !∗(* where (", (* are local expressions Simple Transitive Expression (STE) (we allow ! = ∅)

slide-43
SLIDE 43

WIM MARTENS AND TINA TRAUTNER

Simple Transitive Expressions

!∗ !# ⋯ !%

  • r

!#? ⋯ !%? ' ( )# !∗)* where )#, )* are local expressions Simple Transitive Expression (STE) (we allow ! = ∅)

slide-44
SLIDE 44

WIM MARTENS AND TINA TRAUTNER

Simple Transitive Expressions

!∗ !# ⋯ !%

  • r

!#? ⋯ !%? !#

' ⋯ !( '

  • r

!#

' ? ⋯ !( '?

) * +# !∗+, where +#, +, are local expressions Simple Transitive Expression (STE) (we allow ! = ∅)

slide-45
SLIDE 45

WIM MARTENS AND TINA TRAUTNER

RPQs in SPARQL Query Logs

Expression Type Relative Expression Type Relative !∗ 48.76% #∗$? <0.01% ! 32.10% #$&∗ <0.01% #' ⋯ #) 8.66% !' ⋯ !) <0.01% #∗$ 7.73% #$∗ + & <0.01% !+ 1.54% #∗ + $ <0.01% #'? ⋯ #)? 1.15% # + $+ <0.01% #!? 0.01% #+ + $+ <0.01% #'#,? ⋯ #)? 0.01% #$ ∗ <0.01% !? <0.01% STE Union of STEs something else

  • ≤ 6

Data from [Bonifati et al., PVLDB 2017]

slide-46
SLIDE 46

WIM MARTENS AND TINA TRAUTNER

RPQs in SPARQL Query Logs

Expression Type Relative Expression Type Relative !∗ 48.76% #∗$? <0.01% ! 32.10% #$&∗ <0.01% #' ⋯ #) 8.66% !' ⋯ !) <0.01% #∗$ 7.73% #$∗ + & <0.01% !+ 1.54% #∗ + $ <0.01% #'? ⋯ #)? 1.15% # + $+ <0.01% #!? 0.01% #+ + $+ <0.01% #'#,? ⋯ #)? 0.01% #$ ∗ <0.01% !? <0.01% STE Union of STEs something else

  • ≤ 6

Data from [Bonifati et al., PVLDB 2017]

99.99% are STEs!

slide-47
SLIDE 47

WIM MARTENS AND TINA TRAUTNER

Main Theorem Warm-Up

Given graph !, nodes " and #, and RPQ $, is there a simple path from " to # that matches $? Simple path existence

slide-48
SLIDE 48

WIM MARTENS AND TINA TRAUTNER

Main Theorem Warm-Up

Given graph !, nodes " and #, and RPQ $ ∈ &, is there a simple path from " to # that matches $? Simple path existence for & Example classes &:

slide-49
SLIDE 49

WIM MARTENS AND TINA TRAUTNER

Main Theorem Warm-Up

Given graph !, nodes " and #, and RPQ $ ∈ &, is there a simple path from " to # that matches $? Simple path existence for & Example classes &: '' … ' for ) ∈ ℕ denote this by {') | ) ∈ ℕ} )

slide-50
SLIDE 50

WIM MARTENS AND TINA TRAUTNER

Main Theorem Warm-Up

Given graph !, nodes " and #, and RPQ $ ∈ &, is there a simple path from " to # that matches $? Simple path existence for & Example classes &: '' … ' for ) ∈ ℕ denote this by {') | ) ∈ ℕ} ) '' … ''∗ for ) ∈ ℕ denote this by {')'∗| ) ∈ ℕ}

slide-51
SLIDE 51

WIM MARTENS AND TINA TRAUTNER

Main Theorem Warm-Up

Given graph !, nodes " and #, and RPQ $ ∈ &, is there a simple path from " to # that matches $? Simple path existence for & Example classes &: '' … ' for ) ∈ ℕ denote this by {') | ) ∈ ℕ} These are non-trivial problems! ) '' … ''∗ for ) ∈ ℕ denote this by {')'∗| ) ∈ ℕ}

slide-52
SLIDE 52

WIM MARTENS AND TINA TRAUTNER

Main Theorem Warm-Up

Given graph !, nodes " and #, and RPQ $ ∈ &, is there a simple path from " to # that matches $? Simple path existence for & Example classes &: '' … ' for ) ∈ ℕ denote this by {') | ) ∈ ℕ} “Simple path existence for {') | ) ∈ ℕ} is in FPT“ Theorem [Alon, Yuster, Zwick, JACM 1995] Color coding technique ) '' … ''∗ for ) ∈ ℕ denote this by {')'∗| ) ∈ ℕ}

slide-53
SLIDE 53

WIM MARTENS AND TINA TRAUTNER

Main Theorem Warm-Up

Given graph !, nodes " and #, and RPQ $ ∈ &, is there a simple path from " to # that matches $? Simple path existence for & Example classes &: '' … ' for ) ∈ ℕ denote this by {') | ) ∈ ℕ} “Simple path existence for {') | ) ∈ ℕ} is in FPT“ Theorem [Alon, Yuster, Zwick, JACM 1995] Color coding technique “Simple path existence for {')'∗| ) ∈ ℕ} is in FPT“ Theorem [Technique from Fomin et al., JACM 2016] communicated to us by Holger Dell Representative sets technique ) '' … ''∗ for ) ∈ ℕ denote this by {')'∗| ) ∈ ℕ}

slide-54
SLIDE 54

WIM MARTENS AND TINA TRAUTNER

Main Theorem

(*) satisfying a mild condition,

needed for W[1] hardness Let ! be a class(*) of STEs: if ! is cuttable, then simple path existence for ! is in FPT

  • therwise, simple path existence for ! is W["]-hard.

Main Theorem Given graph #, nodes $ and %, and RPQ & ∈ !, is there a simple path from $ to % that matches &? Simple path existence for !

slide-55
SLIDE 55

WIM MARTENS AND TINA TRAUTNER

Main Theorem

(*) satisfying a mild condition,

needed for W[1] hardness Let ! be a class(*) of STEs: if ! is cuttable, then simple path existence for ! is in FPT

  • therwise, simple path existence for ! is W["]-hard.

Main Theorem parameter: size of RPQ Given graph #, nodes $ and %, and RPQ & ∈ !, is there a simple path from $ to % that matches &? Simple path existence for !

slide-56
SLIDE 56

WIM MARTENS AND TINA TRAUTNER

Intuition behind Cuttability

! " Path that matches #

slide-57
SLIDE 57

WIM MARTENS AND TINA TRAUTNER

Intuition behind Cuttability

! " Path that matches # ? Simple

slide-58
SLIDE 58

WIM MARTENS AND TINA TRAUTNER

Intuition behind Cuttability

! " Path that matches # Does the simple path still match #? § “Easy” to check for $$$$$∗ (check length) § “Hard” to check for &&&&$∗ (check length+label) ? Simple

slide-59
SLIDE 59

WIM MARTENS AND TINA TRAUTNER

Intuition behind Cuttability

! " Path that matches # Does the simple path still match #? § “Easy” to check for $$$$$∗ (check length) § “Hard” to check for &&&&$∗ (check length+label) ? ≥ 4 Simple

slide-60
SLIDE 60

WIM MARTENS AND TINA TRAUTNER

Intuition behind Cuttability

! " Path that matches # Does the simple path still match #? § “Easy” to check for $$$$$∗ (check length) § “Hard” to check for &&&&$∗ (check length+label) ? ≥ 4 cut border for &&&&$∗ Simple

slide-61
SLIDE 61

WIM MARTENS AND TINA TRAUTNER

Formalizing this Idea

slide-62
SLIDE 62

WIM MARTENS AND TINA TRAUTNER

Formalizing this Idea

Consider STE ! = #$ ⋯ #& #∗ Its cut border ℓ is the largest number such that # ⊈ #ℓ (and ℓ = 0 if no such #ℓ exists) Examples

++++∗ ℓ = 0 because + ⊆ + ++-+∗ ℓ = 3 because + ⊈ - (+ + 1)+-(+ + -)∗ ℓ = 3 because +, - ⊈ -

slide-63
SLIDE 63

WIM MARTENS AND TINA TRAUTNER

Formalizing this Idea

Consider STE ! = #$ ⋯ #& #∗ Its cut border ℓ is the largest number such that # ⊈ #ℓ (and ℓ = 0 if no such #ℓ exists) Examples

§ ++++∗ ℓ = 0 because + ⊆ + § ++-+∗ ℓ = 3 because + ⊈ - § (+ + 1)+-(+ + -)∗ ℓ = 3 because +, - ⊈ -

slide-64
SLIDE 64

WIM MARTENS AND TINA TRAUTNER

Formalizing this Idea

Consider STE ! = #$ ⋯ #& #∗ Its cut border ℓ is the largest number such that # ⊈ #ℓ (and ℓ = 0 if no such #ℓ exists) Examples

§ ++++∗ ℓ = 0 because + ⊆ + § ++-+∗ ℓ = 3 because + ⊈ - § (+ + 1)+-(+ + -)∗ ℓ = 3 because +, - ⊈ -

slide-65
SLIDE 65

WIM MARTENS AND TINA TRAUTNER

Formalizing this Idea

Consider STE ! = #$ ⋯ #& #∗ Its cut border ℓ is the largest number such that # ⊈ #ℓ (and ℓ = 0 if no such #ℓ exists) Examples

§ ++++∗ ℓ = 0 because + ⊆ + § ++-+∗ ℓ = 3 because + ⊈ - § (+ + 1)+-(+ + -)∗ ℓ = 3 because +, - ⊈ - A class 4 of STEs is cuttable, if there is a constant 1 such that all its expressions have cut border ≤ 1 Definition

slide-66
SLIDE 66

WIM MARTENS AND TINA TRAUTNER

Formalizing this Idea

A class ! of STEs is cuttable, if there is a constant " such that all its expressions have cut border ≤ " Definition Let ! be a class(*) of STEs: if ! is cuttable, then simple path existence for ! is in FPT

  • therwise, simple path existence for ! is W[$]-hard.

Main Theorem parameter: size of RPQ For the FPT upper bound, the complexity in the parameter is single exponential

slide-67
SLIDE 67

WIM MARTENS AND TINA TRAUTNER

Upper Bound Idea

slide-68
SLIDE 68

WIM MARTENS AND TINA TRAUTNER

Upper Bound Idea

Finding simple cycles of length at least k is in FPT Theorem [Fomin et al., JACM 2016] Finding simple paths of length at least k is in FPT Theorem [Technique from Fomin et al., JACM 2016] communicated to us by Holger Dell Finding simple paths of length exactly k is in FPT Theorem [Alon, Yuster, Zwick, JACM 1995] Color coding technique Representative sets technique Representative sets technique

slide-69
SLIDE 69

WIM MARTENS AND TINA TRAUTNER

Upper Bound Idea

! " Find a simple path matching #$ ⋯ #& #∗

slide-70
SLIDE 70

WIM MARTENS AND TINA TRAUTNER

Upper Bound Idea

Brute force ! " #$ ⋯ #& Find a simple path matching #$ ⋯ #' #∗

slide-71
SLIDE 71

WIM MARTENS AND TINA TRAUTNER

Upper Bound Idea

Brute force ! " #$ ⋯ #& Simple Path matching #&'$ ⋯ #( #∗ and avoiding the brute force part Find a simple path matching #$ ⋯ #( #∗

slide-72
SLIDE 72

WIM MARTENS AND TINA TRAUTNER

Upper Bound Idea

Brute force ! " #$ ⋯ #& #&'$ ⋯ #( #∗ Simple Path matching #&'$ ⋯ #( #∗ and avoiding the brute force part Find a simple path matching #$ ⋯ #( #∗

slide-73
SLIDE 73

Upper Bound Idea

! " #∗ #% ⋯ #' Find a simple path matching #% ⋯ #( #∗

slide-74
SLIDE 74

Upper Bound Idea

! " #∗ #%&' ⋯ #) #' ⋯ #% Since # ⊆ #+ Find a simple path matching #' ⋯ #) #∗

slide-75
SLIDE 75

WIM MARTENS AND TINA TRAUTNER

Lower Bound Idea

!" #$ #" !$ Parameterized Two Disjoint Paths

slide-76
SLIDE 76

WIM MARTENS AND TINA TRAUTNER

Lower Bound Idea

!" #$ #" !$ Given graph %, nodes !" and #" and !$ and #$ and a parameter k Are there node-disjoint paths from !" to #" from !$ to #$ Parameterized Two Disjoint Paths

slide-77
SLIDE 77

WIM MARTENS AND TINA TRAUTNER

Lower Bound Idea

!" #$ #" !$ Given graph %, nodes !" and #" and !$ and #$ and a parameter k Are there node-disjoint paths from !" to #" from !$ to #$ Parameterized Two Disjoint Paths

  • f length at most k
slide-78
SLIDE 78

WIM MARTENS AND TINA TRAUTNER

Lower Bound Idea

Parameterized Two Disjoint Paths is W[1]-hard Theorem (Main Technical Result) Building on proofs from [Slivkins, SIDMA 10; Grohe&Grüber ICALP 07] Given graph !, nodes "# and $# and "% and $% and a parameter k Are there node-disjoint paths from "# to $# from "% to $% Parameterized Two Disjoint Paths

  • f length at most k
slide-79
SLIDE 79

WIM MARTENS AND TINA TRAUTNER

Lower Bound Idea

Parameterized Two Disjoint Paths is W[1]-hard Theorem (Main Technical Result) Let ! be a class(*) of STEs: if ! is not cuttable, then simple path existence for ! is W["]-hard. Lemma

slide-80
SLIDE 80

WIM MARTENS AND TINA TRAUTNER

Lower Bound Idea

Parameterized Two Disjoint Paths is W[1]-hard Theorem (Main Technical Result) !" #$ #" !$ Let % be a class(*) of STEs: if % is not cuttable, then simple path existence for % is W["]-hard. Lemma

slide-81
SLIDE 81

WIM MARTENS AND TINA TRAUTNER

Lower Bound Idea

Parameterized Two Disjoint Paths is W[1]-hard Theorem (Main Technical Result) !" #$ #" !$ % Let & be a class(*) of STEs: if & is not cuttable, then simple path existence for & is W["]-hard. Lemma Warning: drastic oversimplification

slide-82
SLIDE 82

Extensions

WIM MARTENS AND TINA TRAUTNER

slide-83
SLIDE 83

WIM MARTENS AND TINA TRAUTNER

Extensions

The main result extends to: § Enumeration problems FPT time becomes FPT delay using [Yen 1971] § Edge-disjoint paths But the dichotomy slightly changes [ArXiv 2017]

Let ! be a class(*) of STEs: if ! is cuttable, then simple path existence for ! is in FPT

  • therwise, simple path existence for ! is W["]-hard.

Main Theorem

slide-84
SLIDE 84

Taking a Step Back

WHAT DID WE LEARN HERE?

WIM MARTENS AND TINA TRAUTNER

slide-85
SLIDE 85

WIM MARTENS AND TINA TRAUTNER

So what does all this mean?

Cuttable STEs (ℓ ≤ 2) Thus in FPT Union of STEs something else k ≤ 6

  • These expressions have cut border ≤ 2
  • The FPT algorithms have parameter % ≤ 6
  • But even naive algorithms are expected to work reasonably well

(brute-force checks for paths of lengh 2 and simple paths of length 6) Expression Type Relative Expression Type Relative &∗ 48.76% (∗)? <0.01% & 32.10% ()+∗ <0.01% (, ⋯ (. 8.66% &, ⋯ &. <0.01% (∗) 7.73% ()∗ + + <0.01% &0 1.54% (∗ + ) <0.01% (,? ⋯ (.? 1.15% ( + )0 <0.01% (&? 0.01% (0 + )0 <0.01% (,(1? ⋯ (.? 0.01% () ∗ <0.01% &? <0.01%

slide-86
SLIDE 86

WIM MARTENS AND TINA TRAUTNER

Take Home Messages

§ Looking in query logs can pay off and inspire new research questions! §99.99% of RPQs found in a practical study are Simple Transitive Expressions (STEs) § Dichotomy for simple path evaluation of STEs

§ Another one for no-repeated-edge semantics is similar

§ If “cut borders are bounded”, evaluation of STEs is FPT

§ Cut borders in the real data are at most 2 § “FPT parameters” in the real data are 6 (for exact length) and 2 (for minimum length)

slide-87
SLIDE 87

Thank you!

WIM MARTENS AND TINA TRAUTNER