Skip to main content

Package for computing the edge- and node-scanwidth of a directed acyclic graph (DAG)

Project description

PyPI License Docs JCSS DOI

scanwidth

scanwidth is a Python package for computing edge-scanwidth and node-scanwidth of directed acyclic graphs (DAGs). It provides exact and heuristic algorithms, plus reduction pipelines that make practical computation on larger instances more tractable.

Key Features

  • Tree-extension and Extension classess: classes that support (tree-)extensions of DAGs, provide computations for scanwidth-bags and converting to canonical tree-extenions
  • Exact and heuristic solvers: XP, brute-force, partition-based exact methods (edge), ILP backend selection (node), and multiple heuristics for edge- and node-scanwidth.
  • Reduction framework: configurable ReducerConfig/Reducer pipelines for edge and node scanwidth, including optional parallel s-block solving.

Installation

Install the base package:

pip install scanwidth

Install optional ILP dependencies:

# SciPy backend for node_scanwidth(..., algorithm="ilp", backend="scipy")
pip install scanwidth[scipy]

# Gurobi backend for node_scanwidth(..., algorithm="ilp", backend="gurobi")
pip install scanwidth[gurobi]

# Both ILP backends
pip install scanwidth[ilp]

gurobipy requires a working Gurobi installation and a valid Gurobi license (commercial or academic, depending on your setup).

Version requirements for optional ILP backends:

  • scipy>=1.9.0
  • gurobipy>=10.0.0

Documentation

For installation instructions, quickstart examples, and full API reference, see the scanwidth docs.

Citation

If you use scanwidth in your research, please cite the corresponding paper:

Niels Holtgrefe, Leo van Iersel, and Mark Jones. Exact and heuristic computation of the scanwidth of directed acyclic graphs. Journal of Computer and System Sciences, 160:103802, 2026. doi: 10.1016/j.jcss.2026.103802

To view the experimental materials of the paper, go to the folder experiments.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

scanwidth-0.2.3.tar.gz (38.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

scanwidth-0.2.3-py3-none-any.whl (46.3 kB view details)

Uploaded Python 3

File details

Details for the file scanwidth-0.2.3.tar.gz.

File metadata

  • Download URL: scanwidth-0.2.3.tar.gz
  • Upload date:
  • Size: 38.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for scanwidth-0.2.3.tar.gz
Algorithm Hash digest
SHA256 29888479fbc1c84e350013899eeb21dc95358614da020f0912170ec1373e50bc
MD5 98de57d6268caa4e0fcd8902e0a87198
BLAKE2b-256 2f711bf732f9fcd7cf6f072654d31a2677c4ae0a9836b5eae7c89e91662179aa

See more details on using hashes here.

Provenance

The following attestation bundles were made for scanwidth-0.2.3.tar.gz:

Publisher: release.yml on nholtgrefe/scanwidth

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file scanwidth-0.2.3-py3-none-any.whl.

File metadata

  • Download URL: scanwidth-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 46.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for scanwidth-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 7d6f3583ab97b7c19ca6c0c4a2a65fd2c9b5eb835dba866ad756b969faf8d467
MD5 4e529461015186fa06ec28b85a0818f6
BLAKE2b-256 18c833d406b4d7dc5647c5d8abe8b9d29f5e42f41926437953329945f062fec8

See more details on using hashes here.

Provenance

The following attestation bundles were made for scanwidth-0.2.3-py3-none-any.whl:

Publisher: release.yml on nholtgrefe/scanwidth

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page