I've a subset of the simple paths in a graph. The length of the paths is bounded by $d$.
What's the most compact way (memory-wise) I can represent the paths such that no other paths apart from the selected ones are represented?
Note that I want to use this representation in an algorithm that will iterate through this subset of paths over and over again and that I want to be fairly fast, so for instance, I can't use any standard compression algorithms.
One representation that came to my mind was representing them as a set of trees. I'm guessing though that getting it down to an optimal number of trees is NP-hard? What other representations would be good?