Let C be a set of positive integers. In this paper, we obtain an algorithm for computing all subsets A of positive integers which are minimals with the condition that if x1 + … + xn is a partition of an element in C, then at least a summand of this partition belongs to A. We use techniques of numerical semigroups to solve this problem because it is equivalent to give an algorithm that allows us to compute all the numerical semigroups which are maximals with the condition that has an empty intersection with the set C.