0

The question goes as follows:

After doing Kruskal for finding minimum spanning tree using the Union-find,

We are given an array of disjoint sets of 10 vertices.

Can you restore the MST's that Kruskal's found only using the given array:

Note: If the following example is unclear, It means the parent of node 1 is 7, etc..

Union-Find array before reconstruction

If I reconstruct the given array it looks like this:Union-Find array reconstruction

Note: I understand that with path compression it is impossible, But let's say that the Union-Find didn't use path compression, Is It still impossible?

Dannz
  • 495
  • 8
  • 20
  • What do you mean by _an array of disjoint sets of 10 vertices_? Do you mean an array of 10 distinct vertices? – Codor Jun 17 '17 at 18:15
  • What is the actual question here? Do you want the output as you have shown in the graph? Because this type of Parent node array is possible only when the MST looks like the drawn image. – Sanket Makani Jun 20 '17 at 08:28

0 Answers0