Skip to main content

Searching for combinatorial covers.

Project description

CombCov

Build Status Coverage Status Licence

PyPi Version PyPi Downloads Python Implementation Python Versions

A generalization of the permutation-specific algorithm Struct -- extended for other types of combinatorial objects.

Demos

Take a look at the demo/ folder in this repo to see examples on how to use CombCov with your own combinatorial object. On example finds a String Set cover for the set of string over the alphabet {a,b} that avoids the substring aa (meaning no string in the set contains aa as a substring).

$ python -m demo.string_set
[INFO] Total of 87 elements of size up to 7
[INFO] Enumeration: [1, 2, 3, 5, 8, 13, 21, 34]
[INFO] Bitstring to cover: 154742504910672534362390527 
[INFO] Total of 16 subrules
[INFO] Trying to find a cover for ''*Av(aa) over ={a,b} using elements up to size 7.
Solution nr. 1:
 - Rule #1: ''*Av(b,a) over ∑={a,b} with bitstring 1
 - Rule #2: 'a'*Av(b,a) over ∑={a,b} with bitstring 2
 - Rule #3: 'b'*Av(aa) over ∑={a,b} with bitstring 154742431132702343545997108
 - Rule #4: 'ab'*Av(aa) over ∑={a,b} with bitstring 73777970190816393416

Development

Run unittests (with coverage for the demo module as well):

./setup.py test --addopts --cov=demo

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

CombCov-0.1.0.tar.gz (4.2 kB view hashes)

Uploaded Source

Supported by

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