Skip to main content
Python Software Foundation 20th Year Anniversary Fundraiser  Donate today!

An efficient implementation of Algorithm X

Project description

Algorithm X

An efficient Python implementation of Algorithm X, which finds solutions to instances of the Exact Cover problem.

Installation

$ pip install algorithm-x

Usage

from algorithm_x import AlgorithmX

solver = AlgorithmX(7)
solver.appendRow([2, 4, 5], 'row 1')
solver.appendRow([0, 3, 6], 'row 2')
solver.appendRow([1, 2, 5], 'row 3')
solver.appendRow([0, 3], 'row 4')
solver.appendRow([1, 6], 'row 5')
solver.appendRow([3, 4, 6], 'row 6')

for solution in solver.solve():
    print(solution)

Project details


Download files

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

Files for algorithm-x, version 0.1.0
Filename, size File type Python version Upload date Hashes
Filename, size algorithm_x-0.1.0-py3-none-any.whl (4.4 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size algorithm_x-0.1.0.tar.gz (2.9 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page