Skip to content

Add bidirectional and multi-source BFS algorithms #97

@szarnyasg

Description

@szarnyasg

I'd like to add bidirectional and MSBFS algorithms. Some design considerations for these:

  • For MSBFS, we can either use boolean matrices or bitwise operations. The latter as described in a VLDB paper, which states that compared to a textbook BFS (T-BFS) and a direction-optimizing BFS (DO-BFS), it provides an ~80x speedup

    As an example, T-BFS and DO-BFS take 135 minutes and 22 minutes, respectively, to process the LDBC graph with 1 million vertices, while MS-BFS takes only 1.75 minutes. MS-BFS shows excellent scalability for all presented graphs

  • For both bidirectional BSF and MSBFS, it makes sense to experiment with push/pull.

  • Note however that for MSBFS, the experiments in the VLDB paper put the performance gains of push/pull to max. 30%:

    Our experiments show that with both this hybrid approach and ANP, MS-BFS can significantly reduce the number of random accesses to visit and visitNext, improving the performance by up to 30%

  • Typically, the MSBFS algorithm needs to perform some operation when it finds a node. To incorporate this in our algorithm, it probably makes sense to add a function pointer argument to its method so that users can pass the desired operations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions