Project

yargraph

0.0
No commit activity in last 3 years
No release in over 3 years
Pure Ruby graph algorithms, particularly e.g. Hamiltonian cycles
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 1.0
>= 1.8.7
>= 3.12
>= 2.8.0

Runtime

>= 0
 Project Readme

Yargraph

Yet another Ruby graphing library. Implements some graph/vertex/edge related algorithms. Currently operates only on undirected graphs.

  • find all Hamiltonian cycles in a graph using an exponential time algorithm (hamiltonian_cycles, dynamic programming method of Bellman, Held, and Karp).
  • find edges that are a part of all Hamiltonian cycles (edges_in_all_hamiltonian_cycles, requires exponential time so may be very slow)
  • find only some edges that are a part of all Hamiltonian cycles (some_edges_in_all_hamiltonian_cycles, faster but may not find all edges)

Soon to be implemented:

  • finding bridges (bridges, requires linear time using Schmidt's chain decompositions method)
  • determining 3-edge-connectivity and if 3-edge-connected (but not 4- or more), determine pairs of edges whose removal disconnects the graph (three_edge_connected?, three_edge_connections, algorithm runs in O(n^2))

Contributions are most welcome.

Copyright

Copyright (c) 2014 Ben J. Woodcroft. See LICENSE.txt for further details.