Skip to content

SuprDewd/algorithm_x_python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)

About

An efficient implementation of Algorithm X in Python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages