Graph traversal with constraints.

Правка en1, от HOMIARA_RUBY, 2026-05-18 21:11:32

How to solve this problem efficiently? Thanks in advance.

A complete weighted graph has N nodes. Source and End node is same (predefined). You can travel any node any times but not the source node. That means you can leave the source node just once. You want to maximise the sum of edge-weight. The sum of weight must not exceeds the pre given value M.

Determine the maximum sum and write the nodes sequentially.

Can you refer some similar problems so that i can examine the code/ algorithm.

Теги graph, backtracking

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский HOMIARA_RUBY 2026-05-18 21:11:32 534 Initial revision (published)