Skip to main content
2 of 2
updated code
Max Alekseyev
  • 34.3k
  • 5
  • 74
  • 152

Here is a SageMath code generating caterpillar graphs on $n$ nodes based on enriching a path graph with leaves. As an example it shows all such graphs on 6 nodes.

Max Alekseyev
  • 34.3k
  • 5
  • 74
  • 152