Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
ダイクストラがランダムな頂点から実行され、パス上で負の重みのサイクルに遭遇するとします。サイクルをループしてコストを可能な限り小さくすることはできますが、ダイクストラの不変条件は、訪問したノードを「再訪問」することではないため、無限ループは発生せず、ダイクストラは終了しますか?
問題は、ダイクストラのアルゴリズムが終了しないことではなく、負の重みを持つグラフではダイクストラのアルゴリズムがまったく機能しないことです。理由の説明については、この回答を参照してください。
I found something similar on another question but i couldnt solve my problem as i'm still quite new in c#.
i have
System.Type type; // for example int[] System.Type e