Updated on 2025-07-22 GMT+08:00

n-Paths

Overview

The n-Paths algorithm is used to find n paths between two nodes in a graph within k layers of relationships.

Application Scenarios

This algorithm applies to scenarios such as relationship analysis, path design, and network planning.

Parameter Description

Table 1 n-Paths algorithm parameters

Parameter

Mandatory

Description

Type

Value Range

Default Value

source

Yes

Enter the source ID of a path.

String

-

-

target

Yes

Enter the target ID of a path.

String

-

-

directed

No

Whether an edge is directed

Boolean

true or false

false

n

No

Number of paths

Integer

1–100

10

k

No

Number of hops

Integer

1-10

5

Example

Set parameters source to Lee, target to Alice, n to 10, k to 5, and directed to false. The calculation result is displayed on the canvas and the JSON result is displayed in the query result area.