How can I use the disjoint set- forests to schedule jobs with penalties, such that the penalties are minimized?
We could first arrange the jobs in decreasing order on the basis of their penalties. Each node x of the forest will represent the job number and the value rank[x] will represent its penalty. But how can I minimize this value rank[x] so that penalties are minimized? The order of the nodes will give me the order of the jobs, but what will be the algorithm for this? How do I go about making the forest?