# Thread: Bellman Ford algorithm - unknown weight

1. ## Bellman Ford algorithm - unknown weight

Hi to everyone!!! I have the following problem:
I have a directed graph and I want to find out whether there are any negative cycles using Bellman Ford algorithm. I know the weight of all of the edges in this graph but one (the weights of the edges derive from an exercise).
1) Can I use Bellman Ford with one edge's unknown weight?
2) If not, how can I later calculate its weight using Bellman Ford?

I don't want a code but I need help with understanding its application.

2. Noone can help me?

3. You can't "calculate" an unknown weight without some other constraint (like all cycles have the same total weight).

Code:
``` A   10    B
+--->---+
|       |
X V       V 30
|       |
+--->---+
C   20    D```
Without additional information, X could be any value at all. Imagine these were cities on a map, and the weights were road distances. All that you know about C is that it is on a circle 20 miles radius from D, but it tells you nothing about how far that is away from A.

If ABD and ACD are the same overall, you can work out X.

4. I see. Quite impressive that you chose distance of cities as an example as it is right this thing that I am working on.
I have a graph exactly as shown in this pdf (page 3): http://www.st.ewi.tudelft.nl/~planke.../mscthesis.pdf

I don't have information about the edge x0x3. Would it be arbitrary to work around it? And what about the fact that it is asked to calculate the weight of the edge x0x3?

5. And before you mention that there is no edge x0x3, I should say that the description of the problem doesn't point it out technically as an edge (hence the picture of the graph) but it does exist realistically (regarding also the fact that it is later asked to be calculated).