In a complete graph with $n$ vertices there are $n^{n-2}$ spanning trees.
I want to get a random sample of size $k$ from the set of all spanning trees.
The most basic and naive idea is to generate all spanning trees and select the required sample. But that's costly.
Are there some other approaches? Possibly, enumerating them without generating?
The ideal way would be to set a one-to-one correspondence between a natural number and a spanning tree.
So, for example I generate a random sample of numbers, say $(7,12,5)$, and then, based on these numbers, I get spanning trees.