You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this article (link), there might a possible error related to path and walk. I think that provided algorithm gives shortest walk of even length. Here is a counter example where algorithm fails to give correct answer.
Consider an undirected, unweighted graph G = (V,E) where V = {1,2,3,4} and E = {(1,2),{2,3},{3,4},{4,2}}.
Take source = 1 and target = 2. The provided algorithm gives result as 4 but there doesn't exist any even length path from 1 to 2 in G.
Please correct me if I am wrong else also suggest how to solve the original problem i.e. Shortest even length path.
The text was updated successfully, but these errors were encountered:
That's a very interesting observation, thanks! I think it warrants at least changing path to walk in the article. Would you like to make a pull request about it? Unfortunately, I do not know yet if it is possible to solve this problem in the "path" setting.
In this article (link), there might a possible error related to path and walk. I think that provided algorithm gives shortest walk of even length. Here is a counter example where algorithm fails to give correct answer.
Consider an undirected, unweighted graph G = (V,E) where V = {1,2,3,4} and E = {(1,2),{2,3},{3,4},{4,2}}.
Take source = 1 and target = 2. The provided algorithm gives result as 4 but there doesn't exist any even length path from 1 to 2 in G.
Please correct me if I am wrong else also suggest how to solve the original problem i.e. Shortest even length path.
The text was updated successfully, but these errors were encountered: