1

I am trying to use python igraph to compute the Gomory Hu tree of the Heawood graph. However, when I go to calculate this, it returns that the gomory hu tree is the path on 14 vertices. But I know that the gomory hu tree of the heawood graph should be the star. Can someone let me know if there is something I am doing wrong, or if this is a bug in the code?

# generating the heawood graph to test the gomory hu tree function
h = Graph()
h.add_vertices(14)
h.add_edges([(0, 1),(0, 5),(0, 13),(1, 2),(1, 10),(2, 3),(2, 7),(3, 4),
(3, 12),(4, 5),(4, 9),(5, 6),(6, 7),(6, 11),(7, 8),(8, 9),(8, 13),(9, 10),(10, 11),(11, 12),(12, 13)])
tree = h.gomory_hu_tree()
print(tree)
IGRAPH U--- 14 13 --
+ attr: flow (e)
+ edges:
0--1 1--2 2--3 3--4 4--5 5--6 6--7 7--8 8--9 9--10 10--11 11--12 12--13 # which is the path 
Dani
  • 11
  • 1

1 Answers1

0

This was a bug in igraph, and it was fixed recently. Please see here for details:

The fix will be in C/igraph 0.9.5 and python-igraph 0.9.8, to be released soon (as of this writing).

Szabolcs
  • 24,728
  • 9
  • 85
  • 174