Generation of K-Trees of undirected graphs