A command-line tool for automatically calculating round complexity of LCL problems in cycles and paths based on their description in the node-edge-checkable formalism
Project description
Cyclepath classifier
A command-line tool for automatically calculating round complexity of LCL problems in cycles and paths based on their description in the node-edge-checkable formalism. It also reports the number of solvable/unsolvable instances of a problem when classifying it (see examples below).
The tool is based on the techniques described in this paper.
Requirements
- Python 3.8.3 or later version
Getting started
Run the tool specifying node and edge constraints of a problem in the node-edge-checkable formalism.
The required parameters are -t
or --type
, -n
or --node-constr
and -e
or --edge-constr
.
There are also optional parameters specifying start and end constraints: --start-constr
and --end-constr
--type
accepts 3 values: dir
, undir
and tree
for directed cyclepath, undirected cyclepath and a rooted tree respectively.
Unless the type is tree
, the tool will assume that the problem is defined for a path if either --start-constr
or --end-constr
is specified. Otherwise, cycle setting is assumed.
Examples
$ python3 -m cyclepath_classifier -t undir -n "{ 11, 22, 33 }" -e "{ 12, 21, 13, 31, 23, 32 }"
Round complexity of the problem is Θ(log* n)
There are infinitely many solvable instances
There are finitely many unsolvable instances
$ python3 -m cyclepath_classifier -t undir -n "{ 12, 21 }" -e "{ 11, 22 }"
Round complexity of the problem is Θ(n)
There are infinitely many solvable instances
There are infinitely many unsolvable instances
$ python3 -m cyclepath_classifier -t undir -n "{00, 1M}" -e "{01, 10, 11, MM}" --start-constr "{ 1 }" --end-constr "{ 1 }"
A problem cannot be of 'undirected' type if its constraints are asymmetric. Otherwise it is not well-defined.
$ python3 -m cyclepath_classifier -t dir -n "{00, 1M}" -e "{01, 10, 11, MM}" --start-constr "{ 1 }" --end-constr "{ 1 }"
Round complexity of the problem is O(1)
There are finitely many solvable instances
There are infinitely many unsolvable instances
$ python3 -m cyclepath_classifier -t tree -e "{ 11, 22 }"
Round complexity of the problem is O(1)
There are infinitely many solvable instances
There are finitely many unsolvable instances
python3 -m cyclepath_classifier -t tree -e "{ 12, 13, 23, 21, 31, 32 }"
Round complexity of the problem is Θ(log* n)
There are infinitely many solvable instances
There are finitely many unsolvable instances
Tests
Run tests with python -m unittest discover
. See the tests/test.py
file for details.
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
Built Distribution
Hashes for cyclepath-classifier-0.2.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8ba33bc75ee6a534c93187d2e67d9c088386fe8647531e9988ad5fd6e39abd0a |
|
MD5 | 8a9baf4a4b6a08bbcb7b3f634301ee37 |
|
BLAKE2b-256 | 4be71adc9f7a104247698ef1ec2ad1f00b9851bba3334a9c379ec6c9a05b0ecc |
Hashes for cyclepath_classifier-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8400fcccc1fe893fa12a7bec047378fc40c6df9313d879bbba51bbc39462bf6d |
|
MD5 | 6af8250e4935ad7ca299038e7da82a99 |
|
BLAKE2b-256 | 1a0d45e3b8298c01cde95c7a86dd8565d56d1bd863c238f9622c7f03323c48b7 |