I need to know whether the following problem has been studied before:
Let's have a directed acyclic graph G. The graph is connected, it has exactly one source vertex (no incomming nodes) and exactly one sink vertex (no outgoing nodes).
Each vertex has been assigned a nonnegative price in dollars and also a color.
The goal is to find a walk from the start to the sink which maximizes the sum of prices of visited edges.
The catch is, that the price is received only when a vertex of particular color is visited for the first time. For example when we wisit red vertex with price $1, then blue one with $2 and then red with $30 the total price is $3.
The approximate size of my particular problem: 50000 vertices, 3000 colors, typical walk length from start to sink about 200 edges.
------>[B red $1]--- ---->[E red $1]----
/ \ / \
[A black $0] ==>[D black $0]== ==>[G black $0]
\ / \ /
---->[C green $2]--- ->[F green $1000]--