Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
80b986b
docs: Add reduction classification and detailed survey
GiggleLiu Jan 25, 2026
9154240
fix: Correct citation for Factoring→CircuitSAT reduction
GiggleLiu Jan 25, 2026
a14de97
docs: Polish writing to NeurIPS academic standard
GiggleLiu Jan 25, 2026
3f888e6
docs: Combine detailed constructions with theorem/proof structure
GiggleLiu Jan 25, 2026
37cf09f
docs: Improve summary table with overhead column and gray highlighting
GiggleLiu Jan 25, 2026
97d7bff
docs: Add notation section and improve symbol introductions
GiggleLiu Jan 25, 2026
744eb87
docs: Verify facts and fix references
GiggleLiu Jan 25, 2026
c0ae81e
test: Improve test coverage for ReductionGraph module
GiggleLiu Jan 25, 2026
7dc4099
fix: Fix clippy warnings and improve test coverage
GiggleLiu Jan 25, 2026
d473b08
fix: Correct Factoring→CircuitSAT citation and remove unused refs
GiggleLiu Jan 25, 2026
2af6d22
test: Add coverage tests for ReductionGraph layout
GiggleLiu Jan 25, 2026
952135c
refactor: Simplify layout code to remove dead branches
GiggleLiu Jan 25, 2026
8bd21e0
refactor: Remove unused iteration limit in BFS layout
GiggleLiu Jan 25, 2026
3030e3b
refactor: Move layout computation from Rust to Typst
GiggleLiu Jan 25, 2026
adec235
docs: Clean up Typst layout with explicit positions
GiggleLiu Jan 26, 2026
042b313
docs: Optimize graph layout with compact node positions
GiggleLiu Jan 26, 2026
e6a588c
fix: Unify SpinGlass types in ReductionGraph visualization
GiggleLiu Jan 26, 2026
cee4c8f
refactor: Use type-erased names for ReductionGraph topology
GiggleLiu Jan 26, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 15 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Makefile for problemreductions

.PHONY: help build test fmt clippy doc clean coverage
.PHONY: help build test fmt clippy doc mdbook paper clean coverage

# Default target
help:
Expand All @@ -10,7 +10,9 @@ help:
@echo " fmt - Format code with rustfmt"
@echo " fmt-check - Check code formatting"
@echo " clippy - Run clippy lints"
@echo " doc - Build and open documentation"
@echo " doc - Build mdBook documentation"
@echo " mdbook - Build and serve mdBook (with live reload)"
@echo " paper - Build Typst paper (requires typst)"
@echo " coverage - Generate coverage report (requires cargo-llvm-cov)"
@echo " clean - Clean build artifacts"
@echo " check - Quick check (fmt + clippy + test)"
Expand All @@ -35,9 +37,18 @@ fmt-check:
clippy:
cargo clippy --all-targets --all-features -- -D warnings

# Build and open documentation
# Build mdBook documentation
doc:
cargo doc --all-features --no-deps --open
mdbook build docs

# Build and serve mdBook with live reload
mdbook:
mdbook serve docs --open

# Build Typst paper
paper:
cargo run --example export_graph
cd docs/paper && typst compile reductions.typ reductions.pdf

# Generate coverage report (requires: cargo install cargo-llvm-cov)
coverage:
Expand Down
5 changes: 4 additions & 1 deletion book.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,15 @@ description = "A Rust library for reducing NP-hard problems"
language = "en"
src = "docs/src"

[preprocessor.mermaid]
command = "mdbook-mermaid"

[output.html]
default-theme = "rust"
git-repository-url = "https://github.com/liujinguo/problemreductions"
edit-url-template = "https://github.com/liujinguo/problemreductions/edit/main/{path}"
additional-css = []
additional-js = []
additional-js = ["mermaid.min.js", "mermaid-init.js"]
Copy link

Copilot AI Jan 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The book.toml configuration references "mermaid.min.js" in the additional-js array (line 16), but this file does not appear to exist in the repository. The mdbook-mermaid preprocessor typically provides the necessary Mermaid JavaScript automatically, so including mermaid.min.js here is likely redundant and may cause errors if the file is missing. Consider removing "mermaid.min.js" from the additional-js array and relying on the preprocessor to inject the necessary scripts, or ensure the file is properly included if it's needed for a specific reason.

Suggested change
additional-js = ["mermaid.min.js", "mermaid-init.js"]
additional-js = ["mermaid-init.js"]

Copilot uses AI. Check for mistakes.
no-section-label = false

[output.html.fold]
Expand Down
136 changes: 136 additions & 0 deletions docs/paper/reduction_graph.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
{
"nodes": [
{
"id": "MaxCut",
"label": "MaxCut",
"category": "graph"
},
{
"id": "DominatingSet",
"label": "DominatingSet",
"category": "graph"
},
{
"id": "SpinGlass",
"label": "SpinGlass",
"category": "optimization"
},
{
"id": "QUBO",
"label": "QUBO",
"category": "optimization"
},
{
"id": "IndependentSet",
"label": "IndependentSet",
"category": "graph"
},
{
"id": "SetPacking",
"label": "SetPacking",
"category": "set"
},
{
"id": "Satisfiability",
"label": "Satisfiability",
"category": "satisfiability"
},
{
"id": "Coloring",
"label": "Coloring",
"category": "graph"
},
{
"id": "VertexCovering",
"label": "VertexCovering",
"category": "graph"
},
{
"id": "KSatisfiability",
"label": "KSatisfiability",
"category": "satisfiability"
},
{
"id": "CircuitSAT",
"label": "CircuitSAT",
"category": "satisfiability"
},
{
"id": "Factoring",
"label": "Factoring",
"category": "specialized"
},
{
"id": "Matching",
"label": "Matching",
"category": "graph"
},
{
"id": "SetCovering",
"label": "SetCovering",
"category": "set"
}
],
"edges": [
{
"source": "CircuitSAT",
"target": "SpinGlass",
"bidirectional": false
},
{
"source": "Matching",
"target": "SetPacking",
"bidirectional": false
},
{
"source": "Satisfiability",
"target": "KSatisfiability",
"bidirectional": true
},
{
"source": "Factoring",
"target": "CircuitSAT",
"bidirectional": false
},
{
"source": "IndependentSet",
"target": "SetPacking",
"bidirectional": true
},
{
"source": "SpinGlass",
"target": "QUBO",
"bidirectional": true
},
{
"source": "MaxCut",
"target": "SpinGlass",
"bidirectional": true
},
{
"source": "VertexCovering",
"target": "SetCovering",
"bidirectional": false
},
{
"source": "Satisfiability",
"target": "IndependentSet",
"bidirectional": false
},
{
"source": "Satisfiability",
"target": "Coloring",
"bidirectional": false
},
{
"source": "IndependentSet",
"target": "VertexCovering",
"bidirectional": true
},
{
"source": "Satisfiability",
"target": "DominatingSet",
"bidirectional": false
}
]
}
Loading