Branch and Bound approach to matching candidates with constituencies