Minimum Spanning Tree in Processing

Simon’s version of Daniel Shiffman’s Minimum Spanning Tree tutorial: Simon translated it from JavaScript into Processing (Java), “a much more complex project than the circles with no overlap!”

A minimum spanning tree or minimum weight spanning tree is a subset of the edges of a connected undirected graph that connects all the vertices together, without any cycles and with the minimum possible total edge weight. Simon said it resembled the Traveling Salesperson problem, except that the spanning tree can have “loose ends”:

 

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s