ALGORITHMS

Assignment tutorials

Hands-on Jupyter notebooks covering the linear assignment problem — from first principles through SORT-style object tracking.

Three progressive tutorials on the assignment family, targeting readers with Python/PyTorch experience but no prior knowledge of combinatorial optimisation.

TutorialTopicNotebook
FundamentalsWhat LAP is, why brute force fails, assignment.solveassignment/01_the_assignment_problem.py
Backends and batchingBackend selection, 3-D batched solve, unpacked outputassignment/02_backends_and_batching.py
Object trackingIoU cost matrix, SORT-style tracker, trajectory visualisationassignment/03_object_tracking.py

Running the notebooks locally

# Install the notebooks dependency group
uv sync --extra cu128 --group notebooks

# Launch Jupyter Lab
jupyter lab notebooks/

# Re-render the docs pages from executed notebooks
nix run .#nb-render -- --family assignment

Notebooks are stored as jupytext percent-format .py files under notebooks/assignment/. nix run .#nb-render converts them to .ipynb, executes each one, and writes the output to these pages.