{"title":"Energy Constrained Depth First Search","authors":"Shantanu Das, Dariusz Dereniowski, Przemysław Uznański","doi":"10.1007/s00453-024-01275-8","DOIUrl":null,"url":null,"abstract":"<div><p>Depth first search is a natural algorithmic technique for constructing a closed route that visits all vertices of a graph. The length of such a route equals, in an edge-weighted tree, twice the total weight of all edges of the tree and this is asymptotically optimal over all exploration strategies. This paper considers a variant of such search strategies where the length of each route is bounded by a positive integer <i>B</i> (e.g. due to limited energy resources of the searcher). The objective is to cover all the edges of a tree <i>T</i> using the minimum number of routes, each starting and ending at the root and each being of length at most <i>B</i>. To this end, we analyze the following natural greedy tree traversal process that is based on decomposing a depth first search traversal into a sequence of limited length routes. Given any arbitrary depth first search traversal <i>R</i> of the tree <i>T</i>, we cover <i>R</i> with routes <span>\\(R_1,\\ldots ,R_l\\)</span>, each of length at most <i>B</i> such that: <span>\\(R_i\\)</span> starts at the root, reaches directly the farthest point of <i>R</i> visited by <span>\\(R_{i-1}\\)</span>, then <span>\\(R_i\\)</span> continues along the path <i>R</i> as far as possible, and finally <span>\\(R_i\\)</span> returns to the root. We call the above algorithm <i>piecemeal-DFS</i> and we prove that it achieves the asymptotically minimal number of routes <i>l</i>, regardless of the choice of <i>R</i>. Our analysis also shows that the total length of the traversal (and thus the traversal time) of piecemeal-DFS is asymptotically minimum over all energy-constrained exploration strategies. The fact that <i>R</i> can be chosen arbitrarily means that the exploration strategy can be constructed in an online fashion when the input tree <i>T</i> is not known in advance. Each route <span>\\(R_i\\)</span> can be constructed without any knowledge of the yet unvisited part of <i>T</i>. Surprisingly, our results show that depth first search is efficient for energy constrained exploration of trees, even though it is known that the same does not hold for energy constrained exploration of arbitrary graphs.</p></div>","PeriodicalId":50824,"journal":{"name":"Algorithmica","volume":"86 12","pages":"3759 - 3782"},"PeriodicalIF":0.9000,"publicationDate":"2024-10-12","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"https://link.springer.com/content/pdf/10.1007/s00453-024-01275-8.pdf","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Algorithmica","FirstCategoryId":"94","ListUrlMain":"https://link.springer.com/article/10.1007/s00453-024-01275-8","RegionNum":4,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q4","JCRName":"COMPUTER SCIENCE, SOFTWARE ENGINEERING","Score":null,"Total":0}
引用次数: 0
Abstract
Depth first search is a natural algorithmic technique for constructing a closed route that visits all vertices of a graph. The length of such a route equals, in an edge-weighted tree, twice the total weight of all edges of the tree and this is asymptotically optimal over all exploration strategies. This paper considers a variant of such search strategies where the length of each route is bounded by a positive integer B (e.g. due to limited energy resources of the searcher). The objective is to cover all the edges of a tree T using the minimum number of routes, each starting and ending at the root and each being of length at most B. To this end, we analyze the following natural greedy tree traversal process that is based on decomposing a depth first search traversal into a sequence of limited length routes. Given any arbitrary depth first search traversal R of the tree T, we cover R with routes \(R_1,\ldots ,R_l\), each of length at most B such that: \(R_i\) starts at the root, reaches directly the farthest point of R visited by \(R_{i-1}\), then \(R_i\) continues along the path R as far as possible, and finally \(R_i\) returns to the root. We call the above algorithm piecemeal-DFS and we prove that it achieves the asymptotically minimal number of routes l, regardless of the choice of R. Our analysis also shows that the total length of the traversal (and thus the traversal time) of piecemeal-DFS is asymptotically minimum over all energy-constrained exploration strategies. The fact that R can be chosen arbitrarily means that the exploration strategy can be constructed in an online fashion when the input tree T is not known in advance. Each route \(R_i\) can be constructed without any knowledge of the yet unvisited part of T. Surprisingly, our results show that depth first search is efficient for energy constrained exploration of trees, even though it is known that the same does not hold for energy constrained exploration of arbitrary graphs.
深度优先搜索是一种天然的算法技术,用于构建一条能访问图中所有顶点的封闭路径。在有边加权的树中,这种路径的长度等于树中所有边总重量的两倍,而且在所有探索策略中,这是渐近最优的。本文考虑的是这种搜索策略的一种变体,即每条路径的长度由正整数 B 限定(例如,由于搜索者的能源资源有限)。我们的目标是用最少的路径覆盖树 T 的所有边,每条路径以根为起点和终点,每条路径的长度最多为 B。为此,我们分析了以下自然贪婪树遍历过程,该过程基于将深度优先搜索遍历分解为长度有限的路径序列。给定树 T 的任意深度优先搜索遍历 R,我们用路径 \(R_1,\ldots,R_l\)覆盖 R,每个路径的长度最多为 B,这样\(R_i\)从根开始,直接到达\(R_{i-1}\)访问过的R的最远点,然后\(R_i\)尽可能地沿着R的路径继续前进,最后\(R_i\)返回根。我们称上述算法为零碎-DFS,并证明无论 R 如何选择,它都能实现渐近最小的路径数 l。我们的分析还表明,在所有能量受限的探索策略中,零碎-DFS 的遍历总长度(以及遍历时间)都是渐近最小的。R 可以任意选择这一事实意味着,当输入树 T 事先未知时,探索策略可以在线构建。令人惊讶的是,我们的结果表明,深度优先搜索对于能量受限的树探索是有效的,尽管众所周知,对于任意图的能量受限探索来说,这一点并不成立。
期刊介绍:
Algorithmica is an international journal which publishes theoretical papers on algorithms that address problems arising in practical areas, and experimental papers of general appeal for practical importance or techniques. The development of algorithms is an integral part of computer science. The increasing complexity and scope of computer applications makes the design of efficient algorithms essential.
Algorithmica covers algorithms in applied areas such as: VLSI, distributed computing, parallel processing, automated design, robotics, graphics, data base design, software tools, as well as algorithms in fundamental areas such as sorting, searching, data structures, computational geometry, and linear programming.
In addition, the journal features two special sections: Application Experience, presenting findings obtained from applications of theoretical results to practical situations, and Problems, offering short papers presenting problems on selected topics of computer science.