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.2.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 56b7ba84f8e210cdf119d4beca7d47c1388536e93da1df13e9a0103f4d88ef9f |
|
MD5 | da9cac640c15241a73b625cb872a57e0 |
|
BLAKE2b-256 | 919a011811312dc0065cabce68911a7484eecb1175f741f1772491afdd21c402 |
Hashes for rooted_tree_classifier-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a34a63cee7c2ec61c07f04f5ba876e2abe43b9eb066d1c9cc0fa0fb791d69e5e |
|
MD5 | 3d585d1db5b117544a3a498202f3365e |
|
BLAKE2b-256 | f2153370362f538089c8a030c30db1c282ff656fffbde9cdeffe5f0bcd1a93e6 |