Shortest path problem in bipartite graph

  • Context: Comp Sci 
  • Thread starter Thread starter SadPaul
  • Start date Start date
  • Tags Tags
    Algorithms Graph Path
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
1 reply · 2K views
SadPaul
Messages
2
Reaction score
0
Homework Statement
Let G = (N1 U N2, A) be a bipartite directed network. Suppose that n1 = |N1|, n2 = |N2|
and n1 < n2. Show that the Bellman Ford algorithm solves the shortest path
problem in this network in O(n1m) time.
Relevant Equations
-
Hey guys, I need a little help with this exercise so I know I'm on the right path.

My explanation:
The Bellman-Ford-Moore algorithm computes shortest paths in O(nm) time, so in this situation we say that in a directed bipartite graph the number of iterations that the algorithm will do is min{n1, n2} + 1 = n1 + 1 and the algorithm takes O(m) time per iteration, so the final time is O(n1m).

So far so good, but I' m not really certain if I compute the number of iterations correctly, or how to explain it better.
Any usefull ideas would be welcome!
 
Physics news on Phys.org
I think the point here is to prove the number of iterations is not ##O(n_1+n_2)##, since normally the number of iterations is on the order of the number of vertices. You just kind of asserted it to be true.