cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Match path results

Hi everybody,

I have this portion of a graph:

And I performed several MATCH queries on it to obtain all the path from a starting node, and the associated cost.

As an example, from the node name 'PU4':

MATCH path = ({name:'PU4'})-[:SENSOR_MEASUREMENT_3|DIGITAL_DEPENDENCY_3|FUNCTIONAL_DEPENDENCY_3|CONTROL_COMMAND_3 *1..10]->(n)
UNWIND relationships(path) AS  rel
RETURN [node in nodes(path) | node.name] as name, COLLECT( rel.exposure) AS exposure

There are the obtained results for this query:

I am not an expert in graph theory and I would like to know if the type of performed query (and obtained results) can be assimilated as a known graph algorithm ?

Depth First Search algorithm maybe ?
Because it starts at a given node and explores as far as possible along each branch before backtracking.

Thanks for your help.

1 ACCEPTED SOLUTION

Indeed, Cypher traversals perform a depth-first search.

View solution in original post

1 REPLY 1

Indeed, Cypher traversals perform a depth-first search.