This is probably a pretty standard statistical/graph analysis requirement but I can't figure out the terminology I need to find what I'm looking for on Google.
I am making a very large number of function calls, and let's say each of those function calls is an item in a set called A. These function calls are expensive and ideally I would like to make as few of them as possible.
The function calls each return one or more results, and let's say each of those results is an item in a set called B. There are many more results than function calls, and each result could be returned by many of the function calls.
Once I have finished making all of the possible function calls for the first time, I would like to determine the least number of function calls in A I could have made and still got all of the results in B, so that next time I run the program I can do so more efficiently.
What algorithm, or type of algorithm, am I looking for here?