How do i construct a graph after finding and calculating the optimal path in a binary knapsack problem?

I've attached a picture of the graph, can someone please explain how do i draw such a graph, in a

step by step way.

I figured out there are 10 leaves cause of 10 permutations

If we have ABCD then we can place 4 letters in first position 3 in second 2 in third and 1 in fourth

Not sure if that is correct either, i'd be happy if someone can help me with this

Thanks!

#### Attached image(s)

This post has been edited by **somecoder**: 15 June 2016 - 02:26 AM