Resource Allocation (Beta)

Resource Allocation is used to compute the closeness of nodes based on their shared neighbors. It is computed by the following formula:

RA(x,y)=uN(x)N(y)1N(u){RA(x,y)=\sum _{u\in N(x)\cap N(y)}{\frac {1} {|N(u)|}}}

Where 𝑁(𝑢) is the set of nodes adjacent to u.

Specification

CREATE QUERY tg_resource_allocation(VERTEX a, VERTEX b, SET<STRING> e_type)

Parameters

Name

Description

Data type

a

A vertex.

VERTEX

b

A vertex.

VERTEX

e_type

Edge types to traverse.

SET<STRING>

Example

Suppose we have the following graph:

Since Dan and Jenny has one shared neighbor Tom, who has two neighbors, running the algorithm between Dan and Jenny with friendship edges would give us a result of 0.5.

RUN QUERY resource_allocation (("Jenny", "person"), ("Dan", "person"), 
    ["friendship"])

Last updated