Skip to content

Commit 362f786

Browse files
committed
feat: InitiaL commit
0 parents  commit 362f786

File tree

25 files changed

+2072
-0
lines changed

25 files changed

+2072
-0
lines changed

.gitignore

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# Virtual environment
7+
venv/
8+
.venv/
9+
env/
10+
ENV/
11+
.conda/
12+
13+
# Distribution / packaging
14+
build/
15+
dist/
16+
*.egg-info/
17+
18+
# Jupyter Notebook checkpoints
19+
.ipynb_checkpoints
20+
21+
# VS Code settings
22+
.vscode/
23+
24+
# macOS system files
25+
.DS_Store
26+
27+
# Pytest cache
28+
.pytest_cache/
29+
30+
# Coverage reports
31+
htmlcov/
32+
.coverage
33+
.coverage.*
34+
.cache
35+
nosetests.xml
36+
coverage.xml
37+
38+
# MyPy type checker
39+
.mypy_cache/
40+
41+
# Profiling data
42+
.prof
43+
44+
# Temporary files
45+
tmp/
46+
*.tmp
47+
48+
# Rust build output
49+
rust/target/

README.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# BMSSP – Breaking the Sorting Barrier for Directed SSSP (Multi-language Implementations)
2+
3+
This repository contains **multi-language reference implementations** of the algorithms from:
4+
5+
> **Breaking the Sorting Barrier for Directed Single-Source Shortest Paths**
6+
> [arXiv:2504.17033v2](https://arxiv.org/abs/2504.17033)
7+
> David H. Yu, et al., 2025
8+
9+
Currently implemented in:
10+
- ✅ Python
11+
- ✅ Go
12+
- ✅ Fortran
13+
- ✅ C
14+
- ✅ Rust
15+
- ✅ Java
16+
17+
---
18+
19+
## Algorithms Implemented
20+
1. **FindPivots** (Lemma 3.2) – bounded Bellman–Ford expansion with pivot selection.
21+
2. **BaseCase** – small-instance solver using Dijkstra.
22+
3. **BMSSP** – recursive bounded multi-source shortest path solver.
23+
24+
---
25+
26+
## Structure
27+
Each language has its own folder with:
28+
- `bmssp` source file(s)
29+
- A `tests/` folder for correctness verification against known shortest paths
30+
- Build/run instructions (Makefile, scripts, etc.)
31+
32+
---
33+
34+
## Running Python Version
35+
```bash
36+
cd python
37+
python bmssp.py
38+
```
39+
40+
## Running Go Version
41+
```bash
42+
cd go
43+
go run bmssp.go
44+
```
45+
46+
## Running Fortran Version
47+
```bash
48+
cd fortran
49+
gfortran bmssp.f90 -o bmssp
50+
./bmssp
51+
```
52+
53+
## Running C Version
54+
```bash
55+
cd c
56+
gcc bmssp.c -lm -o bmssp
57+
./bmssp
58+
```
59+
60+
## Running Rust Version
61+
```bash
62+
cd rust
63+
cargo run
64+
```
65+
66+
## Running Java Version
67+
```bash
68+
cd java
69+
javac BMSSP.java
70+
java BMSSP
71+
```

c/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
C translation of the BMSSP algorithms.
2+
3+
## Build and Run
4+
```bash
5+
gcc bmssp.c -lm -o bmssp
6+
./bmssp
7+
```

0 commit comments

Comments
 (0)