I assume the following is/reduces to a known problem, but I haven't been able to find it.
I have a sequence of recipes with associated costs. Each recipe converts a set of resources to another set of resources.
- () -> (1A) cost 1
- (2A) -> (1B, 1C) cost 2
- (4A) -> (3B, 1C) cost 2
- (1A, 1B) -> (1C) cost 1
I now want to find the sequence of steps that maximizes the gain of one resource (say "C") divided by the cost (or perhaps just the sequence that maximizes the gain of the resource for some limited cost).
Does this problem have a name and is there a better approach than brute force search (perhaps with some memoization)?