寻找非典型图寻路算法

Searching for an atypical graph pathfinding algorithm

图形结构

graph is oriented

each edge has an assigned value representing the cost of using this edge. The value can be positive or negative

问题描述

input: graph, starting node and initial value (I don't have a goal node)

both, nodes and edges can be used repeatedly

goal: change the initial value to zero by passing through the graph. The answer should be if it is possible to reach zero (exactly zero, without reaching a negative actual value in the process)

I don't need the final path as the result, just the information if it is possible is enough. I would be most interested in a name of algorithm that is designed for this problem.

这显然是NP-Hard(子集和可以通过使用适当的完全图减少到它)。广度优先搜索似乎是一种自然的方法,但要从中得出决策过程,您需要找到路径长度的上限。