Chapter 0: Q22P (page 11)
The tramp steamer problem. You are the owner of a steamship that can apply between a group of port cities V . You make money at each port: a visit to city i earns you a profit of dollars. Meanwhile, the transportation cost from port i to port j is .You want to find a cyclic route in which the ratio of profit to cost is maximized.
To this end, consider a directed graph whose nodes are ports, and which has edges between each pair of ports. For any cycle C in this graph, the profit-to-cost ratio is
role="math" localid="1658920675878"
Let r' be the maximum ratio achievable by a simple cycle. One way to determine r' is by binary search: by first guessing some ratio r , and then testing whether it is too large or too small. Consider any positive . Give each edge a weight of .
- Show that if there is a cycle of negative weight, then .
- Show that if all cycles in the graph have strictly positive weight, then .
- Give an efficient algorithm that takes as input a desired accuracy and returns a simple cycle c for which Justify the correctness of your algorithm and analyze its running time in terms of and .
Short Answer
a) The cycle of negative weight is shown below.
b) If all cycles in the graph have strictly positive weight, then is proved.
c) An efficient algorithm that takes as input a desired accuracy is proved.