Maximum Cost Spanning Tree Math