Given a connected graph, the objective of this system is to build a (any) spanning tree of the graph, the intermediate structures can only be trees.
The table below, lists all the colors used in the graph, along with their interpretations.
Node/Edge Color | Type |
Unselected Node | |
Selected Node | |
Unselected Edge | |
Candidate Edge | |
Selected Edge |
In this system, you are provided with a connected graph. You can click on any node to select it. Candidate Edges can be clicked, to add those edge to the sub-graph. Clicking other nodes is not permitted after selecting a node.
Starting from a vertex s, visiting each vertex of a graph , and not exploring anything twice. This process is called a graph traversal. The next node to be visited must be an unexplored neighbour of the visited nodes. A graph traversal outputs a spanning tree of the associated graph.
After selecting the first node, you will see spanning tree beside the graph. At this point the tree has just the one selected node. Now, you will observe that the edges connected to the selected node(s) are marked as "candidates" (See the color codes table).
Select any node to add it to the tree.