Motivated by existence problems of the maximum number of spanning sets (MS) and the minimum number of Linearly independent sets (ML) which partition a generator in a nite dimensional vector space, we introduce a real time iterative algorithm with polynomial complexity. The algorithm starts with an arbitrary partition and improves it to obtain the nal partition. In addition this algorithm gives the conclusion of the Rado-Horn theorem, and facilitates using of this theorem.