M
M
MonnWhiteborn2016-04-11 20:33:41
Programming
MonnWhiteborn, 2016-04-11 20:33:41

How to bypass the maximum number of edges of an undirected weighted graph?

There is an undirected weighted cyclic graph, an entry vertex is given. It is necessary to bypass the maximum number of vertices and then return to the original one, without increasing the maximum allowable weight (which is also set).
Please help with the algorithm, or at least advise some literature.
UPD. I still think that it is necessary to build on the smallest distance. Until the maximum weight is exceeded, look for the minimum path to the vertex (also because the graph is large, and the vertices that should be bypassed make up only a fraction of all). I read a little e-maxx, found this algorithm for finding the shortest paths between all n ... , maybe it will help me, but I still don’t know how to approach it, with algorithms for "you". And, yes, the maximum weight can be slightly exceeded.
UPD. Just in case, I attach a file with an adjacency matrix

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Stanislav Makarov, 2016-04-12
@MonnWhiteborn

There is an undirected weighted cyclic graph, an entry vertex is given. It is necessary to bypass the maximum number of vertices and then return to the original one, without increasing the maximum allowable weight (which is also set).

If I'm not confusing anything but looking at night, then this is the traveling salesman problem . It's strange that no one has mentioned anything about it so far.
The task is NP-complete, rather quickly (something around 60-70 vertices) becomes transcomputational, for 200 vertices there can be no question of any complete enumeration. I advise you to look at the branch and bound method .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question