Open koosaga opened 1 year ago
I have 2 questions :
(1)
Is " $|c_i| \le 10,000$ " necessary?
(2)
I think it can be completed only about 3 months later.
Does that mean that you are ready to do the work for this problem ?
Is $|c_i| \le 10\,000$ necessary?
It could be significant for scaling, maybe. I don't want to take risks if I don't have to. For the limit, I think it's better discuss this after we have implementation.
Does that mean that you are ready to do the work for this problem ?
I'll do the work. It's great if anyone can provide help, or do it instead of me. I won't be prepared to start until the end of May.
If anyone is interested, please mail me to [my github id] gmail. I will add you to the slack workspace.
843 has been posted, where N,M≤3000 is preferred. How about N,M≤3000 and |ci|≤109 ?
I proposed $N,M\leq 3000$ in https://github.com/yosupo06/library-checker-problems/issues/843 . But the specific numbers are provisional and not significant.
I think $|c_i|\leq 10^9$ is more standard, but $|c_i| \leq 10^4$ is also good if many solutions can be verifyed by doing so.
We need to treat loops correctly if edge weights can be negative, so it is good to include loops. Other things can be same as https://judge.yosupo.jp/problem/shortest_path. ($s\neq t$, allow no multiple edges)
Problem name should be 'Shortest Walk' rather than 'Shortest Path'. The shortest walk of an undirected graph containing negative edges is obvious, so there is no need to specify that the graph is directed.
@koosaga How is the progress going? Is there any trouble?
@maspypy
I finished the preparation in Polygon. Final limitations are $2 \le N \le 20\,000, 1 \le M \le 20\,000, |c_i| \le 10\,000$. I implemented two solution: Bellman-Ford $O(nm)$, and Goldberg's Scaling algo $O(m \sqrt n \log C)$. BF runs in 2.1s and Goldberg (Scaling) runs in 0.6s, but maybe tests are not strong enough against Scaling.
I will attach the polygon package below. It would be great if you could port this into the library-checker format, as I'm not familiar with the format here (and someone need to write a Japanese description anyway).
Problem name: Shortest Path (Negative Edges) (Optional) Problem ID: shortest_path_negative_edges
Problem
Given a weighted directed graph and a source,
Constraint
$1 \le N \le 4\,000, 0 \le M \le 10\,000$ $|c_i| \le 10\,000$ Graph may contain loops and multiple edges
Solution / Reference
(Optional) Note / Discussion
Similar problem on Baekjoon OJ: https://www.acmicpc.net/problem/11657
Possible problem variations:
Possible input variation:
I think it can be completed only about 3 months later.