0

How to find in undirected, weighted graph the minimal eulerian path?(This path must contain the given edges)

The weight of the edges is the sum of the 2 points(exmpl:edge 4-9 weight=4+9=13) for all edges.

example: With 6 nodes(N),and with 5 edges(E):

(1-5)
(6-1)
(5-5)
(2-4)
(2-4)

solution: We must add 2 edges,to minimal eulerian path:

1-2
1-2

In this example 3rd node is isolated,but that's not problem. Target: An eulerian path,which is contain all the Start-edges. In this example we can with the 2 complementary edges(1-2)(1-2) an Euler path do: 5->5->1->2->4->2->1->6. So we visited all the Start-edges,with minimal complementary edges,and we use all edges just once.

What is the best algorithm to find, when 1<N,E<100000 ,and must run in 0.01 second?

  • 1
    Your example graph confuses me. It does not seem to contain 12 edges or 10 nodes. Also, your Eulerian path only looks to have one edge repeated twice. What representation are you using here? – beaker Mar 31 '20 at 16:38
  • Sorry its not 10 and 12 ,also with 6 nodes ,and with 5 edges. – Péter Babják Mar 31 '20 at 17:12
  • And 3rd node is isolated. – Péter Babják Mar 31 '20 at 17:12
  • How to add edges in this (disconnected/connected)graph,to be an minimal cost Eulerian path,which is contain all Start-edges. – Péter Babják Mar 31 '20 at 17:17
  • Target: An eulerian path,which is contain all the Start-edges.In example we can with the 2 complementary edges(1-2)(1-2) an Euler path do: 5->5->1->2->4->2->1->6. So we visited all the Start-edges,with minimal complementary edges,and we use all edges just once. – Péter Babják Mar 31 '20 at 17:28
  • I'm not sure I have an answer for you, but please [edit] your question with any updates or clarifications. That's where people will be looking for your question, not in the comments. – beaker Apr 01 '20 at 14:43

0 Answers0