We present an analysis of the depth-first search algorithm in a random digraph model with independent outdegrees having a geometric distribution. The results include asymptotic results for the depth profile of vertices, the height (maximum depth) and average depth, the number of trees in the forest, the size of the largest and second-largest trees, and the numbers of arcs of different types in the depth-first jungle. Most results are first order. For the height we show an asymptotic normal distribution. This analysis proposed by Donald Knuth in his next to appear volume of The Art of Computer Programming gives interesting insight in one of the most elegant and efficient algorithm for graph analysis due to Tarjan.
翻译:我们在一个随机测算模型中对深度第一搜索算法进行了分析,该模型的独立外度具有几何分布。结果包括脊椎深度剖面、高度(最大深度)和平均深度的无症状结果,森林中的树木数量,最大和第二大树木的大小,以及深度第一丛林中不同类型弧体的数量。多数结果为第一顺序。对于高度,我们显示的是无症状正常分布。Donald Knuth在下一卷《计算机编程》中提议的这一分析,为Tarjan的图表分析提供了最优和最高效的算法。