Skip to main content

Module combinatorial

Module combinatorial 

Source
Expand description

Combinatorial optimization algorithms.

This module provides solvers for classic combinatorial optimization problems:

  • TSP (tsp): Traveling Salesman Problem — nearest-neighbor heuristic, 2-opt, 3-opt, Or-opt local search, MST lower bound, and a full solver.
  • Knapsack (knapsack): 0/1 knapsack DP (exact), branch-and-bound (exact), greedy heuristic, fractional knapsack, and multi-dimensional knapsack.
  • Assignment (assignment): Hungarian algorithm (Kuhn-Munkres) for minimum-cost assignment, and sparse minimum-cost bipartite matching.
  • Graph Coloring (graph_coloring): Welsh-Powell greedy, DSATUR, exact backtracking, and chromatic number computation.
  • Covering (covering): Set cover, weighted set cover, vertex cover (2-approximation), König’s exact minimum vertex cover for bipartite graphs, and hitting set.

Re-exports§

pub use assignment::hungarian_algorithm;
pub use assignment::min_cost_matching;
pub use assignment::AssignmentResult;
pub use covering::greedy_set_cover;
pub use covering::hitting_set;
pub use covering::min_vertex_cover_bip;
pub use covering::vertex_cover_2approx;
pub use covering::weighted_set_cover;
pub use covering::CoveringResult;
pub use graph_coloring::ColoringResult;
pub use graph_coloring::GraphColoring;
pub use knapsack::fractional_knapsack;
pub use knapsack::knapsack_branch_bound;
pub use knapsack::knapsack_dp;
pub use knapsack::knapsack_greedy;
pub use knapsack::multi_knapsack_greedy;
pub use knapsack::KnapsackItem;
pub use knapsack::KnapsackResult;
pub use knapsack::MultiKnapsackItem;
pub use tsp::mst_lower_bound;
pub use tsp::nearest_neighbor_heuristic;
pub use tsp::or_opt;
pub use tsp::three_opt_move;
pub use tsp::tour_length;
pub use tsp::two_opt;
pub use tsp::TspResult;
pub use tsp::TspSolver;

Modules§

assignment
Assignment problem solvers.
covering
Set cover, weighted set cover, vertex cover, and hitting set algorithms.
graph_coloring
Graph coloring algorithms.
knapsack
0/1 Knapsack and fractional knapsack solvers.
tsp
Traveling Salesman Problem (TSP) solvers and heuristics.