https://github.com/oeljeklaus-you/bfl
the project (bfl) can solve the NP problem whether two vertexs can be reached,in the graph
https://github.com/oeljeklaus-you/bfl
bfl graph paper
Last synced: 10 months ago
JSON representation
the project (bfl) can solve the NP problem whether two vertexs can be reached,in the graph
- Host: GitHub
- URL: https://github.com/oeljeklaus-you/bfl
- Owner: oeljeklaus-you
- License: mit
- Created: 2018-05-15T00:48:41.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-05-15T00:53:47.000Z (about 8 years ago)
- Last Synced: 2025-04-09T12:33:50.483Z (about 1 year ago)
- Topics: bfl, graph, paper
- Language: C++
- Size: 31.3 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# bfl
Compile
g++ main.cpp -DK={s in the paper = K * 32} -DD={d in the paper} -O3 -std=c++11 -o bfl
Run
./bfl {graph} {query}
Graph File Format
The first line must be "graph_for_greach".
The second line contains V, the number of vertices of the graph.
Then V lines follow.
Each line describes edges from a certain vertex, u, to its successors, v_i, in the following format.
u: v_1 v_2 ... v_Suc(u)#
Query File Format
Each line contains a query, Reach(u, v), in the following format.
u v result
If result is 0, then Reach(u, v) should be false;
if result is 1, then Reach(u, v) should be true;
otherwise result should be -1, which means the result it unknown.
Please note vertices are numbered from 0 to V - 1, and the graph must be a DAG.