An approach for optimising genetic contributions of candidates to control inbreeding in the offspring generation using semidefinite programming (SDP) was proposed. Formulations were done for maximising genetic gain while restricting inbreeding to a preset value and for minimising inbreeding without regard of gain. Adaptations to account for candidates with fixed contributions were also shown. Using small but traceable numerical examples, the SDP method was compared with an alternative based upon Lagrangian multipliers (RSRO). The SDP method always found the optimum solution that maximises genetic gain at any level of restriction imposed on inbreeding, unlike RSRO which failed to do so in several situations. For these situations, the expected gains from the solution obtained with RSRO were between 1.5-9% lower than those expected from the optimum solution found with SDP with assigned contributions varying widely. In conclusion SDP is a reliable and flexible method for solving contribution problems.