2

I need an algorithm that can find a tree decomposition given a graph in Python, the graphs will be small so it doesn't need to be very efficient. I have looked around but cannot find much on this at all. Anyone know of a package that can do this or some sudo code I could use to make my own?

Dominique Fortin
  • 2,212
  • 15
  • 20

1 Answers1

1

Have you looked at networkx? See: https://networkx.github.io/documentation/latest/reference/algorithms/approximation.html

Josep Valls
  • 5,483
  • 2
  • 33
  • 67