最佳算法是完整算法吗?

编程入门 行业动态 更新时间:2024-10-28 12:19:20
本文介绍了最佳算法是完整算法吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我确实知道,完整的算法是一种解决方案,只要有解决方案,它就能找到它,而最优算法是一种能够找到成本最低的解决方案的算法.

I do understand that a complete algorithm is one where if there is a solution, the algorithm is able to find it and that optimal algorithm is one where it manages to find a least cost solution.

但是最优算法是完整算法吗?能不能简单解释一下?

But is an optimal algorithm, a complete algorithm? Can please briefly explain?

谢谢.

推荐答案

是的,根据定义.找到最佳解决方案需要证明最优性.可以通过找到所有解决方案或证明没有一种解决方案比已经找到的解决方案具有更好的成本来实现.无论哪种情况,都必须找到至少一个解决方案.

Yes, by definition. Finding the optimal solution entails proving optimality. This can be done by finding all solutions or by proving that no solution can have better cost than the one found already. In either case, at least one solution has to be found.

如果没有解决方案,那么最佳算法或完整算法都将找不到解决方案.

If there is no solution, neither an optimal nor a complete algorithm would find one of course.

更多推荐

最佳算法是完整算法吗?

本文发布于:2023-11-29 23:48:02,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1648002.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:算法   完整

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!