We use a greedy strategy to list the spanning trees of the fan graph, $F_n$, such that successive trees differ by pivoting a single edge around a vertex. It is the first greedy algorithm for exhaustively generating spanning trees using such a minimal change operation. The resulting listing is then studied to find a recursive algorithm that produces the same listing in $O(1)$-amortized time using $O(n)$ space. Additionally, we present $O(n)$-time algorithms for ranking and unranking the spanning trees for our listing; an improvement over the generic $O(n^3)$-time algorithm for ranking and unranking spanning trees of an arbitrary graph.
翻译:我们用贪婪的策略来列出风扇图的横贯树木($F_n$),这样一连串的树木就因在顶层周围划一条边缘而有所不同。 这是使用这种最小的改变操作来无遗地生成横贯树木的第一个贪婪算法。 然后对由此得出的列表进行研究,以找到一种以美元(1美元)以平价计的递归算法,该算法在使用美元(n)平价时以美元(n)平价计算出相同的列表。 此外,我们提出用于排位和取消横贯树木排位的美元(n)时间算法,以备我们列单列;对任意图的排位和排位不排行的树的通用 $O(n)3美元(n)$-时间算法作了改进。