广度优先搜索是否可能比 IDDFS 具有更长的运行时间(O(n))

发布于 2024-09-05 12:40:37 字数 188 浏览 1 评论 0原文

我一小时后有一场考试,讲座幻灯片中有一些我不同意的内容。有一个很好的小表说 BFS 的时间复杂度是 O(b^(d+1)),IDDFS 的时间复杂度是 O(b^d),其中 b 是分支因子,d 是分支因子解决方案。我不知道他从哪里得到的 BFS 时间复杂度+1,更何况,除了实现效率之外,以我对 IDDFS 的理解,我不知道为什么 BFS 会扩展更多节点。我疯了吗?

I have an exam in an hour, and theres something in the lecture slides that I disagree with. Theres a nice little table saying that the time complexity of BFS is O(b^(d+1)), and the time complexity of IDDFS O(b^d), where b is a branching factor and d is the depth of the solution. I have no idea where he got the +1 for the BFS time complexity, and further more, implementation efficiency asside, with my understanding of IDDFS I have no idea why BFS would expand more nodes. Am I insane?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文