maximum-profit-problem

maximize profit through trading

谁说我不能喝 提交于 2019-12-12 19:36:50
问题 I have been stuck on this question for a while trying to figure out the recurrence relationship for the following problem. Problem description: Suppose in a market the following trade options are possible: 1 metal to 2 wood 1 wood to 0.2 glass 1 glass to 1.5 metal 1 wood to 0.4 fire 1 fire to 3 metal Determine if it's possible to make profit on a certain item simply by trading. For example in the described scenario above, we can make a profit on metal by doing the following: 1 metal -> 2 wood