A command-line tool for automatically classifying LCL problems on rooted trees.
Project description
Description
This folder contains a program that decides round complexity of homogenous LCL problems on (binary) trees.
The program uses three subroutines to determines a problem's complexity.
- constant_decider
- decides whether a problem is O(1) solvable or it is inherently harder
- log_decider
- decides whether a problem is log(n) solvable or it is inherently harder
- log_star_decider
- decides whether a problem is log*(n) solvable or it is inherently harder
Usage
-
Install dependencies by
pip3 install -r requirements.txt
. -
Run
python -m rooted_tree_classifier
and describe (on standard input) constraints of a problem. For example:
Note that one needs to first run the classifier (python -m rooted_tree_classifier
) and only afterwards provide an input
on a separate line.
python -m rooted_tree_classifier
111
Expected output is O(1)
python -m rooted_tree_classifier
112 121 122
Expected output is O(1)
python -m rooted_tree_classifier
121 131 212 323
Expected output is O(log*n)
python -m rooted_tree_classifier
112 121
Expected output is Θ(log n)
python -m rooted_tree_classifier
112 123 131
Expected output is Θ(log n)
python -m rooted_tree_classifier
121 212
Expected output is Ω(n)
Tests
To execute tests, run the following from the root directory:
python -m unittest discover
Project details
Release history Release notifications | RSS feed
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 rooted-tree-classifier-0.1.6.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 333131f1ab4d56f7099a8c2e394dba378bda8327a0282d2b0e8bb30ee3758895 |
|
MD5 | 4b164a2615714f1d62a9e860e0b4a345 |
|
BLAKE2b-256 | 398c57f05084516335260f4d916d6c60d7f19378ce4f94a5e3ebde3b6687d541 |
Hashes for rooted_tree_classifier-0.1.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e407987dfa81208bac10f5902c7f87c12231b107ce715416ccfc56ba2781c2df |
|
MD5 | b57047cfeb32cb50b386f618f5e5befe |
|
BLAKE2b-256 | a578a4f4e1217bf2a35fe2eb41fb98ed3a6c81f28e7b4be7797cd4ba6285b010 |