Accurate algorithms for identifying the median ranking when dealing with weak and partial rankings under the Kemeny axiomatic approach