I think I'm looking for an algorithm that can find a "minimum" "selection" in a bipartite graph. Each vertex has an associated (integer) cost to selecting it. I can only find algorithms that minimise the number of vertices in the selected set, not the cost. I'd previously thought I need a "matching", but actually I just need the subset of vertices that cover every edge...
I don't think a greedy solution can work. Suppose our sets are A, B:
Vertices 1,2,3 are in A and have cost 1. Vertex 4 is in B and has cost 2.
The solution is to remove the most expensive vertex, 4. A greedy solution that chose based on cost would fail. Similarly, if B had cost 10, we could not choose the most connected vertex greedily.
I thought of a different wording: "Given a bipartite graph where each vertex has an associated cost, find a subset of vertices of minimum cost such that every edge is incident on at least one vertex in your selected subset".