Examples of Graph Algorithms in ruby