Abstract-We consider the cooperative data exchange problem, in which nodes are fully connected with each other. Each node initially only has a subset of the K packets making up a file and wants to recover the whole file. Node i can make a broadcast transmission, which incurs cost wi and is received by all other nodes. The goal is to minimize the total cost of transmissions that all nodes have to send, which is also called weighted cost. Following the same idea of our previous work [1] which provided a method based on dBasis construction to solve cooperative data exchange problem without weighted cost, we present a modified method to solve cooperative data exchange problem with weighted cost. We present a polynomial-time deterministic algorithm to compute the minimum weighted cost and determine the rate vector and the packets that should be used to generate each transmission. By leveraging the connection to Maximum Distance Separable codes, the coefficients of linear combinations of the optimal coding scheme can be efficiently generated. Our algorithm has significantly lower complexity than the state of the art. In particular, we prove that the minimum weighted cost function is a convex function of the total number of transmissions for integer rate cases.