Minimum T-cuts and optimal T-pairings