updated functions NrParts and added a function to find the central tendency for a feasible set from a random sample -KL