Given a graph G=(V,E) and a positive weight function w on all the vertices, find a subset C from V such that all the edges (u,v) in E, at least one , u or v is contained in C and sum of all the weights of vertices in the set C is maximized.
For the Minimum Vertex Cover Problem, I used grMinVerCover (by calling grMinVerCover (E,w) ) function in Matlab. But I could not find a Maximum Vertex Cover function.
So, I calculated the reciprocal of the weights (w') of vertices in w, and then applied the vertex cover to E and w' by calling grMinVerCover(E,w'). The answers I am getting are correct but I want to know if this is logically correct?
Basically i need to find a Cover such that the number of vertices is minimized and the total weight is maximised.