如何用alist表示方案中的加权图? [英] How can I represent weighted graph in scheme with alist?

查看:54
本文介绍了如何用alist表示方案中的加权图?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我必须用关键字表示一个(加权的,定向的)图表 - 图表的顶点?如何使用BFS算法和Dijkstra算法在图中找到最短和最便宜的路径。有人可以帮助我吗?

谢谢

解决方案

作为起点:Google



搜索BFS [ ^ ]带来以下有趣的链接:

http://en.wikipedia.org/wiki/Breadth-first_search [ ^ ]

http://www.princeton.edu/~achaney/tmve/wiki100k/docs/Breadth-first_search.html [ ^ ]

http://www.ics.uci.edu/~eppstein/161/960215.h tml [ ^ ]

和Youtube上的一些视频





搜索Dijkstra的 [ ^ ]

http://en.wikipedia.org/wiki/Dijkstra 's_algorithm [ ^ ]

http://optlab-server.sce.carleton.ca/POAnimations2007/DijkstrasAlgo.html [ ^ ]

和youtube上的一些视频





现在你有一个起点,重新广告信息,调查一下,当您有疑问或问题时随时回来,但不要忘记这是 快速 答案部分。如果你对具体问题提出10个具体问题,那就更好了,你得到更快的帮助,而不是一个关于如何引导的大问题

作为补充和未来更成功的问题,我推荐你可以阅读:

你有什么尝试? [ ^ ]

Hi,
I have to represent a (weighted,directed) graph with association-list with keys - vertices of the graph? How can I find the shortest and the "cheapest" path in the graph using BFS algorithm and Dijkstra's algorithm. Can someone help me?
Thank you

解决方案

As a start point: Google

Search BFS[^] bring among others following interesting links:
http://en.wikipedia.org/wiki/Breadth-first_search[^]
http://www.princeton.edu/~achaney/tmve/wiki100k/docs/Breadth-first_search.html[^]
http://www.ics.uci.edu/~eppstein/161/960215.html[^]
ans some videos in Youtube


Search Dijkstra's[^]
http://en.wikipedia.org/wiki/Dijkstra's_algorithm[^]
http://optlab-server.sce.carleton.ca/POAnimations2007/DijkstrasAlgo.html[^]
and some videos in youtube too


Now you have a start point, read the information, investigate a bit more and feel free to come back when you have questions or problems, but don't forget this is the Quick Answers section. It is better and you get faster help if you make 10 concrete questions about concrete problems, than a big question about a "how-to guide"
As addition and for more successfully questions in the future I recommend you to read:
What have you tried?[^]


这篇关于如何用alist表示方案中的加权图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆