This program is a collection of algorithms related to the character-pair problem. Given a source text composed of words separated by whitespace characters, a solution to the character-pair problem is a text composed of words from the source that includes every pair of characters that appear in that source text. This repository includes solvers that attempt to find minimal solutions by various means, as well as other utilities such as a solution checker.
This program can be built from source using Cargo, Rust's package manager.
cargo run
is the easiest way to get started, flags for the dyad reducer are passed after two dashes. e.g. cargo run -- ./example_input.txt
A full list of available commands can be produced by using the --help
argument.
Here are descriptions of the implemented solvers:
This greedy algorithm creates a solution by repeatedly scanning the list of unchosen words and choosing the shortest word that contains the largest number of unchosen character pairs.
Contributions are very welcome! Please see CONTRIBUTING.md for details.
Dyad Reducer is distributed under the terms of the Apache License (Version 2.0). See LICENSE.txt for details.