Skip to main content

CVX Graph Algorithms

Introduction

Modern convex optimization-based graph algorithms.

Convex optimization presents an exciting new direction in designing exact and approximate graph algorithms. However, these algorithms are often overlooked in practice due to limitations in solving large convex programs quickly. Convex optimization-based graph algorithms nonetheless achieve impressive theoretical performance, and often provide a beautiful geometric interpretation. This package implements some of these algorithms and provides corresponding graph generators to test performance---hopefully highlighting how simple, elegant and effective these can be for many real-world problems.

Details

In this package, we provide implementations of the following algorithms. Note featured convex optimization-based algorithms are in bold and references are provided when available.

This package also provides functions to generate graphs drawn from the planted independent set distribution and stochastic block model.

  1. Maximum Cut Problem
    1. Goemans-Williamson MAX-CUT Algorithm [1]
    2. Random MAX-CUT Algorithm
    3. Greedy MAX-CUT Algorithm
  2. Independent Set Algorithm
    1. Crude SDP-based Independent Set [2]
    2. Greedy Independent Set Algorithm
    3. Spectral Algorithm for Independent Set

Install and Usage

You can install this directly from the Python Package Index (PyPI).

pip install cvxgraphalgs

Below, we show how to run the Goemans-Williamson MAX-CUT Algorithm on a graph drawn from the stochastic block model distribution. For more examples, explore the jupyter notebooks available with the package documentation available here.

>>> import cvxgraphalgs as cvxgr
>>> graph, _ = cvxgr.generators.bernoulli_planted_independent(
...     size=50, independent_size=15, probability=0.5
... )
>>> recovered = cvxgr.algorithms.crude_sdp_independent_set(graph)
>>> len(recovered)
15

References

[1]: Goemans, Michel X., and David P. Williamson. "Improved approximation algorithms for maximum cut and satisfiability problems using semidefinite programming." Journal of the ACM (JACM) 42, no. 6 (1995): 1115-1145.

[2]: McKenzie, Theo, Hermish Mehta, and Luca Trevisan. "A New Algorithm for the Robust Semi-random Independent Set Problem." arXiv:1808.03633 (2018).

Metadata

Release files for cvxgraphalgs 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cvxgraphalgs 0.1.2
File Size Uploaded Provenance Actions
cvxgraphalgs-0.1.2.tar.gz 6.8 kB Without provenance Details for cvxgraphalgs-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cvxgraphalgs 0.1.2
File Interpreter ABI Platform Actions
cvxgraphalgs-0.1.2-py3-none-any.whl Python 3 none any Details for cvxgraphalgs-0.1.2-py3-none-any.whl

Total release size: 16.8 kB

Release files / cvxgraphalgs-0.1.2.tar.gz

Download URL cvxgraphalgs-0.1.2.tar.gz
Size 6.8 kB
Tags Source
SHA-256 checksum
How to use checksums
0dd81cae1d4b814b51fceae2df1532e9239ab04152768cc917a886ea17720445
BLAKE2b-256 checksum
How to use checksums
8bb31bcef1166cfd42b2fc89b759c78d8ea97f53bc808cb7625d3306e3c20765
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.8

Release files / cvxgraphalgs-0.1.2-py3-none-any.whl

Download URL cvxgraphalgs-0.1.2-py3-none-any.whl
Size 10.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
62e3e67663380776a80c5cb46bf46f2b955cece4e0f775cf64833225ff22ffe5
BLAKE2b-256 checksum
How to use checksums
f71a1c3447a31c2e7d4aea1d0250e0c69e00fb2ff541b765eb834c6ecf681490
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.8

Security for cvxgraphalgs 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page