Mathematical optimization techniques for resource allocation and spatial multiplexing in spectrum sharing networks