Go to content messages.homepage.accessibility

Kruskal's algorithm

1. Original procedure of the algorithm

2. Proposals of adaptation

1. Edges of a graph are organized in a table according to nodes, and a subgraph is created in another document (sheet):

The graph is converted to a table. We add labels of the nodes to the first column. All the other cells on the row for a node X are reserved for the edges coming out from X and are written as XnY where n is a weight of the edge and Y is the end node of the edge. We use another sheet or a separate text file:

  1. to add the edges of the subgraph T consecutively.
  2. to organize sets of nodes connected together by existing edges of the subgraph T.

Let's take the same graph H with seven nodes illustrated in Image 2. The following two tables (see Table 1 and Table 2) demonstrate the situation after addition of the first two edges to the subgraph T.

Example 2: Graph H from Image 1 converted to a table
A A5C A6D A7B
B B5D B6E B7A
C C3D C5A
D D3C D3G D4F D5B D6A
E E4G E6B
F F4D F7G
G G3D G4E G7F
Table 1: Graph H converted to a table after addition of the first two edges C2F, D2E
Example 3: Subgraph T (the future minimum spanning tree)
MST – Edges: C2F D2E
MST – Sets of Vertices:
C, F
D, E
Table 2: Subgraph T (the future minimum spanning tree) after addition of the first two edges C2F, D2E

The last table demonstrates the following fact. The first two edges of the subgraph T connect two sets of nodes  \{ C, F \} and  \{ D, E \}. Before adding the next edge C3D we have to check if it does not imply a new cycle at the subgraph T. A sighted student checks that visually while a blind one does so by organizing sets of nodes connected together by edges of the subgraph T. If both nodes of a processed edge belong to the same set of nodes, he/she immediately knows a cycle is going to be created. Otherwise he/she can update the Table 3, add the processed edge to the subgraph T and modify the sets of nodes connected together. He/she should not forget the currently processed edge was kept in the Table 2 twice therefore it is necessary to delete it at both places.

2. Edges are organized in two rows of a table, a subgraph is created in another document (sheet):

The graph is again converted to a table but edges are organized differently. They are completely described in the first column as strings xny where symbols x, y indicate nodes connected by an edge with a weight n. The second column serves to repeat the weight of the edge. Such an organization of the edges is demonstrated in Table 3.

Example 4: Graph edges organized in two columns
A5C 5
A6D 6
A7B 7
B5D 5
B6E 6
C2F 2
C3D 3
D2E 2
D3G 3
D4F 4
E4G 4
F7G 7
Table 3: Edges of the graph H organized in two columns including their weight

Most of the spreadsheet applications enable users to arrange data according to values of a certain column. Therefore a blind student can sort edges in ascending order with regard to weights kept in the second column. To consecutively prepare the subgraph T and sets of nodes connected by the subgraph's edges we use the second sheet or a separate document. We process the algorithm in the same manner as previously.

3. Discussion of pros and cons