我们可以求图的强连通分量(strongly connected component),然后将每个强连通子图收缩成一个“点”。新图的每个点的喜爱度,即为原图其所包含的所有的点的喜爱度之和。
基于2020个网页-相关网页
The crux of the algorithm comes in determining whether a node is the root of a strongly connected component.
算法的关键是判断一个结点是否是强连通分量的根。
The root node is simply the first node of the strongly connected component which is encountered during the depth-first traversal.
这个根结点是在深搜时碰到当前强连通分量的第一个结点。
When the search returns from a subtree, the nodes are taken from the stack and it is determined whether each node is the root of a strongly connected component.
当从一个搜索树返回时,判断该点是否是一个强连通分量的根。
应用推荐