跳到正文
EasyXiv 检索
投稿 关于 登录

按回车检索 · 直接输入编号(如 1706.03762)可跳转到论文

计算机科学 > 数据结构与算法

arXiv:2404.05664 (cs)
[提交于 2024年4月8日 (v1),最后修订于 2026年7月10日 (此版本, v2)]

标题:BFS versus DFS for fixed-level targets in ordered trees

作者:Stoyan Dimitrov, Martin Minchev, Yan Zhuang
查看论文《BFS versus DFS for fixed-level targets in ordered trees》的 PDF
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读
摘要:We find the average time complexity of the breadth-first search (BFS) and the depth-first search (DFS) algorithms, when one searches for a target node selected uniformly at random among all nodes at level $\ell$ in the set of ordered trees with $n$ edges. Intuition suggests that on average BFS must be asymptotically faster than DFS if and only if $\ell$, as a function of $n$, is below a certain threshold. We confirm this intuition by showing that there exists a unique constant $\lambda\approx 0.789004$, such that in expectation BFS is asymptotically faster than DFS if and only if $\ell\leq \lambda\sqrt{n}$. This gives us a practical rule to select between the two algorithms, even when we do not know the exact value of $\ell$, but only an estimate of it. Furthermore, we find the asymptotic average time complexity of BFS in the given setting for an arbitrary class of Galton--Watson trees, which includes ordered trees, binary trees, and other popular classes. We use results on the occupation measure of Brownian excursions, as well as combinatorial identities related to lattice paths. Finally, we consider the simple \textit{truncated DFS} algorithm, which can be shown easily to be asymptotically faster than both BFS and DFS when $\ell$ is known in advance. We show that in fact its asymptotic time complexity is $1/2$ of the asymptotic complexity of BFS, when $\ell = s\sqrt{n}$ for any constant $s$. Several further questions are also raised.
评论: 28 pages
主题: 数据结构与算法 (cs.DS); 离散数学 (cs.DM); 组合数学 (math.CO); 概率论 (math.PR)
引用方式: arXiv:2404.05664 [cs.DS]
  (或者 arXiv:2404.05664v2 [cs.DS] 对于此版本)
  https://doi.org/10.48550/arXiv.2404.05664

提交历史

来自:Stoyan Dimitrov
[v1] 2024年4月8日 星期一 16:48:20 UTC (75 KB)
[v2] 2026年7月10日 星期五 04:19:35 UTC (38 KB)
全文链接:

访问论文:

  • 查看原文 PDF
  • 中文 PDF (下批处理)
  • EasyResearch 阅读
  • TeX 源文件
  • arXiv 原文页面
查看许可

当前浏览上下文:

math.PR
< 上一篇   |   下一篇 >
最新 | 近期 | 2026-07
切换浏览方式为:
cs
cs.DS
cs.DM
math.CO

参考文献与引用

  • Google Scholar
  • Semantic Scholar

BibTeX 格式的引用

EasyXiv 是独立运营的中文预印本站点,与 arXiv 及康奈尔大学无隶属关系。 论文元数据与原文来自 arXiv.org,感谢 arXiv 提供开放获取服务。
关于 · 帮助 · 投稿指南 · 版权 · arXiv 原站