Is there an algorithm to find a spanning tree (cost does not matter) on a hypergraph in both of the cases when it's uniform or non-uniform; assuming a spanning tree exists on the hypergraph?
Will Kruskal's Algorithm extend here too?
Is there an algorithm to find a spanning tree (cost does not matter) on a hypergraph in both of the cases when it's uniform or non-uniform; assuming a spanning tree exists on the hypergraph?
Will Kruskal's Algorithm extend here too?
Copyright © 2021 JogjaFile Inc.
Deciding if a $k$-uniform hypergraph has a linear spanning tree is NP-complete for all $k\geq 3$. Of course one could still write a slow brute force algorithm to do this.
Unfortunately Kruskal's algorithm will not work usually. Take for example the $3$-uniform hypergraph on vertex set $[5]$ with edges $\{1,2,3\},\{3,4,5\},\{2,3,4\}$. If one attempts to naïvely run Kruskal's algorithm, and $\{2,3,4\}$ is the first edge chosen, then the algorithm will fail even though our hypergraph does has a spanning tree.