Skip to content

Commit acbb22e

Browse files
Add regular path query algorithm
This commit adds an implementation of the regular path query algorithm based on linear-algebra graph processing approach. The algorithm finds a set of nodes in a edge-labelled directed graph. These nodes are reachable by paths starting from one of source nodes and having edges labels conform a word from the specified regular language. This algorithm is based on the bread-first-search algorithm over the adjacency matrices. Regular languages are defined by non-deterministic finite automaton. The algorithm considers the paths on which "label words" are accepted by the specified NFA. The algorithm is used with the following inputs: * A regular automaton adjacency matrix decomposition. * A graph adjacency matrix decomposition. * An array of the starting node indices. It results with a vector, having v[i] = 1 iff the node is reachable by a path satisfying the provided regular constraints. Full description of the algorithm is available at: https://arxiv.org/abs/2412.10287
1 parent 916c60e commit acbb22e

File tree

19 files changed

+643
-0
lines changed

19 files changed

+643
-0
lines changed

data/rpq_data/1_a.mtx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
%%MatrixMarket matrix coordinate pattern general
2+
%%GraphBLAS type bool
3+
2 2 2
4+
1 2
5+
2 2

data/rpq_data/1_meta.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
1 1
2+
1 2

data/rpq_data/1_sources.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
1

data/rpq_data/2_a.mtx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
%%MatrixMarket matrix coordinate pattern general
2+
%%GraphBLAS type bool
3+
2 2 1
4+
2 1

data/rpq_data/2_b.mtx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
%%MatrixMarket matrix coordinate pattern general
2+
%%GraphBLAS type bool
3+
2 2 1
4+
1 2

data/rpq_data/2_meta.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
1 1
2+
1 1

data/rpq_data/2_sources.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2

data/rpq_data/3_a.mtx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
%%MatrixMarket matrix coordinate pattern general
2+
%%GraphBLAS type bool
3+
2 2 1
4+
1 1

data/rpq_data/3_b.mtx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
%%MatrixMarket matrix coordinate pattern general
2+
%%GraphBLAS type bool
3+
2 2 1
4+
1 1

data/rpq_data/3_meta.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
1 1
2+
1 1

0 commit comments

Comments
 (0)