Finding the heaviest theoretical subpath of size ($n/2$), given a required cycle of size $n$ in a directed,weighted graph.

31 Views Asked by At

Let's say we have a graph of size 10. So, we have nodes $\{0,1,2,3,4,5,6,7,8,9\}$.

For the sake of keeping this problem under a certain level of complexity, accept that we somehow know that edges going out of node $0$ are always heavier than node $1$, and edges going out of node $1$ are always heavier than node $2$, etc etc, in a way where we don't need to worry about what the actual weights are. So, we know that for any given node, it's edges are lighter than the edges of all nodes with a lower value.

So my question is, given this value "$n$" that determined the numbers of nodes in our cycle, for any cycle of size n made from these nodes, what is the worst subpath of size $(n/2)$ that we can have?

It clearly is not $$0 \to 1 \to 2 \to 3 \to \cdots \to (n/2),$$ because if we have this configuration in our cycle then we could just start at $(n/2) $ and choose the subpath: $$\tfrac{n}{2} \to (\tfrac{n}{2} +1) \to \cdots \to n$$

So, there must be some scheme by which it balances out such that if you take the best possible subpath in the cycle, it will contain certain nodes relative to our value $n$. But, I do not know how to figure it out.

Good luck and thank you!

quick edit of more info:

It is a directed graph. It is a fully connected graph. n is the amount of nodes in the graph. The weight of ANY edge coming from a specific node, is equal to (n-(that node's value)). So in my example, edges coming from 0, have a weight of 10. Edges coming from node 5 have a weight of 5. Edges coming from 9 have a weight of 1. Also, for any given edge a-->b, there IS NOT an edge b--->a.