Solving combinatorial reconfiguration problems.
Project description
Reconfillion - Python interface for combinatorial reconfiguration problems
Reconfillion was released as version 1.0.0 on April 22, 2024. The older version of reconfillion before that date exists on https://github.com/junkawahara/reconfillion-kari , but is not compatible with this version.
Reconfillion is a tool for solving combinatorial reconfiguration problems. It works with graphillion, which means that combinatorial reconfiguration problems of graph classes that are supported by graphillion can be solved by reconfillion.
Requirements
- Graphillion version v1.7 or higher is needed.
License
MIT License
Quick install
You can install reconfillion via pip.
pip install reconfillion
Tutorial
Let's consider to solve the spanning tree reconfiguration problem. In reconfillion (and graphillion), an edge is represented by a tuple of two vertices, and a graph is represented by a list of edges.
# complete graph with 4 vertices [1, 2, 3, 4]
graph = [(1, 2), (1, 3), (1, 4), (2, 3), (2, 4), (3, 4)]
We import graphillion and reconfillion, and make GraphSet of all the spanning trees on the graph.
from graphillion import GraphSet
from reconfillion import reconf
GraphSet.set_universe(graph) # See the graphillion manual.
spanning_trees = GraphSet.trees(is_spanning = True)
Then, by doing the following method, we can obtain the reconfiguration sequence between s and t.
s = [(1, 2), (1, 3), (1, 4)] # start spanning tree
t = [(1, 4), (2, 4), (3, 4)] # goal spanning tree
# obtain a reconfiguration sequence between s and t under the token jumping model.
reconf_sequence = reconf.get_reconf_seq(s, t, spanning_trees, model = 'tj')
# obtained [[(1, 4), (2, 4), (3, 4)], [(1, 2), (1, 4), (2, 4)], [(1, 2), (1, 3), (1, 4)]]
Note
This software (and graphillion) needs a lot of memory to solve problems with large-size instances.
Authors
Reconfillion has been developed by Jun Kawahara and Hiroki Yamazaki.
Acknowledgment
This project is/was partially supported by JSPS KAKENHI Grant Numbers JP18H04091, JP20H05794, and JP23H04383.
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
File details
Details for the file reconfillion-1.0.1.tar.gz
.
File metadata
- Download URL: reconfillion-1.0.1.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ca233fe252c353c6d306af26adfd7016dd697b6cc09068e5b344a7f550f2ab4c |
|
MD5 | fba4bab086f35a01e06126c31928635e |
|
BLAKE2b-256 | 5c2b7a0bc452153ab45641de9d1940ba7f608a17a20006b118701af2ca0ca49c |
File details
Details for the file reconfillion-1.0.1-py3-none-any.whl
.
File metadata
- Download URL: reconfillion-1.0.1-py3-none-any.whl
- Upload date:
- Size: 4.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b52f38fecb6f60c51aef64dcee41e2edef773882ffc1164d056338347c99f218 |
|
MD5 | 7774e99d8c4491d42f04037b13e3ab82 |
|
BLAKE2b-256 | fba53e59fd149615111f0a5479689f413c297a3f815fe1569c877644121580c1 |