English 中文(简体)
找到一条最起码的穿越路径的算法?
原标题:Algorithm to find a minimal spanning path ?

受此连环漫画的启发"http://xkcd.com/173/" rel="noreferrer">http://xkcd.com/173/

我知道有很多算法可以找到一个加权图表中最小的横线, 然而我一直在努力寻找任何能找到最小的跨线路径的算法。

对于漫画来说,如果我们根据每一对情侣关系来权衡每一边的边际,那么社会的最佳安排将是一条最起码的横跨路径,即一条跨越所有脊椎的路径。有人能帮忙吗?

问题回答

找到最佳的汉密尔顿路(也称为最优路径覆盖 )是一个棘手的问题。 (确定是否存在汉密尔顿路是一个完整的问题。 ) < a href="http://www.austms.org.au/Publ/Jamsb/V44P2/pdf/1761.pdf" rel=“nofollown noreferrerr” > 这篇学术文章 除其他外,讨论一个最佳路径覆盖算法。 您可以在网上搜索这些术语以寻找其它资源。 我不知道任何现成的代码 。

顺便说一句, (基本上是你的复制品)清楚地解释了为什么《旅行销售员问题》不是起步地。





相关问题
Java: JGraphT: Iterate through nodes

I m trying to iterate through all nodes, so I can print them out for graphviz. What is the best way to do that using the JGraphT library? public static void main(String[] args) { UndirectedGraph&...

Java: Adding nodes to graph bug

Preface: I know that there are high quality graph APIs available. I m interested in writing my own for self-improvement. This is my function to add nodes: public void addNode(Vertex v, ...

Radial plotting algorithm

I have to write an algorithm in AS3.0 that plots the location of points radially. I d like to input a radius and an angle at which the point should be placed. Obviously I remember from geometry ...

Microsoft .Net Chart Control not showing markers

I m using the Microsoft Chart Controls for Microsoft .NET Framework 3.5 and am having a spot of trouble getting Data Markers to show on the image. I m generating the chart at run-time, so can t just ...

3D graphs using pChart

Is there a way to draw a 3D Bar Graph using the pChart library in PHP? I m able to draw a 3D Pie graph but not a line graph. My code looks as follows //The 3D bar graph # // Dataset ...

Finding cycle of 3 nodes ( or triangles) in a graph

I am working with complex networks. I want to find group of nodes which forms a cycle of 3 nodes (or triangles) in a given graph. As my graph contains about million edges, using a simple iterative ...

How to create line chart in iPhone application? [closed]

I am creating a budget application in iPhone, to budget for personal incomes and expenses. Client s need is I want to see line graph (like stock market line report). Red line for (monthly / weekly /...

热门标签