I came up with the following implementation for the Greedy Set Cover after much discussion regarding my original question here. From the help I received, I encoded the probl
I use a trick when I implemented the famous greedy algorithm for set cover (no weights) in Matlab. It is possible that you could extend this trick to the weighted case somehow, using set cardinality / set weight instead of set cardinality. Moreover, if you use NumPy library, exporting Matlab code to Python should be very easy.
Here is the trick: