This method will try to find a minimum partition P using the gene nodes in G. If one is found it will be one of the partitions defined in Lemma 4.6. The partition is saved using lists not sets and this is because of the way the algorithm is implemented. 0. ComputePartition(G as a set, max_partition_random as integer) 1. let G_t be a sorted list containing all gene nodes found in G such that |SL(G_t[i])| >= |SL(G_t[j])| if i 0 15. let g be gene node picked at random from G_t 16. remove g from G_t 17. AddToFirstList(P, g) 18. n = n + 1 19. return an error because it failed to find a partition 0. AddToFirstList(P as a list, g_i as a gene node) 1. let k = 0 2 let gi_not_added = true 3. while k < size(P) and gi_not_added do 4. let gi_is_disjoint = true 5. let j = 0 6. while j < size(P[k]) and gi_is_disjoint do 7. if |SL(gi) /\ SL(P[k][j])| > 0 then 8. gi_is_disjoint = false 9. j = j + 1 10. if gi_is_disjoint then 11. add g_i to the list P[k] 12. gi_not_added = false 13. k = k + 1 14. if gi_not_added then 15. let G be an empty list 16. add g_i to G 17. add G to the end of list P Try to verify that the size of the partition can not be smaller by examine if there is a common species in all parts. 0. VerifyByCommonSpecies(P as list) 1. let S be an empty set 2. for k = 0 to size(P) - 1 3. let S_k be an empty set 4. for i = 0 to size(P[k]) - 1 5. S_k = S_k \/ SL(P[k][i]) 6. if S is empty then 7. S = S_k 8. else 9. S = S /\ S_k 10. if size(S) = 0 then 11. return false 12. return true; Try to verify that the size of the partition can not be smaller by finding one gene node in every part such that for any two gene nodes of those, their species sets (SL(g)) are not disjoint. 0. VerifyByCommonSpeciesSets(P as list) 1 let G be an empty list 2. return VerifyByCommonSpeciesSetsRecursive(P, -1, G) 0. VerifyByCommonSpeciesSetsRecursive(P as list, k as integer, G as list) 1. if size(P) <= k+1 then 2. return true 3. for i = 0 to size(P[k+1]) - 1 4. let common_with_all = true 5. let j = 0 6. while j < size(G) and common_with_all do 7. if |SL(P([k+1][j]) /\ SL(G[j])| = 0 then 8. common_with_all = false 9. j = j + 1 10. if common_with_all then 11. add P[k+1][i] to the end of list G 12. if VerifyByCommonSpeciesSetsRecursive(P, k+1, G) 13. return true 14. remove P[k+1][i] from the end of list G 15. return false